getAttachmentContent method
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:
- Browse projects project permission for the project that the issue is in.
- If issue-level security is configured, issue-level security permission to view the issue.
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',
},
);
}