Cannot find device by its ID

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?

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'

1 Like

Thank you @akcoder. That saved my day!