Retrieving Asset Tags via APISolved

Participant
Discussion
1 day ago

Hey guys, I got some devices in my organization enrolled in Hexnode whose asset tags I want to get. Is it possible to retrieve the asset tag of a device through API calls?

Replies (3)

Marked SolutionPending Review
Participant
1 day ago
Marked SolutionPending Review

@eliiza , definitely. There’s a provision for retrieving the details of an enrolled device using Hexnode API. Just open up a Shell terminal on your device and run the command below,

In the command, in place of Token you need to provide the API token and {Device ID} should be replaced with the device ID in the portal.  

The asset tag of the specific device can be seen at the bottom-most part of the output response received. 

Marked SolutionPending Review
Participant
1 day ago
Marked SolutionPending Review

@luke , that’s great, but how do I get the API token though?

Marked SolutionPending Review
Hexnode Expert
1 day ago
Marked SolutionPending Review

@eliiza , you can get the secret API key from your Hexnode UEM portal. Before using the API key, the API access must be enabled in the portal. Here’s how you can do this, 

  1. Log in to your Hexnode portal. 

  1. Navigate to Admin > API. 

  1. Click Enable, which will enable the API access. 

You can then use the API key listed in the command for authentication. 

For more details, you can refer to the Hexnode docs on retrieving device details using the Hexnode API. 

Save