ACS API find a device by its SN

Hello,
I’m trying to locate the ONT device using GenieACS api and its serial number. I’m testing this query using curl and my attempt looks like this:

curl -i 'http://localhost:7557/devices/?query=%7B%22DeviceID.SerialNumber%22%3A%22485754438F8B9CAC%22%7D'

My serial number is: 485754438F8B30AC

Thanks in advance for your help

Hi,

You say that you SN is: 485754438F8B30AC, but in your query you’re using 485754438F8B9CAC

What’s the error your’re getting?

My bad, but i have ONT with this serial number too.

This is output of curl:

HTTP/1.1 200 OK
GenieACS-Version: 1.2.9+20220822165235
Content-Type: application/json
total: 0
Date: Fri, 05 Apr 2024 14:13:38 GMT
Connection: keep-alive
Keep-Alive: timeout=5
Transfer-Encoding: chunked


I was expecting a JSON with detailed information about the ONT device.
I am also sending a screenshot that I really use these SNs
SN_genie

I’ve tried too and get just an empty array, but when search by _id it works.

You are querying on the wrong parameter name. Its someone unintuitive.

When using the NBI, the ids are slightly different.

_deviceId._Manufacturer
_deviceId._OUI
_deviceId._ProductClass
_deviceId._SerialNumber

curl 'https://localhost:7557/devices/?query=%7B%22_deviceId._SerialNumber%22%3A%22485754438F8B30AC%22%7D'
2 Likes

Yes, this works! Thank you very much for the information.