# Cannot find device by its ID

**URL:** <https://forum.genieacs.com/t/cannot-find-device-by-its-id/1133>\
**Category:** Uncategorized\
**Created:** [October 15, 2020, 10:09am UTC](https://forum.genieacs.com/t/cannot-find-device-by-its-id/1133 "2020-10-15T10:09:37Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![sruthy1391](https://yyz1.discourse-cdn.com/flex035/user_avatar/forum.genieacs.com/sruthy1391/32/311_2.png) [@sruthy1391](https://forum.genieacs.com/u/sruthy1391)\
**Post date:** [October 15, 2020, 10:09am UTC](https://forum.genieacs.com/t/cannot-find-device-by-its-id/1133/1 "2020-10-15T10:09:37Z")

</div>

I have device connected to GenieACS and its id and deviceID is fetched as shown  
{"\_id":“088039-XY2-XXXXEMULATOR%2D0800279F6B77”,"\_deviceId":{"\_Manufacturer":“Xxxx”,"\_OUI":“088039”,"\_ProductClass":“XY2”,"\_SerialNumber":“XXXXEMULATOR-0800279F6B77”}

But when below query executed, response is “No such device”.

curl -i 'http://localhost:7557/devices/?query=%7B%22\_id%22%3A%22088039-XY2-XXXXEMULATOR%2D0800279F6B77%22%7D'

How can query using id to get parameter values?

---

<div class="post-metadata">

**Author:** ![akcoder](https://yyz1.discourse-cdn.com/flex035/user_avatar/forum.genieacs.com/akcoder/32/11_2.png) [@akcoder](https://forum.genieacs.com/u/akcoder)\
**Post date:** [October 15, 2020, 4:14pm UTC](https://forum.genieacs.com/t/cannot-find-device-by-its-id/1133/2 "2020-10-15T16:14:30Z")

</div>

You need to encode the DeviceID.  
This:  
`curl -i 'http://localhost:7557/devices/?query=%7B%22_id%22%3A%22088039-XY2-XXXXEMULATOR%2D0800279F6B77%22%7D'`  
Should be  
`curl -i 'http://localhost:7557/devices/?query=%7B%22_id%22%3A%22088039-XY2-XXXXEMULATOR%252D0800279F6B77%22%7D'`

---

<div class="post-metadata">

**Author:** ![sruthy1391](https://yyz1.discourse-cdn.com/flex035/user_avatar/forum.genieacs.com/sruthy1391/32/311_2.png) [@sruthy1391](https://forum.genieacs.com/u/sruthy1391)\
**Post date:** [October 16, 2020, 6:35am UTC](https://forum.genieacs.com/t/cannot-find-device-by-its-id/1133/3 "2020-10-16T06:35:21Z")

</div>

Thank you @akcoder. That saved my day!
