A single entity in an entity set can be addressed by passing the entity key between parenthesis after the entity set name. The following example represents a specified Customer object with id (key) equals to 3.
The literals in key predicates can also represent other types than integer, such as strings or guids. The following example retrieves the employee with id equals to "XYZ".
If you have entity types with compound keys (not recommended, actually), you can access it by naming each value and separate them using commas. The order is not significant. The next example represents the URL address of a Person entity identified by a compounded key made up of two properties, LastName and FirstName, which values are "Doe" and "John", respectively.
XData uses JSON Format to represent the entity resources available in such URL addresses. To know more about the format specification, please refer to the topic that explains JSON format representation of a single entity.
Key as segments
If property TXDataServerModule.EnableKeyAsSegment is True (same property is available in TXDataServer), single entities can also be addresses by the name of the entity followed by a slash and the id, as the following examples:
Compound keys can be passed one after order, each also separated by slashes: