Jira Cloud API Add attachment

Atlassian - Add attachment

Add one or more attachments to an issue. This resource expects a multipart post. The media-type multipart/form-data is defined in RFC 1867. Most client libraries have classes that make dealing with multipart posts simple. For instance, in Java the Apache HTTP Components library provides a [MultiPartEntity](http://hc.apache.org/httpcomponents-client-ga/httpmime/apidocs/org/apache/http/entity/mime/MultipartEntity.html) that makes it simple to submit a multipart POST. In order to protect against XSRF attacks, because this method accepts multipart/form-data, it has XSRF protection on it. This means you must submit a header of X-Atlassian-Token: no-check with the request, otherwise it will be blocked. The name of the multipart/form-data parameter that contains attachments must be "file" A simple example to upload a file called "myfile.txt" to issue REST-123: curl -D- -u admin:admin -X POST -H "X-Atlassian-Token: no-check" -F "file=@myfile.txt" http://myhost/rest/api/2/issue/TEST-123/attachments

Posted on:

2018-08-27

API Description

Provider

Atlassian

decription

Millions of users globally rely on Atlassian products every day for improving software development, project management, collaboration, and code quality.

Curl command through Streamdata.io

curl -v "https://streamdata.motwin.net/http://api/2/issue/{issueIdOrKey}/attachments?X-Sd-Token={streamdata_token}"



Return to Main Page



Submit Your API

Join the gallery to find out how much you can save with Streamdata.io.