# /api/management/v2/devauth/devices not showing all devices in pending status?

**URL:** <https://hub.mender.io/t/api-management-v2-devauth-devices-not-showing-all-devices-in-pending-status/616>\
**Category:** General Discussions\
**Tags:** api\
**Created:** [May 23, 2019, 11:54am UTC](https://hub.mender.io/t/api-management-v2-devauth-devices-not-showing-all-devices-in-pending-status/616 "2019-05-23T11:54:15Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![kbantoft](https://avatars.discourse-cdn.com/v4/letter/k/ea5d25/32.png) [@kbantoft](https://hub.mender.io/u/kbantoft)\
**Post date:** [May 23, 2019, 11:54am UTC](https://hub.mender.io/t/api-management-v2-devauth-devices-not-showing-all-devices-in-pending-status/616/1 "2019-05-23T11:54:16Z")

</div>

We’ve got one product working nicely with mender, and are in the process of bringing the 2nd online - however the API isn’t showing any of the new units.

I wrote some code to use the devauth API to identify devices that were pending authorization, and then authorize them. This works fine for product 1, but the product 2 devices don’t even show up in the API. They are listed in the WebUI under Pending, but don’t appear in the list of devices returned by the API.

Any thoughts?

---

<div class="post-metadata">

**Author:** ![mirzak](https://yyz2.discourse-cdn.com/flex036/user_avatar/hub.mender.io/mirzak/32/2056_2.png) [@mirzak](https://hub.mender.io/u/mirzak)\
**Post date:** [May 23, 2019, 11:57am UTC](https://hub.mender.io/t/api-management-v2-devauth-devices-not-showing-all-devices-in-pending-status/616/2 "2019-05-23T11:57:58Z")

</div>

Hi,

Could provide some more information about what versions you are running, client and server.

But it is odd that the it would not be visible trough the APIs for you, as the fronted is using the same API to display it under “Pending”

---

<div class="post-metadata">

**Author:** ![kbantoft](https://avatars.discourse-cdn.com/v4/letter/k/ea5d25/32.png) [@kbantoft](https://hub.mender.io/u/kbantoft)\
**Post date:** [May 23, 2019, 12:18pm UTC](https://hub.mender.io/t/api-management-v2-devauth-devices-not-showing-all-devices-in-pending-status/616/3 "2019-05-23T12:18:14Z")

</div>

Server is self-hosted, 1.7.0.

Client version reports no version, but believe it’s also 1.7.0

# mender -version

INFO[0000] Configuration file does not exist: /var/lib/mender/mender.conf module=config  
INFO[0000] Loaded configuration file: /etc/mender/mender.conf module=config  
INFO[0000] Mender running on partition: /dev/mmcblk0p2 module=main  
unknown  
runtime: go1.12.4

Note: This is on OpenWRT, based on the work you did with Bill from our team. We run the same codebase on 2 different hardware platforms, so AFAICT it shouldn’t be any different.

curl -s -H “Authorization: $jwt” [https://mender.privacyhero.com/api/management/v2/devauth/devices](https://mender.privacyhero.com/api/management/v2/devauth/devices) | jq \> devices.json

Even running that gives me the list of all devices, but none of the ‘new’ one from pending. Units with product ID set to the Product1 HW show up as expected.

---

<div class="post-metadata">

**Author:** ![mirzak](https://yyz2.discourse-cdn.com/flex036/user_avatar/hub.mender.io/mirzak/32/2056_2.png) [@mirzak](https://hub.mender.io/u/mirzak)\
**Post date:** [May 23, 2019, 12:21pm UTC](https://hub.mender.io/t/api-management-v2-devauth-devices-not-showing-all-devices-in-pending-status/616/4 "2019-05-23T12:21:10Z")

</div>

How many devices do you have? The response is paginated and the default shows “page 1” and only showing 20 devices per page.

---

<div class="post-metadata">

**Author:** ![mirzak](https://yyz2.discourse-cdn.com/flex036/user_avatar/hub.mender.io/mirzak/32/2056_2.png) [@mirzak](https://hub.mender.io/u/mirzak)\
**Post date:** [May 23, 2019, 12:23pm UTC](https://hub.mender.io/t/api-management-v2-devauth-devices-not-showing-all-devices-in-pending-status/616/5 "2019-05-23T12:23:06Z")

</div>

You should also be able to do something like,

[https://mender.privacyhero.com/api/management/v2/devauth/devices?status=pending](https://mender.privacyhero.com/api/management/v2/devauth/devices?status=pending)

---

<div class="post-metadata">

**Author:** ![kbantoft](https://avatars.discourse-cdn.com/v4/letter/k/ea5d25/32.png) [@kbantoft](https://hub.mender.io/u/kbantoft)\
**Post date:** [May 23, 2019, 1:46pm UTC](https://hub.mender.io/t/api-management-v2-devauth-devices-not-showing-all-devices-in-pending-status/616/6 "2019-05-23T13:46:35Z")

</div>

That did the trick… it was pagination, so I adjusted my calls and all good.

Thanks for the fast replies!
