Forum Discussion

jeromeb's avatar
Icon for Altostratus rankAltostratus
Jul 01, 2020

BIG-IP (iControl REST) - WAF - Search among suggestions

Hello there!

I'm currently working on a Python application (web + API) retrieving policies and suggestions from F5 via F5's REST API. We're trying to implement a search API on top of the F5.

For that, we want to use F5 REST API and some of its capabilities, like $filter keyword. To implement a search by text provided by the final user, we want to know if this text is present in two properties of the suggestion: entityName and violation/title (violation reference is expanded in our use case). So we send API request like this:

https://f5-ip/mgmt/tm/asm/policies/<policy_id>/suggestions?$filter=contains(entityName,'blah')+or+contains(violation/title,' blah')&$expand=violationReference

This request raises a 400 bad request error with message :

Compound expressions using OR on different search fields are unsupported.

Does that mean we can't have multiple 'contains' parameters if we're using an "OR" operator? If so, does that mean we have to limit our requests to only one 'contains' parameter?

I guess one workaround would be to send two requests, one for each 'contains' parameter, but I'm afraid that will slow down the whole process. Do you see any other possible workarounds?

Thanks for your help!

F5 API version : 13.1.0

No RepliesBe the first to reply