# Feature Request: Add API Endpoint for Distinct Device Attribute Values

**URL:** <https://hub.mender.io/t/feature-request-add-api-endpoint-for-distinct-device-attribute-values/8082>\
**Category:** General Discussions\
**Tags:** mender-api\
**Created:** [November 6, 2025, 1:56pm UTC](https://hub.mender.io/t/feature-request-add-api-endpoint-for-distinct-device-attribute-values/8082 "2025-11-06T13:56:33Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![martingrzzler](https://avatars.discourse-cdn.com/v4/letter/m/838e76/32.png) [@martingrzzler](https://hub.mender.io/u/martingrzzler)\
**Post date:** [November 6, 2025, 1:56pm UTC](https://hub.mender.io/t/feature-request-add-api-endpoint-for-distinct-device-attribute-values/8082/1 "2025-11-06T13:56:33Z")

</div>

Add `/inventory/attributes/{attribute_name}/values` endpoint for retrieving unique attribute values.

Currently, to get all unique values for a specific device attribute, users must:

1. Fetch all devices via `/api/management/v1/inventory/devices`

2. Process the response client-side to extract and deduplicate values

**Proposed Solution:**  
Add a new API endpoint: `GET /api/management/v1/inventory/attributes/{attribute_name}/values`

Response Example:

```json
{
  "attribute_name": "device_type",
  "values": ["raspberry-pi", "esp32", "imx6", "beaglebone"],
  "total_count": 4
}

```

This would enable `SELECT DISTINCT column` - like queries.

---

<div class="post-metadata">

**Author:** ![TheYoctoJester](https://yyz2.discourse-cdn.com/flex036/user_avatar/hub.mender.io/theyoctojester/32/1444_2.png) [@TheYoctoJester](https://hub.mender.io/u/TheYoctoJester)\
**Post date:** [November 7, 2025, 7:57am UTC](https://hub.mender.io/t/feature-request-add-api-endpoint-for-distinct-device-attribute-values/8082/2 "2025-11-07T07:57:49Z")

</div>

Hi @martingrzzler,

Thanks for reaching out. I definitely can see the value in such an endpoint, because as you say, it reduces API calls. This is obviously not something which can be decided by you and me here on Mender Hub, but I’m forwarding it to product planning and drop a follow-up here once I know more.

Greetz,  
Josef

---

<div class="post-metadata">

**Author:** ![TheYoctoJester](https://yyz2.discourse-cdn.com/flex036/user_avatar/hub.mender.io/theyoctojester/32/1444_2.png) [@TheYoctoJester](https://hub.mender.io/u/TheYoctoJester)\
**Post date:** [November 7, 2025, 9:56am UTC](https://hub.mender.io/t/feature-request-add-api-endpoint-for-distinct-device-attribute-values/8082/3 "2025-11-07T09:56:46Z")

</div>

Hi @martingrzzler,

Feedback from the backend team is that you should be able to achieve this with the endpoint documented at [Mender API docs](https://docs.mender.io/api/?http#management-api-device-inventory-filters-and-search-get-filterable-attributes).

Greetz,  
Josef

---

<div class="post-metadata">

**Author:** ![martingrzzler](https://avatars.discourse-cdn.com/v4/letter/m/838e76/32.png) [@martingrzzler](https://hub.mender.io/u/martingrzzler)\
**Post date:** [November 10, 2025, 8:20am UTC](https://hub.mender.io/t/feature-request-add-api-endpoint-for-distinct-device-attribute-values/8082/4 "2025-11-10T08:20:42Z")

</div>

Thank you @TheYoctoJester ,

If I’m not mistaken, this endpoint only returns `name`, `scope`, and the `count` for each attribute but not the unique values for that attribute.

Cheers!

Martin

---

<div class="post-metadata">

**Author:** ![TheYoctoJester](https://yyz2.discourse-cdn.com/flex036/user_avatar/hub.mender.io/theyoctojester/32/1444_2.png) [@TheYoctoJester](https://hub.mender.io/u/TheYoctoJester)\
**Post date:** [November 14, 2025, 10:56am UTC](https://hub.mender.io/t/feature-request-add-api-endpoint-for-distinct-device-attribute-values/8082/5 "2025-11-14T10:56:00Z")

</div>

Hi @martingrzzler,

Indeed, thats possible. I have raised the feature request back to the product team.

Greetz,  
Josef
