# ACS API find a device by its SN

**URL:** <https://forum.genieacs.com/t/acs-api-find-a-device-by-its-sn/5278>\
**Category:** Uncategorized\
**Created:** [April 5, 2024, 2:25pm UTC](https://forum.genieacs.com/t/acs-api-find-a-device-by-its-sn/5278 "2024-04-05T14:25:34Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![cesanek](https://avatars.discourse-cdn.com/v4/letter/c/b2d939/32.png) [@cesanek](https://forum.genieacs.com/u/cesanek)\
**Post date:** [April 5, 2024, 2:25pm UTC](https://forum.genieacs.com/t/acs-api-find-a-device-by-its-sn/5278/1 "2024-04-05T14:25:34Z")

</div>

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:

```auto
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

---

<div class="post-metadata">

**Author:** ![Felipe](https://yyz1.discourse-cdn.com/flex035/user_avatar/forum.genieacs.com/felipe/32/1949_2.png) [@Felipe](https://forum.genieacs.com/u/Felipe)\
**Post date:** [April 5, 2024, 3:35pm UTC](https://forum.genieacs.com/t/acs-api-find-a-device-by-its-sn/5278/2 "2024-04-05T15:35:44Z")

</div>

Hi,

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

What’s the error your’re getting?

---

<div class="post-metadata">

**Author:** ![cesanek](https://avatars.discourse-cdn.com/v4/letter/c/b2d939/32.png) [@cesanek](https://forum.genieacs.com/u/cesanek)\
**Post date:** [April 5, 2024, 3:59pm UTC](https://forum.genieacs.com/t/acs-api-find-a-device-by-its-sn/5278/3 "2024-04-05T15:59:03Z")

</div>

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

This is output of curl:

```auto
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](https://canada1.discourse-cdn.com/flex035/uploads/genieacs/original/2X/b/b8eed0b55a87d680ba8958dccd8a6a6ec56f9777.png)

---

<div class="post-metadata">

**Author:** ![Felipe](https://yyz1.discourse-cdn.com/flex035/user_avatar/forum.genieacs.com/felipe/32/1949_2.png) [@Felipe](https://forum.genieacs.com/u/Felipe)\
**Post date:** [April 5, 2024, 5:19pm UTC](https://forum.genieacs.com/t/acs-api-find-a-device-by-its-sn/5278/4 "2024-04-05T17:19:39Z")

</div>

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

---

<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:** [April 5, 2024, 5:20pm UTC](https://forum.genieacs.com/t/acs-api-find-a-device-by-its-sn/5278/5 "2024-04-05T17:20:47Z")

</div>

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`

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

```

---

<div class="post-metadata">

**Author:** ![cesanek](https://avatars.discourse-cdn.com/v4/letter/c/b2d939/32.png) [@cesanek](https://forum.genieacs.com/u/cesanek)\
**Post date:** [April 8, 2024, 6:42am UTC](https://forum.genieacs.com/t/acs-api-find-a-device-by-its-sn/5278/7 "2024-04-08T06:42:40Z")

</div>

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