Show/Hide Toolbars

TMS XData Documentation

Navigation: URL Conventions

Query Options

Scroll Prev Top Next More

When addressing resources, it's possible to include a query string in the URL to perform extra operations on the resource being addressed, like filtering or ordering entities. Query options start with ? character and can be provided in the format name=value, separated by the & character. Many query options can be applied in a single URL. For example, the URL below retrieves the first 10 customers which country is USA, ordered by name:

 

http://server:2001/tms/xdata/Customer?$filter=Country/Name eq 'USA'&$orderby=Name&$top=10

 

The following table lists all the query options that can be used in a query string:

 

Query option

 

Description

$filter

 

Allows filtering the entities in an entity set by a specified condition

$orderby

 

Specifies the order of retrieved entities, by one or more properties or expression

$top

 

Specifies the maximum number of entities to be returned by the server

$skip

 

Specifies the number of entities that the server should skip before returning the requested entities

$inlinecount

Includes the total number of entities (without paging) in the JSON response

 

$expand

Expands associated objects in by forcing the server to include them inline in JSON response