Multi-filter Odata Queries

Challenge 

We need to be able to filter the OData with a few different parameters. 

Solution 

To use multiple filters to filter OData feed, use the ‘and’ operator to combine your filters: 

 

For example: 

Applying a ‘startedAt 2021-07-01' filter and then a ‘projectID’ filter for 5a91d194fde28b0011ce2422. 

Don't forget to add a valid API key at the end of the query, instead of the placeholder in the example query below 

 

Query with ‘and’: 
 https://odata-trial.cognigy.ai/v2.0/Conversations/?$filter=startedAt gt 2021-12-01 and projectId eq '5a91d194fde28b0011ce2422'&apikey=YOURAPIKEY 

 
Query with multiple filters applied as parameters: 

https://odata-trial.cognigy.ai/v2.0/Conversations/?$filter=startedAt gt 2021-07-01&filter=projectId eq '5a91d194fde28b0011ce2422'&apikey=YOURAPIKEY 


Comments

0 comments

Article is closed for comments.

Was this article helpful?
0 out of 0 found this helpful