Use the supported OData expressivity to refine your request and retrieve
specific data from your dataset.
For more information, see the OData
documentation.
Supported OData expressivity
The following expressivity patterns can be used to craft specific requests.
Note: Using an unsupported option in an OData request will result in a
501 - Not
Implemented
error.url/$metadata
url/entity_set_name
url/entity_set_name(primary_key_value)
url/entity_set_name(primary_key_value)/column_name
url/entity_set_name(primary_key_value)/column_name/$value
url/entity_set_name?$top=n
url/entity_set_name?$skip=n
url/entity_set_name?$skip=n&$top=n
url/entity_set_name?$select=column_name
url/entity_set_name?$orderby=column_name asc|desc
url/entity_set_name?$filter=column_name eq 'value'
url/entity_set_name?$filter=contains(column_name, 'value')
Examples of requests
The following table shows a few examples of requests that can be sent to your API. In this example, an API was created for the entity set namedcustomers
and the API path generated is
customers-api-2PZPTB
. The dataset contains columns named
customer_age
, id
, customer_name
,
customer_city
and customer_street
, and the column
id
is used as the primary key.
Pattern | Description | Example |
---|---|---|
url/entity_set_name |
Get all data in the entity set. |
Request:
Response:
|
url/$metadata |
Get the entity set's metadata. |
Request:
Response:
|
url/entity_set_name(primary_key_value) |
Get a specific entity using its primary key value. | Request: Response:
|
url/entity_set_name(primary_key_value)/column_name |
Get a single column for a specific entity. |
Request:
Response:
|
url/entity_set_name(primary_key_value)/column_name/$value |
Get a column's raw value for a specific entity. |
Request:
Response:
|
url/entity_set_name?$top=n |
Get a limited number of entities. |
Request:
Response:
|
url/entity_set_name?$skip=n |
Get a collection of entities, skipping the first n
entities. |
Request:
Response:
|
url/entity_set_name?$skip=n&$top=n |
Create a pagination and get a specific page of entities from a collection. |
Request:
Response:
|
url/entity_set_name?$select=column_name |
Get only certain attributes of entities. Note: The column used as
primary key is always included.
|
Request:
Response:
|
url/entity_set_name?$orderby=column_name
asc|desc |
Get a collection of entities in a specific order using one or multiple
attributes. The two possible values for this option are asc and
desc . |
Request:
Response:
|
url/entity_set_name?$filter=column_name
eq 'value' |
Get a collection of entities corresponding to a filter. |
Request:
Response:
Note: Depending on the tool used to call the API, you may get an error
if spaces are encoded with plus signs (
+ ). To avoid this issue,
make sure that spaces are encoded in Percent-encoding as
%20 . |
url/entity_set_name?$filter=contains(column_name,
'value') |
Get a collection of entities corresponding to a filter where the column_name contains a certain 'value' |
Request:
Response:
|