OData Reader Feature Type Parameters
Query Options
The available query options are Order By, Filter, and Expand. All fields are optional.
System query options are query string parameters that control the amount and order of the data returned for the resource identified by the URL. The names of all system query options are optionally prefixed with a dollar ($) character. OData Protocol V4.01 based services support case-insensitive system query option names specified with or without the $ prefix. Clients that want to work with 4.0 services must use lowercase names and specify the $ prefix.
See examples in the table below. For greater detail on these query options, visit Microsoft Query Options Overview.
|
Query Option |
Description |
Example |
Result |
Equivalent Query Parameter (examples from Query Options Overview) |
|---|---|---|---|---|
|
Order By |
Request resources in a particular order. |
ProductID |
Orders results by Product ID in descending order. |
This is equivalent to specifying $orderby as query parameter in the following request URL: http://odata/service/Categories?$orderby=ProductID |
|
Filter |
Filter a collection of resources that are addressed by a request URL. |
ProductID gt 5 |
Returns results where the product id is greater than 5. |
This is equivalent to specifying $filter as query parameter in the following request URL: http://odata/service/Categories?$filter=ProductID gt 5 |
|
Expand |
Specify the related resources or media streams to be included in line with retrieved resources. |
Products |
Expands the Products key as JSON. To expose this attribute, you will need to specify it in the workspace: Open the Feature Type parameters and click the User Attributes tab. |
This is equivalent to specifying $expand as query parameter in the following request URL: http://odata/service/Categories?$expand=Products |