Is there a way to actually *delete* existing attachments on ticket comments based on a search?
By delete, I mean delete, not “redact”. I mean using the API to run a search that has “has_attachment:true” included as part of its its query, then perform an action on the results such that if you were to subsequently run that same search with the same parameters, it would not return those results any longer, because you had deleted all of the attachments that were attached? I've been asked to write a script to automatically remove attachments on old, closed cases (as a retention policy - but not delete the tickets), and given the existence of the "DELETE /api/v2/uploads/{token}" endpoint, I had assumed this would be easy enough, until I actually got to that point, and realized that the {token} referenced by that api call is not the same as the attachment's id, and if I'm understanding correctly, may only be available if your script had itself just uploaded the attachment? Is there any way to get that token for an existing attachment, or any other way to