Show/Hide Toolbars

TMS XData Documentation

Navigation: Requesting Data

Requesting Associated Entities

Scroll Prev Top Next More

To request associated entities according to a particular relationship, the client issues a GET request to the source entity’s request URL, followed by a forward slash and the name of the navigation property representing the relationship, according to URL conventions for addressing associated entities.

 

If the navigation property does not exist on the entity indicated by the request URL, the service returns 404 Not Found.

 

If the association terminates on a collection (many-valued association), then behavior is similar as described in topic "Querying Collections", without the exception that query options (filtering, ordering, etc.) cannot be applied.

 

If the association terminates on a single entity (single-valued association), then behavior is the same as described in topic "Requesting Single Entities". If no entity is related, the service returns 204 No Content

 

Examples: Retrieving the customer associated with order 10 (single entity):

 

GET http://server:2001/tms/xdata/Order(10)/Customer HTTP/1.1

 

Retrieving items associated with order 10 (collection of entities):

 

GET http://server:2001/tms/xdata/Order(10)/Items HTTP/1.1