Call api with a filter in query string

Database & APIs

I am trying to call an API which is on a Payload CMS implementation. The API returns an article stored on the server.

To find the right article I need to send a query string to the server which contains 4 parameters and is formatted as follow:

&where[AND][0][field1][equals]={{v1}}
&where[AND][1][field2][equals]={{v2}}
&where[AND][2][OR][0][field3][equals]={{v3}}
&where[AND][2][OR][1][field3][equals]={{v4}}
&where[AND][3][field4][equals]={{v5}}

This query is equivalent in sql to the following

WHERE field1 = 'v1' AND 
      field2 = 'v2' AND 
      (field3 = 'v3' OR field3 = 'v4') AND 
      field4 = 'v5'

The problem is that every single query parameter has the same name ('where') so probably the server is interpreting these parameters as an array.

The question is: How can I manage these parameters within flutterflow?

Any suggestion on how to overcome this limitation?

What have you tried so far?

Currently the FF api UI does not consent to define query parameters with list types in Specific Value mode. I can of course define a Variable which is of the type String and has IsList = true however when it comes to define the query parameter name I can define only one parameter with name "where" while the server expect multiple.

Another problem is represented by the presence of square brackets required by the server (e.g. [AND][0][field1][equals]). If I add this string into a value of a query parameter defined with Specific Value I get the following error Current API endpoint is misconfigured. Details: Variables specified in brackets in URL paths, headers, or parameters must be defined in the "Query Parameters" section. Missing variables: AND, 0, field1, equals.

Did you check FlutterFlow's Documentation for this topic?
Yes
1