Ticket Object don't have tagsID

Hi,

I am integrating the Zammad heldesk with my Asp.net application. I am making a dashboard for showing the user stats like weekly tickets, SLA and tickets approaching SLA. For calculating the SLA percentage I need the tag against a ticket. For now I have to send ticket Id for every ticket to get its tag because the ticket object doesn’t have property Tag_Id So I cant filter it by getting the list of tags. So suppose If I have 200 tickets then I have to send individual request for every ticket to get its tag which is too much. So I wonder if there is some solution to that if not then there should be property by name tags_id in the ticket object.

There are different modes in which you can receive the ticket. You could try to use the one which the app uses. This one might provide also additional other related information which you not need but includes the tags:

https://xxx.zammad.com/api/v1/tickets/1?all=true

image

Can I do it for list of tickets like here I am querying the searching EndPoint which gives me list of tickets between a date range e.g

https://xxxxxxxxxxxx/api/v1/tickets/search?query=created_at:[2024-07-19 TO 2024-07-25]&limit=200

I think you can search for tags: https://rolf.zammad.com/api/v1/tickets/search?query=tags:abc but the all=true parameter is only available for the show endpoint.

If you have access directly to the elasticsearch, you could request the elastic search. There the ticket index should also contain the tags in the result.

first of all thank you for your quick responses.

Secondly Yes this will gives me all the tickets against a specific tag but what if there are 1000 tickets against this tag. and zammad allow only 200 objects per request so again I will have to do paging

Example via elastic earch

$ curl -s http://localhost:9200/zammad_production_ticket/_search?q=tags:abc | jq .hits.hits[0]._source.tags
[
  "abc"
]

that solved the issue thank you!

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