# API search with " case

**URL:** <https://community.graylog.org/t/api-search-with-case/19040>\
**Category:** Graylog Central (peer support)\
**Created:** [March 9, 2021, 11:42am UTC](https://community.graylog.org/t/api-search-with-case/19040 "2021-03-09T11:42:38Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![lukis](https://avatars.discourse-cdn.com/v4/letter/l/e19b73/32.png) [@lukis](https://community.graylog.org/u/lukis)\
**Post date:** [March 9, 2021, 11:42am UTC](https://community.graylog.org/t/api-search-with-case/19040/1 "2021-03-09T11:42:39Z")

</div>

Hi,  
I am after upgrade to graylog 4.0, and have some troubles exporting logs to CSV, because of changes in API since 2.x. The problem is how to use " in query. In GUI I am able to search logs with: action:tunnel-down AND logdesc:“SSL VPN tunnel down”, unfortunately it doesn’t work with API: “query\_string”: { “type”:“elasticsearch”, “query\_string”:“action:tunnel-down AND logdesc:“SSL VPN tunnel down”” }. As " is special case in API syntax, I am facing this error: Unexpected character (‘S’ (code 83)): was expecting comma to separate Object entries.  
When I am testing query in API browser, then this: logdesc:“SSL VPN tunnel down”" gives desired output, but not in with curl in console.  
How to resolve this?  
Best regards

---

<div class="post-metadata">

**Author:** ![lukis](https://avatars.discourse-cdn.com/v4/letter/l/e19b73/32.png) [@lukis](https://community.graylog.org/u/lukis)\
**Post date:** [March 9, 2021, 2:38pm UTC](https://community.graylog.org/t/api-search-with-case/19040/2 "2021-03-09T14:38:56Z")

</div>

logdesc:\“SSL VPN tunnel down\”" did the trick, topic can be closed.

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex016/uploads/graylog/original/3X/c/7/c7c09c6b5099570133d6502b83f50ba4430de5b6.png) [@system](https://community.graylog.org/u/system)\
**Post date:** [March 23, 2021, 2:39pm UTC](https://community.graylog.org/t/api-search-with-case/19040/3 "2021-03-23T14:39:46Z")

</div>

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.
