Rest Issues » History » Version 6

Robert Palmer, 2010-09-12 18:43

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