[Feature request] query API by Custom Identity

Currently, Mender allows assigning every device a custom unique identifier (e.g. mac, SKU etc). However, current API does not allow to use this custom ID (for example, we use macs) to find devices, create deployments, etc. You’ll need to use mender’s device id for that.

It wouldn’t be a problem if there was an API that would allow figuring out mender device ID from custom ID. But there’s no such API. Instead, you’ll have to query ALL devices via api/management/v2/devauth/devices and parse the output. This is frustrating, in particular if there are more than 500 devices (as you can’t query more than 500 devices per page)



thanks for trying Mender!
the advance searching and filtering are features that are on the road map for nearest future.
Could you propose how would you like the API to look? what urls and parameters would you see to fit your need?


I’m not the OP but I’d also love this feature. Without it, it makes 90% of the things you’d want to do with the API quite difficult.

In terms of how the API should look - as a start, I’d be happy if there was an extra API that allowed you to get the ‘Mender ID’ from your custom unique ID. So that you can then use this unique ID to do anything else you’d like to do with the device (move it to a group, start a deployment, etc.).

Long term I’d like all APIs that accept an ID to work with a custom unique ID.

1 Like

Totally agree with @samlewis, having API that would allow resolving mender ID(s) from custom ID(s) would work for beginning.
At best, every API that accepts or returns Mender ID should also accept/return Custom ID.

I am trying to automate the pre-authorisation and then applying a deployment to a device . Being able to find the mender ID of the device from the identity data i just pre-authorised it with would make things much easier.