Attachments per ticket via the API | Community
Skip to main content

Attachments per ticket via the API

  • February 22, 2017
  • 3 replies
  • 0 views

Hi,

It seems it's not possible to grab attachments info per ticket via the API. For example, this GET request:

https://{subdomain}.zendesk.com/api/v2/tickets/{ticket id}/

returns single ticket info. Using side-loading we can also get users info. There's no support for grabbing the attachments programmatically (per ticket).

The attachments API doesn't seem to provide any connection with the respective ticket. Even if I use an app to get the id, as it was suggested by Zendesk support, there's still no connection to the ticket, or how it could be used within the API.

Am I missing something? Is there a workaround?

Kind Regards,
Stef

 

This topic has been closed for replies.

3 replies

  • June 15, 2017

@Stef Were you able to figure it out? I am trying to download all attachments via API. 


  • Author
  • July 5, 2017

Hey Shobhit,

Partly. You can get the attachments via the comments endpoint (/api/v2/tickets/{id}/comments.json) and parse / iterate accordingly.

You could develop your own middleware endpoint to do the following:

- Grab all comments via the Zendesk API
- Iterate through all the comments
- Per comment, iterate through the attachments
- Push attachment details into your data structure
- Return the attachments data structure

Hope this helps.


  • July 5, 2017

Thanks @Stef. That's what we ended up doing.