Attach File to an Issue
POST /issue/{issue}/attachment
Attach file to issue
POST /rest/issue/{issue}/attachment?{group}&{name}&{authorLogin}&{created}&{files}
To define author and creation date 'Low-Level Administration' permission is required.
Files to attach are sent as request body using 'multipart/form-data' content type.
Sample
POST http://localhost:8081/rest/issue/CMN-1917/attachment?authorLogin=webster&created=1149678852000
Content-Length: 7839
Connection: keep-alive
Content-Type: multipart/form-data; boundary=---------------------------7d159c1302d0y0
Cookie: $Version=0; JSESSIONID=1eufd2pvosy59101uv1zr0bi1y; $Path=/; jetbrains.charisma.main.security.PRINCIPAL=NDgxMzQ5NGQxMzdlMTYzMWJiYTMwMWQ1YWNhYjZlN2JiN2FhNzRjZTExODVkNDU2NTY1ZWY1MWQ3Mzc2NzdiMjpyb290; $Path=/
-----------------------------7d159c1302d0y0
Content-Disposition: form-data; name="flag.png"; filename="flag.png"
Content-Type: image/png
Content-Transfer-Encoding: binary
<actual file content, not shown here>
-----------------------------7d159c1302d0y0--
HTTP/1.1 201 Created
Content-Type: application/xml;charset=UTF-8
Location: http://localhost:8081/rest/issue/CMN-1917/attachment/_persistent/flag.png?file=45-50&v=0&c=true
Content-Length: 0
Server: Jetty(6.1.23)
Last modified: 2 February 2017