Proper encoding of '[' for api search query

Infos:

  • Used Zammad version: 6.2.0-1708531224.35d8b344.jammy
  • Used Zammad installation type: package
  • Operating system: Ubuntu 22.04 LTS

I have a client whose email system will include “[EXTERNAL]” in the subject line when emailing outside of their domain. I’m having a hard time figuring out how to encode the square brackets when including in an API ticket search query. I have tried “%5BEXTERNAL%5D” and “[EXTERNAL]” but get no results returned. I’m specifically searching against the ticket title and have stripped down my testing to a curl call via cli. Any guidance would be appreciated!

curl -k -H "Authorization: Token token=<myToken>" "https://<myZammadURL>/api/v1/tickets/search?query=title:%5BEXTERNAL%5D"
1 Like

Hi @stecca21.

curl --location --request GET 'https://<Zammad URL>/api/v1/search?query=title%3A%5C%5BEXTERNAL%5C%5D' --header 'Content-Type: application/json' --header 'Authorization: <Authorization information>'

Escaping and encoding…got it!

1 Like

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