Recent searches
No recent searches
Backfill Ticket Audits
Posted Nov 29, 2022
Hello,
I am trying to retrieve/backfill all ticket audits for the last 6+ months. I am initially calling this “https://<company>.zendesk.com/api/v2/ticket_audits”. Then for every subsequent call, I have tried both the "before_url" as well as the "after_url" to paginate through the response however I am only able to go back about 10 days and unsure how to move forward. As well as how can I pull this data in daily for that days audits?
How can I backfill all the data in its entirety?
0
1
1 comment
Joe Tinter
The Ticket Audits API shows the full audit history for a ticket. It includes every change to the ticket, including metadata for each update, all field changes, all comment text, etc. It's a complete picture, but it only supports one ticket at a time. This option is helpful if you've identified a subset of tickets (through search or some other resource), and you need to pull detailed information for that list of ticket IDs. It's not efficient for large or ongoing exports.
For large or ongoing exports that include ticket audits, I recommend the Incremental Ticket Events API. The incremental endpoints are designed to deliver lots of raw data as efficiently as possible. The ticket events endpoint returns each event on its own, complete with all changes and metadata. (You have to include the comment_events side-load if you want comment text as well.) This allows you to pull all ticket events in bulk, but you need to reassemble them into tickets separately. The incremental Ticket Events API also allows for cursor based pagination, with an
start_time
in Unix time for your initial request (1648785600
would be April 1, 2022 at 00:00 UTC, if you're looking to start with 6 months ago), and subsequent pages and exports use thecursor
parameter provided to you in the response.I hope this information helps for your request!
0