# How to get this specific attribute from the GET devices API

**URL:** <https://hub.mender.io/t/how-to-get-this-specific-attribute-from-the-get-devices-api/2171>\
**Category:** General Discussions\
**Created:** [July 10, 2020, 4:13am UTC](https://hub.mender.io/t/how-to-get-this-specific-attribute-from-the-get-devices-api/2171 "2020-07-10T04:13:16Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![nishad1092](https://avatars.discourse-cdn.com/v4/letter/n/5fc32e/32.png) [@nishad1092](https://hub.mender.io/u/nishad1092)\
**Post date:** [July 10, 2020, 4:13am UTC](https://hub.mender.io/t/how-to-get-this-specific-attribute-from-the-get-devices-api/2171/1 "2020-07-10T04:13:16Z")

</div>

Hi,

Is there API to get only the description of every id using the GET /devices API.  
FYI: ( I would like to retrieve the id of each device but depending on the “description” )

json:  
[ {  
“id” : “291ae0e5956c69c2267489213df4459d19ed48a806603def19d417d004a4b67e”,  
“attributes” : [ {  
“name” : “ip\_addr”,  
“value” : “1.2.3.4”,  
“description” : “IP address”  
}, {  
“name” : “mac\_addr”,  
“value” : “00.01:02:03:04:05”,  
“description” : “MAC address”  
}, {  
“name” : “ports”,  
“value” : [“8080”, “8081”],  
“description” : “Open ports”  
} ],  
“updated\_ts” : “2016-10-03T16:58:51.639Z”  
}, {  
“id” : “76f40e5956c699e327489213df4459d1923e1a806603def19d417d004a4a3ef”,  
“attributes” : [ {  
“name” : “mac”,  
“value” : “00:01:02:03:04:05”,  
“description” : “MAC address”  
} ],  
“updated\_ts” : “2016-10-04T18:24:21.432Z”  
} ]

---

<div class="post-metadata">

**Author:** ![drewmoseley](https://yyz2.discourse-cdn.com/flex036/user_avatar/hub.mender.io/drewmoseley/32/47_2.png) [@drewmoseley](https://hub.mender.io/u/drewmoseley)\
**Post date:** [July 10, 2020, 2:34pm UTC](https://hub.mender.io/t/how-to-get-this-specific-attribute-from-the-get-devices-api/2171/2 "2020-07-10T14:34:59Z")

</div>

HI @nishad1092 our filtering is available over the API. See [https://docs.mender.io/hosted/apis/enterprise/management-apis/device-inventory-v2](https://docs.mender.io/hosted/apis/enterprise/management-apis/device-inventory-v2) for more details.

---

<div class="post-metadata">

**Author:** ![nishad1092](https://avatars.discourse-cdn.com/v4/letter/n/5fc32e/32.png) [@nishad1092](https://hub.mender.io/u/nishad1092)\
**Post date:** [July 13, 2020, 7:01pm UTC](https://hub.mender.io/t/how-to-get-this-specific-attribute-from-the-get-devices-api/2171/5 "2020-07-13T19:01:50Z")

</div>

It indeed help me alot @drewmoseley, Thank you again…

In the API side, Is there any api to retrieve the latest JWT token from the server?

---

<div class="post-metadata">

**Author:** ![kacf](https://yyz2.discourse-cdn.com/flex036/user_avatar/hub.mender.io/kacf/32/146_2.png) [@kacf](https://hub.mender.io/u/kacf)\
**Post date:** [July 15, 2020, 6:24am UTC](https://hub.mender.io/t/how-to-get-this-specific-attribute-from-the-get-devices-api/2171/6 "2020-07-15T06:24:00Z")

</div>

This should be it: [https://docs.mender.io/hosted/apis/enterprise/management-apis/user-administration-and-authentication#auth-login-post](https://docs.mender.io/hosted/apis/enterprise/management-apis/user-administration-and-authentication#auth-login-post)

---

<div class="post-metadata">

**Author:** ![nishad1092](https://avatars.discourse-cdn.com/v4/letter/n/5fc32e/32.png) [@nishad1092](https://hub.mender.io/u/nishad1092)\
**Post date:** [July 15, 2020, 6:48am UTC](https://hub.mender.io/t/how-to-get-this-specific-attribute-from-the-get-devices-api/2171/7 "2020-07-15T06:48:52Z")

</div>

Hi @kacf ,

Thank you so much, So I guess I can use this to retrieve JWT for using in my API too, but will it retreive JWT Token after it expires in a week time also? I mean, will it auto renew in the process and retrieve the new JWT token, if old is expired

---

<div class="post-metadata">

**Author:** ![kacf](https://yyz2.discourse-cdn.com/flex036/user_avatar/hub.mender.io/kacf/32/146_2.png) [@kacf](https://hub.mender.io/u/kacf)\
**Post date:** [July 15, 2020, 7:04am UTC](https://hub.mender.io/t/how-to-get-this-specific-attribute-from-the-get-devices-api/2171/8 "2020-07-15T07:04:45Z")

</div>

You always get a new JWT token from this end point. The status of the  
old token doesn’t matter.

---

<div class="post-metadata">

**Author:** ![nishad1092](https://avatars.discourse-cdn.com/v4/letter/n/5fc32e/32.png) [@nishad1092](https://hub.mender.io/u/nishad1092)\
**Post date:** [July 15, 2020, 10:54am UTC](https://hub.mender.io/t/how-to-get-this-specific-attribute-from-the-get-devices-api/2171/9 "2020-07-15T10:54:44Z")

</div>

Sure @kacf, I tested it, It works great !! Thank you…
