# Not filtering API response // Bug with latest release of the API

**URL:** <https://forums.balena.io/t/not-filtering-api-response-bug-with-latest-release-of-the-api/343764>\
**Category:** Product support\
**Tags:** api\
**Created:** [August 8, 2021, 12:05pm UTC](https://forums.balena.io/t/not-filtering-api-response-bug-with-latest-release-of-the-api/343764 "2021-08-08T12:05:46Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![panbanda](https://sea2.discourse-cdn.com/balena/user_avatar/forums.balena.io/panbanda/32/6062_2.png) [@panbanda](https://forums.balena.io/u/panbanda)\
**Post date:** [August 8, 2021, 12:05pm UTC](https://forums.balena.io/t/not-filtering-api-response-bug-with-latest-release-of-the-api/343764/1 "2021-08-08T12:05:46Z")

</div>

I am using the latest version of Balena on the OS and api side. When I do a GET request using the following format they all have the same results (no filtering happening)

```auto
# Lists all the environment variables
https://api.<URL>/v6/device_environment_variable

# Lists all, but should not list any as "fds" doesn't exist (this is the former format I used and it worked)
https://api.<URL>/v6/device_environment_variable?\$filter=uuid%20eq%20'fds'

# Lists all, but should not list any as "fds" doesn't exist (this is the API documentation below)
https://api.<URL>/v6/device_environment_variable?\$filter=device%20eq%20'fds'

```

However, I am following the documentation outlined below:

> **[Resources - Balena Documentation](https://www.balena.io/docs/reference/api/resources/device_environment_variable/)**

---

<div class="post-metadata">

**Author:** ![panbanda](https://sea2.discourse-cdn.com/balena/user_avatar/forums.balena.io/panbanda/32/6062_2.png) [@panbanda](https://forums.balena.io/u/panbanda)\
**Post date:** [August 11, 2021, 7:22am UTC](https://forums.balena.io/t/not-filtering-api-response-bug-with-latest-release-of-the-api/343764/2 "2021-08-11T07:22:19Z")

</div>

Should I report this on github instead?

---

<div class="post-metadata">

**Author:** ![klutchell](https://sea2.discourse-cdn.com/balena/user_avatar/forums.balena.io/klutchell/32/861_2.png) [@klutchell](https://forums.balena.io/u/klutchell)\
**Post date:** [August 23, 2021, 8:08pm UTC](https://forums.balena.io/t/not-filtering-api-response-bug-with-latest-release-of-the-api/343764/3 "2021-08-23T20:08:06Z")

</div>

Hey @panbanda, I tried this myself and got similar results. It seems like the filter isn’t being applied, either that or we are both doing something incorrectly. I’ll open an issue on the API for tracking and see what the team has to suggest.

> <https://github.com/balena-io/open-balena-api/issues/746>
>
> Filtering this query as per the documentation does not actually change the resul…ts and all vars are returned from all devices.
> 
> https://www.balena.io/docs/reference/api/resources/device\_environment\_variable/
> 
> \`\`\`
> curl -X GET \\
> "https://api.balena-cloud.com/v6/device\_environment\_variable?\\$filter=device%20eq%20\<DEVICE ID\>" \\
> \-H "Content-Type: application/json" \\
> \-H "Authorization: Bearer \<AUTH\_TOKEN\>" 
> \`\`\`
