expandAttachmentForMachines method
Returns the metadata for the contents of an attachment, if it is an archive. For example, if the attachment is a ZIP archive, then information about the files in the archive is returned. Currently, only the ZIP archive format is supported.
Use this operation if you are processing the data without presenting it to the user, as this operation only returns the metadata for the contents of the attachment. Otherwise, to retrieve data to present to the user, use Get all metadata for an expanded attachment which also returns the metadata for the attachment itself, such as the attachment's ID and name.
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<AttachmentArchiveImpl> expandAttachmentForMachines(String id) async {
return AttachmentArchiveImpl.fromJson(await _client.send(
'get',
'rest/api/3/attachment/{id}/expand/raw',
pathParameters: {
'id': id,
},
));
}