Supported OData query options
The currently supported OData query options that can be used for query composition to customize responses are mentioned below.
-
$selectUse the $select query parameter to return a set of properties that are different than the default set for an individual resource or a collection of resources. With $select, you can specify a subset of the default properties.Example: In the example below, the query returns only two properties, Department name and Department status in the result.
https://<Reporting endpoint base URL>/odata/departments?$select=DepartmentName,Status -
$countUse the $count query parameter to retrieve the total count of matching resources.In the example below, the query returns a total count of roles in the system irrespective of any other filters.
https://<Reporting endpoint Base URL>/odata/roles?$count=true -
$topUse the $top query parameter to limits the number of records returned.In the example below, the query returns the top 10 records in the result.
https://<Reporting endpoint Base URL>/odata/departments?$top=10 -
$skipUse the $skip query parameter to skips a specified number of records before returning results.In the example below, the query returns the records skipping the first 60 records in the result.
https://<Reporting endpoint Base URL>/odata/departments?$skip=60 -
$skipTokenUse the $skipToken query parameter to retrieve the next page of results from result sets that span multiple pages.Some requests return multiple pages of data due to server-side paging to limit the page size of the response. Reporting APIs use the $skipToken query parameter to reference subsequent pages of the result. The $skipToken parameter contains an opaque token that references the next page of results and is returned in the URL provided in the
@odata.nextLinkproperty in the response.For example, if you call the Roles API that have more than 1000 records in the result, then the response will return only 1000 records with@odata.nextLinkproperty as shown below."@odata.nextLink": "https://<Reporting endpoint Base URL>/odata/roles?$skipToken=29310"To fetch the next page of records, the value of the@odata.nextLinkcan be used as the endpoint URL which has askipTokenvalue.