Project

General

Profile

Actions

Rest Attachments » History » Revision 3

« Previous | Revision 3/5 (diff) | Next »
Go MAEDA, 2017-07-12 16:03
PATCH /attachments/:id.:format should be documented.


Attachments

To attach files though the API, please see Attaching files in general topics.

/attachments/:id.:format

GET

Returns the description of the attachment of given id.
The file can actually be downloaded at the URL given by the content_url attribute in the response.

Example:

GET /attachments/13.xml

Response:

<attachment>
  <id>6243</id>
  <filename>test.txt</filename>
  <filesize>124</filesize>
  <content_type>text/plain</content_type>
  <description>This is an attachment</description>
  <content_url>http://localhost:3000/attachments/download/6243/test.txt</content_url>
  <author name="Jean-Philippe Lang" id="1"/>
  <created_on>2011-07-18T22:58:40+02:00</created_on>
</attachment>

Note: when getting an issue through the API, its attachments can also be retrieved in a single request using GET /issues/:id.:format?include=attachments.

PATCH

Updates attachments.

(Not documented yet. See #12181 for details)

Updated by Go MAEDA over 7 years ago · 3 revisions