Ticket retrieval API


  • Used Zammad version: 5.4.1
  • Used Zammad installation type: (source, package, docker-compose, …)
  • Operating system: Ubuntu
  • Browser + version:

I’ve been researching through github on a solution to query tickets in a certain group but cannot get the syntax correctly nor do I know if it is feasible. I apologize for my ignorance regarding this topic.

I am attempting to query all tickets that are open and/or new that are older than 30 days for a specific group. I have not come very far along with figuring it out, the documentation is unclear to me as to how to chain the search queries together in a fashion that would produce the desired results.

Just getting a dump of the tickets for a specific group would be valuable as I can parse the json afterwards.

Thus far my only command that has not produced [] or zero tickets:

curl -k -H “Authorization: Token token=MYTOKEN” “https://zammad.example.com/api/v1/tickets/search?query=IT&expand

This output seems to give me a JSON format of our customers. I am looking to get tickets from IT that are older than 30 days.

Once again I apologize if I didn’t do my due diligence in researching this problem but I could only find a few github posts that led me to nothing.

If anyone has experience with this and could help understand how I am going about this incorrectly. As mentioned previously I would be happy if I could just curl all IT tickets and then parse them in python for age and state.

Thank you for your consideration, have a wonderful day.

EDIT: Wanted to add token perms admin, admin.api, ticket.agent. This is under my Administrator profile that is an agent in the group in question.