YouTrack Standalone 2017.1 Help

Import Attachment to an Issue

POST /import/{issue}/attachment

Import attachment, preserve author and created date, don't change issue 'Updated' field.

POST /rest/import/{issue}/attachment?{test}&{authorLogin}&{group}&{created}&{files}


Name Type Description
issue string Issue ID to attach files to.
test boolean If true, attachment won't be saved, but the request will be verified.
authorLogin string Attachment submitter login
group string Attachments visibility group
created instant Attachment creation time
files files List of files to attach to an issue.

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.



POST http://localhost:8081/rest/import/CMN-1917/attachment?authorLogin=gorbachev&created=1149678852000 Cookie: $Version=0; JSESSIONID=1lwgzk0cyvewh832kz9y9hrtw; $Path=/;; $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 200 OK Content-Type: application/xml;charset=UTF-8 Content-Length: 107 Server: Jetty(7.2.0.v20101020) <?xml version="1.0" encoding="UTF-8" standalone="yes"?><importReport><item imported="true"/></importReport>
Last modified: 18 April 2017