getAttachmentContent method

Future getAttachmentContent({
  1. required String issueIdOrKey,
  2. required int attachmentId,
})

Returns the contents of an attachment.

To return a thumbnail of the attachment, use servicedeskapi/request/{issueIdOrKey}/attachment/{attachmentId}/thumbnail.

Permissions required: For the issue containing the attachment:

Implementation

Future<dynamic> getAttachmentContent(
    {required String issueIdOrKey, required int attachmentId}) async {
  return await _client.send(
    'get',
    'rest/servicedeskapi/request/{issueIdOrKey}/attachment/{attachmentId}',
    pathParameters: {
      'issueIdOrKey': issueIdOrKey,
      'attachmentId': '$attachmentId',
    },
  );
}