Show/Hide Toolbars

TMS XData Documentation

Navigation: Requesting Data

Requesting Individual Properties

Scroll Prev Top Next More

To retrieve an individual property, the client issues a GET request to the property URL. The property URL is the entity read URL with "/" and the property name appended, according to URL conventions for addressing simple properties. For example:

 

GET http://server:2001/tms/xdata/Product(1)/Name HTTP/1.1

 

The result format following the JSON format specification for individual properties, i.e., a JSON object with a name/value pair which name is "value" and the value contains the actual property value. The result for the above request might be, for example:

 

{
  "value": "Silver Hammer XYZ"
}

 

If the property has the null value, the service responds with 204 No Content.

If the property doesn't exist the service responds with 404 Not Found.

 

You can alternatively request the raw value of the property. To retrieve the raw value of a primitive type property, the client sends a GET request to the property value URL, which is the property value URL suffixed with "$value":

 

GET http://server:2001/tms/xdata/Product(1)/Name/$value HTTP/1.1

 

The Content-Type of the response is text/plain and the response content is the property value in plain text, formatted according to the JSON format specification for property values. The response content of the above request might something like the following:

 

Silver Hammer XYZ

 

A $value request for a property that is null results in a 204 No Content response.

If the property doesn't exist the service responds with 404 Not Found.