Show/Hide Toolbars

TMS XData Documentation

Navigation: Requesting Data

Requesting Single Entities

Scroll Prev Top Next More

To retrieve a single entity, the client makes a GET request to the read URL of an entity.

 

The read URL can be obtained by following the URL conventions, either that addresses a single entity, or associated entities. The read URL can be also obtained from a response payload in JSON format containing information about associated entities (through navigation properties of the entity represented in the payload).

 

If no entity exists with the key values specified in the request URL, the service responds with 404 Not Found.

 

Examples:

Retrieving a customer with id equals to 3

 

GET /tms/xdata/Customer(3) HTTP/1.1

Host: server:2001

 

Retrieving the customer associated with order 10:

 

GET /tms/xdata/Order(10)/Customer HTTP/1.1

Host: server:2001

 

In both examples above, the response content might be:

 

{
  "$id": 1,
  "@xdata.type": "XData.Default.Customer",
  "Id": 55,
  "Name": "Joseph",
  "Birthday": "1980-05-20",
  "Sex": "tsMale",
  "Picture": null
}