getAttachmentThumbnail method

Future<Map<String, dynamic>> getAttachmentThumbnail({
  1. required String id,
  2. bool? redirect,
  3. bool? fallbackToDefault,
  4. int? width,
  5. int? height,
})

Returns the thumbnail of an attachment.

To return the attachment contents, use Get attachment content.

This operation can be accessed anonymously.

Permissions required: For the issue containing the attachment:

Implementation

Future<Map<String, dynamic>> getAttachmentThumbnail(
    {required String id,
    bool? redirect,
    bool? fallbackToDefault,
    int? width,
    int? height}) async {
  return await _client.send(
    'get',
    'rest/api/3/attachment/thumbnail/{id}',
    pathParameters: {
      'id': id,
    },
    queryParameters: {
      if (redirect != null) 'redirect': '$redirect',
      if (fallbackToDefault != null)
        'fallbackToDefault': '$fallbackToDefault',
      if (width != null) 'width': '$width',
      if (height != null) 'height': '$height',
    },
  ) as Map<String, Object?>;
}