Rest Issues » History » Version 7

Robert Palmer, 2010-09-13 21:03

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 7 Robert Palmer
  <?xml version="1.0"?>
78 7 Robert Palmer
  <issue>
79 7 Robert Palmer
      <subject>Example</subject>
80 7 Robert Palmer
     <priority_id>4</priority_id>
81 7 Robert Palmer
  </issue>
82 7 Robert Palmer
83 7 Robert Palmer
84 7 Robert Palmer
85 1 Jean-Philippe Lang
86 5 Damien Churchill
h3. Using JSON
87 5 Damien Churchill
88 5 Damien Churchill
  POST /issues.json
89 5 Damien Churchill
  {
90 5 Damien Churchill
    "issue": {
91 5 Damien Churchill
      "project_id": "example",
92 5 Damien Churchill
      "subject": "Test issue"
93 5 Damien Churchill
    }
94 5 Damien Churchill
}
95 5 Damien Churchill
96 5 Damien Churchill
97 1 Jean-Philippe Lang
h2. Updating an issue
98 1 Jean-Philippe Lang
99 5 Damien Churchill
h3. Using XML
100 5 Damien Churchill
101 1 Jean-Philippe Lang
  PUT /issues/[id].xml
102 5 Damien Churchill
103 5 Damien Churchill
h3. Using JSON
104 5 Damien Churchill
105 6 Robert Palmer
  PUT /issues/[id].json
106 5 Damien Churchill
  {
107 5 Damien Churchill
    "issue": {
108 5 Damien Churchill
      "subject": "Example issue (was: Test issue)"
109 5 Damien Churchill
    },
110 5 Damien Churchill
    "notes": "Changing the subject"
111 5 Damien Churchill
}
112 5 Damien Churchill
113 1 Jean-Philippe Lang
114 1 Jean-Philippe Lang
h2. Deleting an issue
115 1 Jean-Philippe Lang
116 1 Jean-Philippe Lang
  DELETE /issues/[id].xml
117 4 Ryan Lovelett
118 4 Ryan Lovelett
h2. Authentication
119 4 Ryan Lovelett
120 4 Ryan Lovelett
To interact with issues that are not open to the public you _must_ use your API key.
121 4 Ryan Lovelett
122 4 Ryan Lovelett
+Examples _(not real keys)_+:
123 4 Ryan Lovelett
124 4 Ryan Lovelett
<pre>
125 4 Ryan Lovelett
GET /issues.xml?key=1a022b4661da64e5dca53ebab0c94ad7
126 4 Ryan Lovelett
GET /issues.xml?project_id=2&key=1a022b4661da64e5dca53ebab0c94ad7
127 4 Ryan Lovelett
GET /issues.xml?project_id=2&tracker_id=1&key=1a022b4661da64e5dca53ebab0c94ad7
128 4 Ryan Lovelett
</pre>