I have been trying to get the files attached (or at least the filenames/URLs) to a freshservice ticket using: const response = await client.data.get("ticket");
Getting the ticket is not a problem, but the response object does not contain the attachments: [] like described here: https://developers.freshservice.com/docs/data-methods/#ticket_details_page
How can I get the ticket attachments in my front-end app?
@Thomas_Schick, What you are looking at is the right Data Method.
I just have a couple of questions,
Attachment attribute itself doesn’t appear in the response. Does it happen when the ticket actually doesn’t have an attachment and the app might be expecting an empty array - attachments:"[]"? Or the attribute is absent altogether?
Is it possible to share the code snippet and response you’ve seen? Please feel free to replace any confidential details with dummy values.
Have you tried looking at our version 2 documentation?
Try making a get request with Authorization to https://[domain].freshservice.com/api/v2/tickets/[ticket.id], you should be able to find an array in attachments attribute.
I also am still seeing that the attachment attribute is missing from the freshservice data method for tickets. It is even annotated in the new Freshservice SDK documentation that it should be there.
Can we please get this bug escalated as attachments are a vital piece of information about a ticket, that shouldn’t require an API request to gain access to.
@zach_jones_noel can you help escalated this issue please? Thank you!