Rest Issues » History » Version 21

Alex Last, 2010-12-13 02:43
corrected and added info about paging

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