public class AttachmentApi extends Object
| Constructor and Description |
|---|
AttachmentApi(org.everit.http.restclient.RestClient restClient) |
| Modifier and Type | Method and Description |
|---|---|
io.reactivex.Single<AttachmentArchiveMetadataReadable> |
expandAttachmentForHumans(String id,
Optional<org.everit.http.restclient.RestRequestEnhancer> restRequestEnhancer)
Get all metadata for an expanded attachment
Returns the metadata for the contents of an attachment, if it is an archive, and metadata for the attachment itself.
|
io.reactivex.Single<AttachmentArchiveImpl> |
expandAttachmentForMachines(String id,
Optional<org.everit.http.restclient.RestRequestEnhancer> restRequestEnhancer)
Get contents metadata for an expanded attachment
Returns the metadata for the contents of an attachment, if it is an archive.
|
io.reactivex.Single<AttachmentMetadata> |
getAttachment(String id,
Optional<org.everit.http.restclient.RestRequestEnhancer> restRequestEnhancer)
Get attachment metadata
Returns the metadata for an attachment.
|
io.reactivex.Single<AttachmentSettings> |
getAttachmentMeta(Optional<org.everit.http.restclient.RestRequestEnhancer> restRequestEnhancer)
Get Jira attachment settings
Returns the attachment settings, that is, whether attachments are enabled and the maximum attachment size allowed.
|
io.reactivex.Completable |
removeAttachment(String id,
Optional<org.everit.http.restclient.RestRequestEnhancer> restRequestEnhancer)
Delete attachment
Deletes an attachment from an issue.
|
public AttachmentApi(org.everit.http.restclient.RestClient restClient)
public io.reactivex.Single<AttachmentArchiveMetadataReadable> expandAttachmentForHumans(String id, Optional<org.everit.http.restclient.RestRequestEnhancer> restRequestEnhancer)
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:
id - The ID of the attachment.
(required)restRequestEnhancer - Adds the possibility to modify the rest request before sending out. This can be useful to add authorizations tokens for example.
public io.reactivex.Single<AttachmentArchiveImpl> expandAttachmentForMachines(String id, Optional<org.everit.http.restclient.RestRequestEnhancer> restRequestEnhancer)
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:
id - The ID of the attachment.
(required)restRequestEnhancer - Adds the possibility to modify the rest request before sending out. This can be useful to add authorizations tokens for example.
public io.reactivex.Single<AttachmentMetadata> getAttachment(String id, Optional<org.everit.http.restclient.RestRequestEnhancer> restRequestEnhancer)
Returns the metadata for an attachment. Note that the attachment itself is not returned.
This operation can be accessed anonymously.
Permissions required:
id - The ID of the attachment.
(required)restRequestEnhancer - Adds the possibility to modify the rest request before sending out. This can be useful to add authorizations tokens for example.
public io.reactivex.Single<AttachmentSettings> getAttachmentMeta(Optional<org.everit.http.restclient.RestRequestEnhancer> restRequestEnhancer)
Returns the attachment settings, that is, whether attachments are enabled and the maximum attachment size allowed.
Note that there are also project permissions that restrict whether users can create and delete attachments.
This operation can be accessed anonymously.
Permissions required: None.
restRequestEnhancer - Adds the possibility to modify the rest request before sending out. This can be useful to add authorizations tokens for example.
public io.reactivex.Completable removeAttachment(String id, Optional<org.everit.http.restclient.RestRequestEnhancer> restRequestEnhancer)
Deletes an attachment from an issue.
This operation can be accessed anonymously.
Permissions required: For the project holding the issue containing the attachment:
id - The ID of the attachment.
(required)restRequestEnhancer - Adds the possibility to modify the rest request before sending out. This can be useful to add authorizations tokens for example.
Copyright © 2011–2021 Everit Kft.. All rights reserved.