Web API: entity name to query data

When querying data with Web API it must be specified the metadata Logical Collection Name property of the entity to query.

https://msdn.microsoft.com/en-us/library/microsoft.xrm.sdk.metadata.entitymetadata.logicalcollectionname.aspx

For example, the query to retrieve the entity account is like “…/api/data/v8.2/accounts?…” where accounts is the Logical Collection Name of the system entity account.

Most of the cases the Logical Collection Name property corresponds to the plural of the Logical Name property in English grammar.

Although in some situations the Logical Collection Name does not match the English plural of entity Logical Name has described here: http://www.crmanswers.net/2016/02/crm-2016-web-api-and-plural-names.html. In those cases specifying the English plural of the Logical Name leads to the error “Resource not found for the segment”.

The entity Logical Collection Name may be obtained querying the entity metadata or easily through the manged solution ‘Metadata Browser’ (as illustrated on above picture for its_settings custom entity) available on Dynamics CRM SDK.

settings_entity_metadata

Leave a comment