# Encoded values in filter param don't work

**URL:** <https://forums.balena.io/t/encoded-values-in-filter-param-dont-work/350003>\
**Category:** Product support\
**Tags:** api\
**Created:** [November 8, 2021, 2:55pm UTC](https://forums.balena.io/t/encoded-values-in-filter-param-dont-work/350003 "2021-11-08T14:55:19Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![filemon](https://sea2.discourse-cdn.com/balena/user_avatar/forums.balena.io/filemon/32/2695_2.png) [@filemon](https://forums.balena.io/u/filemon)\
**Post date:** [November 8, 2021, 2:55pm UTC](https://forums.balena.io/t/encoded-values-in-filter-param-dont-work/350003/1 "2021-11-08T14:55:19Z")

</div>

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’](https://api.balena-cloud.com/v5/device_tag?%24filter=device/uuid%20eq%20%27b13be31e57082388a95f9b5c06aa24f3%27)’

wheres this returns a malformed URL server error

curl ‘[https://api.balena-cloud.com/v5/device\_tag?$filter=device%2Fuuid%20eq%20’b13be31e57082388a95f9b5c06aa24f3’](https://api.balena-cloud.com/v5/device_tag?%24filter=device%2Fuuid%20eq%20%27b13be31e57082388a95f9b5c06aa24f3%27)’

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

---

<div class="post-metadata">

**Author:** ![rmorillo24](https://sea2.discourse-cdn.com/balena/user_avatar/forums.balena.io/rmorillo24/32/10359_2.png) [@rmorillo24](https://forums.balena.io/u/rmorillo24)\
**Post date:** [December 21, 2021, 1:34pm UTC](https://forums.balena.io/t/encoded-values-in-filter-param-dont-work/350003/3 "2021-12-21T13:34:50Z")

</div>

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?

---

<div class="post-metadata">

**Author:** ![filemon](https://sea2.discourse-cdn.com/balena/user_avatar/forums.balena.io/filemon/32/2695_2.png) [@filemon](https://forums.balena.io/u/filemon)\
**Post date:** [January 24, 2022, 9:38am UTC](https://forums.balena.io/t/encoded-values-in-filter-param-dont-work/350003/9 "2022-01-24T09:38:37Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![ab77](https://sea2.discourse-cdn.com/balena/user_avatar/forums.balena.io/ab77/32/2870_2.png) [@ab77](https://forums.balena.io/u/ab77)\
**Post date:** [April 18, 2022, 4:57pm UTC](https://forums.balena.io/t/encoded-values-in-filter-param-dont-work/350003/10 "2022-04-18T16:57:29Z")

</div>

> 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.
