Goal:
Trying to GET a url such as endpoint?client=10001&client=10000
with repeated parameters (client
).
Steps:
The solution proposed in https://community.retool.com/t/using-repeating-url-parameters-array-in-rest-resource-query-block/38415:
Then using the transformer value (?client=10001&client=10000
) in the query:
Unfortunately it doesn't seem to work here (maybe because it's not a workflow), as the URL that get's called ends up being entities%3Fclient=10001&client=10000
(note the encoded question mark):
Any idea of how I could achieve this?
Thanks
Just tried this as a workaround, but even that doesn't work:
It seems like Retool expects the query parameter keys to be unique.
As you have deduced, Retool's URL parameters do not expect multiple parameter keys to be identical. What's the use case for this? 
Ok. Do you know if this is something I can work around given that I canβt change how the API works?
The use-case is that I need to call an API that uses duplicate query parameter keys for filtering. This is not uncommon and often used to represent oneOf filters. E.g.: http://example.com/users?id=1&id=2&id=3
.
Note that this is also explicitly allowed in the HTML4/HTML5 specs: forms - Do HTTP parameter names have to be unique? - Stack Overflow.
Is the core issue that the question mark is converted to percentage encoding?
Can you try removing the "?" from the string and just adding it to the url query before the variable? This worked for me:
This also worked. If your array isn't long enough the last param is simply undefined.
Thank you! That worked.
I had to add an unused query param at the end because a =
is added: