Encoded values in filter param don't work

Hi,

I have a problem with my http client (out of my control) encoding ‘/’ as %2F in filter=device/uuid. More specifically

this call works

curl ‘https://api.balena-cloud.com/v5/device_tag?$filter=device/uuid%20eq%20’b13be31e57082388a95f9b5c06aa24f3’

wheres this returns a malformed URL server error

curl ‘https://api.balena-cloud.com/v5/device_tag?$filter=device%2Fuuid%20eq%20’b13be31e57082388a95f9b5c06aa24f3’

Is it intended behaviour of resin backend or a bug? Other encoded parameters work just fine, only this filter param is IMHO not interpreted correctly.

Thanks,

Jiri

Hi
Thanks for reporting this. I’ve been checking the code and I can confirm that the way we are decoding the filter does not have into account encoded chars. However, I wonder if this is something we want to improve or not, so I’ll talk about it with the team.
Can I ask what is that http client you are using to make the calls?

Hi, it was a Paw tool for OSX.

I used it to quickly test and generate http requests for my other cmdline tool dealing with Balena (setting tags, seeing our app specific stuff).

Regards,

Jiri

Is it intended behaviour of resin backend or a bug

This is the intended behaviour. Only single and double quotes, + and a couple other characters need to be encoded. If there is an option to use our SDK(s) or pinejs-client, all of the encoding is handled automatically.