Filter syntax for BAQ using REST API

Working on a simple query to a BAQ I have. I would like to filter my results using $filter. I can’t quite seem to get the syntax right. Any pointers?

Thanks in advance!

If you’re using OData they use a type of syntax

  1. Equality Operators:
  • eq: Tests whether a field is equal to a constant value.
  • ne: Tests whether a field is not equal to a constant value.
  1. Range Operators:
  • gt: Tests whether a field is greater than a constant value.
  • lt: Tests whether a field is less than a constant value.
  • ge: Tests whether a field is greater than or equal to a constant value.
  • le: Tests whether a field is less than or equal to a constant value.

OData comparison operator reference - Azure AI Search | Microsoft Learn

So in the filter box it would something like

SellingQuantity gt 0 - > This would be SellingQuantity greater than 0

1 Like

That was the missing link. Thank you @aarong .
For my example, it’s PartPlant_PersonID eq ‘SOMEBODY’

I did that in Swagger just like I have it above and it worked. But I see the URL shows the spaces converted to %20 and the dollar sign was converted to %24. I’ll have to play with that in the get request and make sure that formats properly.

Swagger uses a URLEncode library.

If you’re writing external code, you can wrap it in a library… Take a look on npm there is multiple.