How to track changes in ticket_audits? | Community
Skip to main content

How to track changes in ticket_audits?

  • September 29, 2022
  • 5 replies
  • 0 views

Aleksandr11

Hello

We would like to get the history of all ticket audit events and keep up with new changes.

There is an endpoint that lists all ticket_audits:

(GET /api/v2/ticket_audits)
But it has an issue that it doesn't include archived tickets.

Also there is a ticket based endpoint:
(GET /api/v2/tickets/{ticket_id}/audits) 
It get ticket audits per ticket (archived ones as well), but it is not suitable for keeping up with the new events(audits) on a ticket. 

 

And there doesn't seem to be an incremental API endpoint that would allow to keep up with new changes with ticket audits. 

So is there currently a possibility to load the whole history  (archived tickets as well) and to keep up the new audit events?


Any response is appreciated. Thanks

5 replies

Tipene
  • October 4, 2022
Hey, Aleksandr!
 
There is the Incremental Ticket Event Export endpoint that may be helpful for your use case:

https://developer.zendesk.com/api-reference/ticketing/ticket-management/incremental_exports/#incremental-ticket-event-export

If not, let me know in a bit more detail what your workflow looks like and we can try and find an alternate solution for you.
 
Thanks!
 
Tipene

Aleksandr11
  • Author
  • October 5, 2022

Hello

Your provided incremental endpoint is for ticket_events only which don't include chat events, where I could see when chat was started and when who joined/left etc. That data is available in following endpoints: 

(GET /api/v2/tickets/{ticket_id}/audits) 
(GET /api/v2/ticket_audits)

under -  events: history

But these endpoints have a problems which I described in my original post. 

So my question still stands on how to get that data incrementally or what would be the best practice in that regard?

 


Tipene
  • October 6, 2022
Hi Aleksandr,
 
You'll need to use the chat incremental export API in conjunction with the ticket event export API to get the data that you need.
 
Hope this helps!
 
Tipene

Danit
  • June 5, 2024

the main reason why I need to access GET /api/v2/tickets/{ticket_id}/audits is because on ticket events with comments and ticket events api endpoints I cannot see the live chat messages per event (I get bukj of messages in one event with only the name of the correspondents without id) how can I get this relevant info without generating api request per ticket and also load it incrementally by date?


Greg29
  • June 10, 2024
Hi Danit! Since the native chat functionality does not populate into the ticket until the conversation is finished, there is no way to populate this as individual events during the conversation.