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

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?

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”

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 | 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.

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

You should also be able to do something like,

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

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

Thanks for the fast replies!