Rest Attachments » History » Version 1
Jean-Philippe Lang, 2011-07-18 23:02
1 | 1 | Jean-Philippe Lang | h1. Attachments |
---|---|---|---|
2 | |||
3 | h2. /attachments/:id.:format |
||
4 | |||
5 | h3. GET |
||
6 | |||
7 | Returns the description of the attachment of given id. |
||
8 | The file can actually be downloaded at the URL given by the @content_url@ attribute in the response. |
||
9 | |||
10 | +Example+: |
||
11 | |||
12 | <pre> |
||
13 | GET /attachments/13.xml |
||
14 | </pre> |
||
15 | |||
16 | +Response+: |
||
17 | |||
18 | <pre> |
||
19 | <attachment> |
||
20 | <id>6243</id> |
||
21 | <filename>test.txt</filename> |
||
22 | <filesize>124</filesize> |
||
23 | <content_type>text/plain</content_type> |
||
24 | <description>This is an attachment</description> |
||
25 | <content_url>http://localhost:3000/attachments/download/6243/test.txt</content_url> |
||
26 | <author name="Jean-Philippe Lang" id="1"/> |
||
27 | <created_on>2011-07-18T22:58:40+02:00</created_on> |
||
28 | </attachment> |
||
29 | </pre> |
||
30 | |||
31 | |||
32 | 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@. |