# Mender API List Device Inventories

**URL:** <https://hub.mender.io/t/mender-api-list-device-inventories/7988>\
**Category:** General Discussions\
**Tags:** api\
**Created:** [September 4, 2025, 10:52pm UTC](https://hub.mender.io/t/mender-api-list-device-inventories/7988 "2025-09-04T22:52:32Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![pkgl](https://yyz2.discourse-cdn.com/flex036/user_avatar/hub.mender.io/pkgl/32/2368_2.png) [@pkgl](https://hub.mender.io/u/pkgl)\
**Post date:** [September 4, 2025, 10:52pm UTC](https://hub.mender.io/t/mender-api-list-device-inventories/7988/1 "2025-09-04T22:52:32Z")

</div>

Hi,

I’m currently in the process of rewriting the [GitHub Action for deployments](https://github.com/mendersoftware/mender-gh-action-create-deployment) so that it can also deploy to dynamic groups from within an Action. While working on this, I noticed the following issue:

> **[Mender API docs](https://docs.mender.io/api/#management-api-device-inventory-list-device-inventories)**

From the endpoint `https://hosted.mender.io/api/management/v1/inventory/devices` it is not possible, as described in the documentation, to filter by attributes (tags). On my device, the following tag is set:

 ![grafik](https://canada1.discourse-cdn.com/flex036/uploads/mender/original/2X/c/c705ad48988bd289f19ea3f035e06212baa46c8e.png)

```auto
qa=true

```

However, it is not possible to filter all devices with the `qa=true` attribute using this endpoint. The response from the REST API is always empty.

Its also not possible to use the example attributes `attr_name_1=foo&attr_name_2=100`to filter the results.

```bash
RESPONSE=$(curl -s -X GET "https://eu.hosted.mender.io/api/management/v1/inventory/devices?qa=true" \
  -H "Content-Type: application/json" \
  -H "Accept: application/json" \
  -H "Authorization: Bearer $PAT")

echo $RESPONSE | jq -r '.[] | {id, hostname: (.attributes[]? | select(.name=="hostname") | .value)}'

```

I am using the [eu.mender.io](http://eu.mender.io) API endpoint, maybe it is somehow different from the [mender.io](http://mender.io) version?

---

<div class="post-metadata">

**Author:** ![pkgl](https://yyz2.discourse-cdn.com/flex036/user_avatar/hub.mender.io/pkgl/32/2368_2.png) [@pkgl](https://hub.mender.io/u/pkgl)\
**Post date:** [September 4, 2025, 10:59pm UTC](https://hub.mender.io/t/mender-api-list-device-inventories/7988/2 "2025-09-04T22:59:39Z")

</div>

Was already answered [Device Inventory API: Search by tags](https://hub.mender.io/t/device-inventory-api-search-by-tags/6539)

Solution: `/api/management/v1/inventory/devices?tags/attr_name_1=true`

**Should be added to the API documentation….**

EDIT:  
If you want to chain tags you will need to use this:  
`/api/management/v1/inventory/devices?tags/foo=bar#foo1=bar1`
