Rest Issues » History » Version 7
Robert Palmer, 2010-09-13 21:03
| 1 | 1 | Jean-Philippe Lang | h1. Issues |
|---|---|---|---|
| 2 | |||
| 3 | h2. Listing issues |
||
| 4 | |||
| 5 | GET /issues.xml |
||
| 6 | |||
| 7 | 2 | Jean-Philippe Lang | Returns a paginated list of issues. By default, it returns open issues only. |
| 8 | 1 | Jean-Philippe Lang | |
| 9 | +Parameters+: |
||
| 10 | |||
| 11 | * @page@: page number (optional) |
||
| 12 | 2 | Jean-Philippe Lang | |
| 13 | Optional filters: |
||
| 14 | |||
| 15 | * @project_id@: get issues from the project with the given id |
||
| 16 | * @tracker_id@: get issues from the tracker with the given id |
||
| 17 | * @status_id@: get issues with the given status id only (you can use @*@ to get open and closed issues) |
||
| 18 | * ... |
||
| 19 | |||
| 20 | +Examples+: |
||
| 21 | |||
| 22 | <pre> |
||
| 23 | GET /issues.xml |
||
| 24 | GET /issues.xml?project_id=2 |
||
| 25 | GET /issues.xml?project_id=2&tracker_id=1 |
||
| 26 | </pre> |
||
| 27 | 1 | Jean-Philippe Lang | |
| 28 | +Response+: |
||
| 29 | |||
| 30 | <pre> |
||
| 31 | <?xml version="1.0" encoding="UTF-8"?> |
||
| 32 | <issues type="array" count="1640"> |
||
| 33 | 3 | Christoph Witzany | <issue> |
| 34 | <id>4326</id> |
||
| 35 | 1 | Jean-Philippe Lang | <project name="Redmine" id="1"/> |
| 36 | <tracker name="Feature" id="2"/> |
||
| 37 | <status name="New" id="1"/> |
||
| 38 | <priority name="Normal" id="4"/> |
||
| 39 | <author name="John Smith" id="10106"/> |
||
| 40 | <category name="Email notifications" id="9"/> |
||
| 41 | <subject> |
||
| 42 | Aggregate Multiple Issue Changes for Email Notifications |
||
| 43 | </subject> |
||
| 44 | <description> |
||
| 45 | This is not to be confused with another useful proposed feature that |
||
| 46 | would do digest emails for notifications. |
||
| 47 | </description> |
||
| 48 | <start_date>2009-12-03</start_date> |
||
| 49 | <due_date></due_date> |
||
| 50 | <done_ratio>0</done_ratio> |
||
| 51 | <estimated_hours></estimated_hours> |
||
| 52 | <custom_fields> |
||
| 53 | <custom_field name="Resolution" id="2">Duplicate</custom_field> |
||
| 54 | <custom_field name="Texte" id="5">Test</custom_field> |
||
| 55 | <custom_field name="Boolean" id="6">1</custom_field> |
||
| 56 | <custom_field name="Date" id="7">2010-01-12</custom_field> |
||
| 57 | </custom_fields> |
||
| 58 | <created_on>Thu Dec 03 15:02:12 +0100 2009</created_on> |
||
| 59 | <updated_on>Sun Jan 03 12:08:41 +0100 2010</updated_on> |
||
| 60 | </issue> |
||
| 61 | 3 | Christoph Witzany | <issue> |
| 62 | <id>4325</id> |
||
| 63 | 1 | Jean-Philippe Lang | ... |
| 64 | </issue> |
||
| 65 | </issues> |
||
| 66 | </pre> |
||
| 67 | |||
| 68 | h2. Showing an issue |
||
| 69 | |||
| 70 | GET /issues/[id].xml |
||
| 71 | |||
| 72 | h2. Creating an issue |
||
| 73 | |||
| 74 | 5 | Damien Churchill | h3. Using XML |
| 75 | |||
| 76 | 1 | Jean-Philippe Lang | POST /issues.xml |
| 77 | 7 | Robert Palmer | <?xml version="1.0"?> |
| 78 | <issue> |
||
| 79 | <subject>Example</subject> |
||
| 80 | <priority_id>4</priority_id> |
||
| 81 | </issue> |
||
| 82 | |||
| 83 | |||
| 84 | |||
| 85 | 1 | Jean-Philippe Lang | |
| 86 | 5 | Damien Churchill | h3. Using JSON |
| 87 | |||
| 88 | POST /issues.json |
||
| 89 | { |
||
| 90 | "issue": { |
||
| 91 | "project_id": "example", |
||
| 92 | "subject": "Test issue" |
||
| 93 | } |
||
| 94 | } |
||
| 95 | |||
| 96 | |||
| 97 | 1 | Jean-Philippe Lang | h2. Updating an issue |
| 98 | |||
| 99 | 5 | Damien Churchill | h3. Using XML |
| 100 | |||
| 101 | 1 | Jean-Philippe Lang | PUT /issues/[id].xml |
| 102 | 5 | Damien Churchill | |
| 103 | h3. Using JSON |
||
| 104 | |||
| 105 | 6 | Robert Palmer | PUT /issues/[id].json |
| 106 | 5 | Damien Churchill | { |
| 107 | "issue": { |
||
| 108 | "subject": "Example issue (was: Test issue)" |
||
| 109 | }, |
||
| 110 | "notes": "Changing the subject" |
||
| 111 | } |
||
| 112 | |||
| 113 | 1 | Jean-Philippe Lang | |
| 114 | h2. Deleting an issue |
||
| 115 | |||
| 116 | DELETE /issues/[id].xml |
||
| 117 | 4 | Ryan Lovelett | |
| 118 | h2. Authentication |
||
| 119 | |||
| 120 | To interact with issues that are not open to the public you _must_ use your API key. |
||
| 121 | |||
| 122 | +Examples _(not real keys)_+: |
||
| 123 | |||
| 124 | <pre> |
||
| 125 | GET /issues.xml?key=1a022b4661da64e5dca53ebab0c94ad7 |
||
| 126 | GET /issues.xml?project_id=2&key=1a022b4661da64e5dca53ebab0c94ad7 |
||
| 127 | GET /issues.xml?project_id=2&tracker_id=1&key=1a022b4661da64e5dca53ebab0c94ad7 |
||
| 128 | </pre> |