OData

This page provides example code for performing OData queries in the Integration Theme.

If you are unfamiliar with OData and how to use it, there is great official documentation available.

💡 Tip: Combine queries using & (ampersand). For example: $top=2&$skip=5. Read more

The shared config.js file for these examples is incomplete. Enter your own settings for the examples to function.

How this example works:

Each input below represents the optional oDataQueryString parameter for supported methods (see Client SDK Docs).

For each example, the following code will be run when the input value changes - with the OData query string applied:

await client.getAllSpecifications(GROUP_ALIAS, "oDataQueryString");

Edit the Query String inputs to experiment with custom query string - the results shown will update in real time.


$filter

$filter supports various operators to control the response.

💡 Tip: Results can be filtered by any available property, not just those demonstrated.

Example: Filter by state

Use an OData query to filter by State Type equal to "Paused".

Result

Loading...

Example: Filter between dates

Use an OData query to find results between two dates.

Result

Loading...

$orderby

💡 Tip: Results can be ordered by any available property, not just those demonstrated.

Example: Order by name

Use an OData query to order the response based on name.

Result

Loading...

Example: Order by date

Use an OData query to order the response based on DateEdited.

Result

Loading...

$select

Use an OData query to specify the properties to include in the response.

Result

Loading...

$skip

Use an OData query to manipulate the starting position - skipping and excluding results.

$skip is useful for pagination, when combined with $top.

Result

Loading...

$top

Use an OData query to manipulate/limit the number of items returned.

Result

Loading...

Combined Queries

Use a combined OData query to return complex results.

This example query returns the name & id for 2 results, skipping the first 3 results.

Result

Loading...

Custom OData Query Builder

Create a custom OData query and view the dynamic results.

Result

Enter a custom query.