expandAttachmentForHumans method
Returns the metadata for the contents of an attachment, if it is an archive, and metadata for the attachment itself. For example, if the attachment is a ZIP archive, then information about the files in the archive is returned and metadata for the ZIP archive. Currently, only the ZIP archive format is supported.
Use this operation to retrieve data that is presented to the user, as this operation returns the metadata for the attachment itself, such as the attachment's ID and name. Otherwise, use Get contents metadata for an expanded attachment, which only returns the metadata for the attachment's contents.
This operation can be accessed anonymously.
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<AttachmentArchiveMetadataReadable> expandAttachmentForHumans(
String id) async {
return AttachmentArchiveMetadataReadable.fromJson(await _client.send(
'get',
'rest/api/3/attachment/{id}/expand/human',
pathParameters: {
'id': id,
},
));
}