public class IssueAttachmentsApi extends Object
| Constructor and Description |
|---|
IssueAttachmentsApi(org.everit.http.restclient.RestClient restClient) |
| Modifier and Type | Method and Description |
|---|---|
io.reactivex.Single<List<Attachment>> |
addAttachment(String issueIdOrKey,
Optional<org.everit.http.restclient.RestRequestEnhancer> restRequestEnhancer)
Add attachment
|
public IssueAttachmentsApi(org.everit.http.restclient.RestClient restClient)
public io.reactivex.Single<List<Attachment>> addAttachment(String issueIdOrKey, Optional<org.everit.http.restclient.RestRequestEnhancer> restRequestEnhancer)
Adds one or more attachments to an issue. Attachments are posted as multipart/form-data (RFC 1867).
Note that:
X-Atlassian-Token: no-check header, if not it is blocked. See Special headers for more information.file.The following example uploads a file called myfile.txt to the issue TEST-123:
curl -D- -u admin:admin -X POST -H "X-Atlassian-Token: no-check" -F "file=@myfile.txt" https://your-domain.atlassian.net/rest/api/3/issue/TEST-123/attachments
Tip: Use a client library. Many client libraries have classes for handling multipart POST operations. For example, in Java, the Apache HTTP Components library provides a MultiPartEntity class for multipart POST operations.
This operation can be accessed anonymously.
Permissions required:
issueIdOrKey - The ID or key of the issue that attachments are added to.
(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–2019 Everit Kft.. All rights reserved.