Deleting tickets with attachments via API



Posted Dec 04, 2023

Do I need to make a separate call to delete the attachments on a ticket or will

  • DELETE /api/v2/tickets/destroy_many?ids={ids}
  • DELETE /api/v2/deleted_tickets/destroy_many?ids={ids}

take care of everything?

I don't want to end up with any orphan attachments.


0

1

1 comment

Hi Carlos! I'm surprised that we didn't have this clearly documented anywhere, although we do have a bit of a blurb about it in our GDPR documentation. It's not a complete answer, since your question is about soft deleting, but the good news is that 30 days after a soft delete, the ticket is permanently deleted, which would also delete the attachment permanently.

In the short-term, I did some testing to see if the attachment was deleted after a soft delete. From a user perspective, I receive the same 401 unauthorized error to the specific attachment after a soft and hard delete. From a db perspective, I can't say for certain on the soft delete side, but it will definitely be removed when the ticket is permanently deleted as documented in our GDPR doc above.

Hope that helps, let me know if you have questions!

0


Sign in to leave a comment.

Didn't find what you're looking for?

New post