Web API 8 and custom entities RRS feed

  • Question

  • Hi All,

    I can't seem to get the CRM 2016 web api working for my custom entities..

    If I do this...

    <org url>/api/data/v8.0/contacts

    it works fine, but if i do the same with a custom entity (xxx is not the real refix, changed for posting)..

    <org url>/api/data/v8.0/xxx_configurationkeys

    it complains "Resource not found for segment". This usually means that the entity name is incorrect, the entity name is correct and works with the old odata 2

    <org url>/xrmservices/2011/OrganizationData.svc/xxx_configurationkeySet

    I have tried the singular form, xxx_configurationkey, othe case forms xxx_ConfigurationKeys and even without the prefix, however none of them work :-(

    Has anyone seen this?



    Thursday, March 24, 2016 4:58 PM


All replies

  • I've built a tool https://crmrestbuilder.codeplex.com that will generate the JavaScript code for the old 2011 as well as the new Web API - it creates based on the metadata i the org. You might try using that to see what it brings back as the name 

    Jason Lattimer
    My Blog -  Follow me on Twitter -  LinkedIn

    • Marked as answer by ChrisAdams Sunday, March 27, 2016 9:27 AM
    Thursday, March 24, 2016 9:12 PM
  • Hi Jason,

    Thanks, I was hoping someone would bring out a web api tool :-)

    It turns out that although the schema name was configurationkey it now uses a collection schema name which was generated as configurationkeies. It is obviosly trying to do some clever pluralisation but failing.

    They should have just stuck with the '....Set' format from the 2011 endpoints :-) using differing pluralisations makes it difficult to genrically generate code without calling the server to get the entity metadata. At least with the old format you could always use <schema name>Set.



    Friday, March 25, 2016 6:15 PM
  • Hi Adam,

    Check below post on Web API  for CRM 2016 and plural names.



    If you find this post helpful then please "Vote as Helpful" and "Mark As Answer". Thanks and Regards, Mohammad Yusuf Ansari http://microxrm.blogspot.in

    • Marked as answer by ChrisAdams Sunday, March 27, 2016 9:27 AM
    Saturday, March 26, 2016 6:14 AM
  • Hi Thanks both,

    I've marked both as answers :-)

    I agree with the blog post, it was a bad idea to use plural unless they generate the plural schema name from the plural display name (as the singular currently does).

    There are far too many exceptions in English alone, and for users based on another language, may not make any sense whatsoever.

    But we will have to live with what we have. I am currently trying to amend the SDK.REST endpoint library which currently is still using the 2011 endpoint. I will have to change the url's to plural based on the entity name. I hope there are only exceptions for s and y as the post suggests.



    Sunday, March 27, 2016 9:32 AM