Skip to content

Retrieves a ticket attachment by its ID

Request

Security
oauth2
Path
ticketIdstring, (uuid)required

Ticket Id.

attachmentIdstring, (uuid)required

Attachment Id.

const ticketId = 'YOUR_ticketId_PARAMETER';
const attachmentId = 'YOUR_attachmentId_PARAMETER';
const instance = 'YOUR_instance_PARAMETER';
const resp = await fetch(
  `https://${instance}.app.willowinc.com/api/v3/tickets/${ticketId}/attachments/${attachmentId}`,
  {
    method: 'GET',
    headers: {
      Authorization: 'Bearer <YOUR_TOKEN_HERE>'
    }
  }
);

const data = await resp.text();
console.log(data);

Responses

The contents of the file.

Bodyapplication/json
fileContentsstring, (byte)
contentTypenull or string
fileDownloadNamenull or string
lastModifiednull or string, (date-time)
entityTagobject or EntityTagHeaderValue (object)
One of:
enableRangeProcessingboolean
Response
{ "fileContents": "string", "contentType": null, "fileDownloadName": null, "lastModified": null, "entityTag": { "property1": null, "property2": null }, "enableRangeProcessing": true }