getAttachmentsForRequest method

Future<PagedDTOAttachmentDTO> getAttachmentsForRequest({
  1. required String issueIdOrKey,
  2. int? start,
  3. int? limit,
})

This method returns all the attachments for a customer requests.

Permissions required: Permission to view the customer request.

Response limitations: Customers will only get a list of public attachments.

Implementation

Future<PagedDTOAttachmentDTO> getAttachmentsForRequest(
    {required String issueIdOrKey, int? start, int? limit}) async {
  return PagedDTOAttachmentDTO.fromJson(await _client.send(
    'get',
    'rest/servicedeskapi/request/{issueIdOrKey}/attachment',
    pathParameters: {
      'issueIdOrKey': issueIdOrKey,
    },
    queryParameters: {
      if (start != null) 'start': '$start',
      if (limit != null) 'limit': '$limit',
    },
  ));
}