# Management API - Incorrect link headers on /devauth/devices/search

**URL:** <https://hub.mender.io/t/management-api-incorrect-link-headers-on-devauth-devices-search/7846>\
**Category:** General Discussions\
**Tags:** api\
**Created:** [June 23, 2025, 11:45am UTC](https://hub.mender.io/t/management-api-incorrect-link-headers-on-devauth-devices-search/7846 "2025-06-23T11:45:25Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![nritter](https://avatars.discourse-cdn.com/v4/letter/n/dec6dc/32.png) [@nritter](https://hub.mender.io/u/nritter)\
**Post date:** [June 23, 2025, 11:45am UTC](https://hub.mender.io/t/management-api-incorrect-link-headers-on-devauth-devices-search/7846/1 "2025-06-23T11:45:25Z")

</div>

It seems the response headers received when making paginated requests to the device authentication endpoint at `/v2/devauth/devices/search` do not contain the appropriate links anymore.

For instance a request on `/v2/devauth/devices/search?page=3&per_page=100` returned the following link header:  
`"link":"</api/management/v2/devauth/devices/search?page=1&per_page=100>; rel=\"first\", </api/management/v2/devauth/devices/search?page=2&per_page=100>; rel=\"prev\", </api/management/v2/devauth/devices/search?page=1&per_page=100>; rel=\"last\""`

even though page 3 contains entries and there are subsequent pages as well. The `next` link is missing and the `last` link incorrectly points to page 1.

This affects the search page on the UI, which can now only displays the first page of results.

---

<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:** [June 24, 2025, 1:03pm UTC](https://hub.mender.io/t/management-api-incorrect-link-headers-on-devauth-devices-search/7846/2 "2025-06-24T13:03:35Z")

</div>

Hi @nritter,

Thanks for reaching out. This seems to be a bug in the exposed API. Can you please file it as a bug report so it gets picked up?

To access JIRA, you can use this [link](https://id.atlassian.com/invite/p/jira-software?id=DlvQIXl3S4m600_3xq2fKQ)

Greetz,  
Josef

---

<div class="post-metadata">

**Author:** ![nritter](https://avatars.discourse-cdn.com/v4/letter/n/dec6dc/32.png) [@nritter](https://hub.mender.io/u/nritter)\
**Post date:** [June 24, 2025, 1:22pm UTC](https://hub.mender.io/t/management-api-incorrect-link-headers-on-devauth-devices-search/7846/3 "2025-06-24T13:22:10Z")

</div>

Okay, I’ve submitted it.
