# Curl response empty information

**URL:** <https://forum.genieacs.com/t/curl-response-empty-information/6501>\
**Category:** Uncategorized\
**Created:** [February 13, 2025, 5:14pm UTC](https://forum.genieacs.com/t/curl-response-empty-information/6501 "2025-02-13T17:14:07Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![ahm012](https://avatars.discourse-cdn.com/v4/letter/a/58f4c7/32.png) [@ahm012](https://forum.genieacs.com/u/ahm012)\
**Post date:** [February 13, 2025, 5:14pm UTC](https://forum.genieacs.com/t/curl-response-empty-information/6501/1 "2025-02-13T17:14:07Z")

</div>

Hi guys, just trying to learn about the use of curl and how to prepare de URL.

If I run this command:  
curl -i ‘htt://localhost:7557/devices’ it works perfect and show the information of all devices.

going to query a specific device, I try e.g.:  
curl -i ‘[http://localhost:7557/devices/?query={“\_id”%3A"DCBB96-FD-HG8421C-485754439613CA40"}&projection=\_tags](http://localhost:7557/devices/?query=%7B%22_id%22%3A%22DCBB96-FD%2DHG8421C-485754439613CA40%22%7D&projection=_tags)’

I get and OK connection but empty response when I actually added a tag to the device.  
HTTP/1.1 200 OK  
GenieACS-Version: 1.2.13+240606fc80  
Content-Type: application/json  
total: 0  
Date: Thu, 13 Feb 2025 17:11:10 GMT  
Connection: keep-alive  
Keep-Alive: timeout=5  
Transfer-Encoding: chunked  
[  
]

Here is the output of the query for all devices (I have only one)  
,“\_tags”:[“acl”]},

Similar when trying other type of query…any idea?? Haven’t found much information about this…

Thanks in advance!!!  
Regards,  
Hernan.-

---

<div class="post-metadata">

**Author:** ![dustin](https://avatars.discourse-cdn.com/v4/letter/d/5daacb/32.png) [@dustin](https://forum.genieacs.com/u/dustin)\
**Post date:** [February 13, 2025, 5:30pm UTC](https://forum.genieacs.com/t/curl-response-empty-information/6501/2 "2025-02-13T17:30:36Z")

</div>

Here is what works for me:

My device ID: CCBE59-ENT-CXNK0051A85D

```auto
curl -i "http://localhost:7557/devices/?query=%7B%22_id%22%3A%22CCBE59-ENT-CXNK0051A85D%22%7D&projection=_tags"

```

---

<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:** [February 13, 2025, 6:09pm UTC](https://forum.genieacs.com/t/curl-response-empty-information/6501/3 "2025-02-13T18:09:24Z")

</div>

As @dustin eluded to, the query param needs to be URL encoded.

---

<div class="post-metadata">

**Author:** ![ahm012](https://avatars.discourse-cdn.com/v4/letter/a/58f4c7/32.png) [@ahm012](https://forum.genieacs.com/u/ahm012)\
**Post date:** [February 14, 2025, 12:30pm UTC](https://forum.genieacs.com/t/curl-response-empty-information/6501/4 "2025-02-14T12:30:30Z")

</div>

> [@dustin](#):
>
> ```auto
> curl -i "http://localhost:7557/devices/?query=%7B%22_id%22%3A%22CCBE59-ENT-CXNK0051A85D%22%7D&projection=_tags"
> 
> ```

My Devce ID: DCBB96-FD%2DHG8421C-485754439613CA40

 ![Captura de pantalla 2025-02-14 092931](https://canada1.discourse-cdn.com/flex035/uploads/genieacs/original/2X/c/c14025558eedb72225b1dc0e9be80a67864e891e.jpeg)

acsgenie@acsgenie2:~$ curl -i “[http://localhost:7557/devices/?query={“\_id”%3A"DCBB96-FD-HG8421C-485754439613CA40"}&projection=\_tags](http://localhost:7557/devices/?query=%7B%22_id%22%3A%22DCBB96-FD%2DHG8421C-485754439613CA40%22%7D&projection=_tags)”  
HTTP/1.1 200 OK  
GenieACS-Version: 1.2.13+240606fc80  
Content-Type: application/json  
total: 0  
Date: Fri, 14 Feb 2025 12:24:58 GMT  
Connection: keep-alive  
Keep-Alive: timeout=5  
Transfer-Encoding: chunked

[

]  
Strange isn’t it?

---

<div class="post-metadata">

**Author:** ![dustin](https://avatars.discourse-cdn.com/v4/letter/d/5daacb/32.png) [@dustin](https://forum.genieacs.com/u/dustin)\
**Post date:** [February 14, 2025, 12:55pm UTC](https://forum.genieacs.com/t/curl-response-empty-information/6501/5 "2025-02-14T12:55:06Z")

</div>

I think it’s because of the %2D in your DeviceID

Try this url instead:

```auto
curl -i "http://localhost:7557/devices/?query=%7B%22_id%22%3A%22DCBB96-FD%252DHG8421C-485754439613CA40%22%7D&projection=_tags"

```

---

<div class="post-metadata">

**Author:** ![ahm012](https://avatars.discourse-cdn.com/v4/letter/a/58f4c7/32.png) [@ahm012](https://forum.genieacs.com/u/ahm012)\
**Post date:** [February 14, 2025, 1:33pm UTC](https://forum.genieacs.com/t/curl-response-empty-information/6501/6 "2025-02-14T13:33:51Z")

</div>

> [@dustin](#):
>
> `%25`

Got it working now!!!  
Thanks a lot !!!

---

<div class="post-metadata">

**Author:** ![dustin](https://avatars.discourse-cdn.com/v4/letter/d/5daacb/32.png) [@dustin](https://forum.genieacs.com/u/dustin)\
**Post date:** [February 14, 2025, 1:34pm UTC](https://forum.genieacs.com/t/curl-response-empty-information/6501/7 "2025-02-14T13:34:58Z")

</div>

👍
