Hello, I need to delete many tickets on Zendesk.
Here are the endpoints :
Delete Ticket
DELETE /api/v2/tickets/{ticket_id}
Bulk Delete Tickets
DELETE /api/v2/tickets/destroy_many?ids={ids}
Accepts a comma-separated list of up to 100 ticket ids.
I do have a list of 7000 IDs that I would like to process in chunks of 100 because that’s the limit, if I use the second option. But I was just thinking if it existed an option where I can “load” somewhere my 700 IDs and requests would work in a loop for all the IDs.
Ive tried adding in the environment a variable with a json specifying all the IDs + a pre-request script, I see all chunks of ticket ids (69 chunks) on the console, but only the last chunk seems to be processed and deleted. Could you help me trouble shooting that issue or tell me if there is an easier way to do it ?
I’ve attached the json body of my pre-request script + image of environment + image of console after request