Rest IssueCategories » History » Version 2

Jean-Philippe Lang, 2011-11-20 18:05
typi

1 1 Jean-Philippe Lang
h1. Issue Categories
2 1 Jean-Philippe Lang
3 1 Jean-Philippe Lang
{{>toc}}
4 1 Jean-Philippe Lang
5 1 Jean-Philippe Lang
h2. /projects/:project_id/issue_categories.:format
6 1 Jean-Philippe Lang
7 1 Jean-Philippe Lang
h3. GET
8 1 Jean-Philippe Lang
9 1 Jean-Philippe Lang
Returns the issue categories available for the project of given id or identifier (:project_id).
10 1 Jean-Philippe Lang
11 1 Jean-Philippe Lang
+Examples+:
12 1 Jean-Philippe Lang
13 1 Jean-Philippe Lang
<pre>
14 1 Jean-Philippe Lang
GET /project/foo/issue_categories.xml
15 1 Jean-Philippe Lang
GET /project/1/issue_categories.xml
16 1 Jean-Philippe Lang
</pre>
17 1 Jean-Philippe Lang
18 1 Jean-Philippe Lang
+Response+:
19 1 Jean-Philippe Lang
20 1 Jean-Philippe Lang
<pre>
21 1 Jean-Philippe Lang
<?xml version="1.0" encoding="UTF-8"?>
22 1 Jean-Philippe Lang
<issue_categories type="array" total_count="2">
23 1 Jean-Philippe Lang
  <issue_category>
24 1 Jean-Philippe Lang
    <id>57</id>
25 1 Jean-Philippe Lang
    <project name="Foo" id="17"/>
26 1 Jean-Philippe Lang
    <name>UI</name>
27 1 Jean-Philippe Lang
    <assigned_to name="John Smith" id="22"/>
28 1 Jean-Philippe Lang
  </issue_category>
29 1 Jean-Philippe Lang
  <issue_category>
30 1 Jean-Philippe Lang
    <id>58</id>
31 1 Jean-Philippe Lang
    <project name="Foo" id="17"/>
32 1 Jean-Philippe Lang
    <name>Test</name>
33 1 Jean-Philippe Lang
  </issue_category>
34 1 Jean-Philippe Lang
</issue_categories>
35 1 Jean-Philippe Lang
</pre>
36 1 Jean-Philippe Lang
37 1 Jean-Philippe Lang
h3. POST
38 1 Jean-Philippe Lang
39 1 Jean-Philippe Lang
Creates an issue category for the project of given id or identifier (:project_id).
40 1 Jean-Philippe Lang
41 1 Jean-Philippe Lang
+Parameters+:
42 1 Jean-Philippe Lang
43 1 Jean-Philippe Lang
* @issue_category@ (required): a hash of the issue category attributes, including:
44 1 Jean-Philippe Lang
45 1 Jean-Philippe Lang
  * @name@ (required)
46 1 Jean-Philippe Lang
  * @assigned_to_id@: the id of the user assigned to the category (new issues with this category are assigned by default to this user)
47 1 Jean-Philippe Lang
48 1 Jean-Philippe Lang
+Response+:
49 1 Jean-Philippe Lang
50 1 Jean-Philippe Lang
  * @201 Created@: issue category was created
51 1 Jean-Philippe Lang
  * @422 Unprocessable Entity@: issue category was not created due to validation failures (response body contains the error messages)
52 1 Jean-Philippe Lang
53 1 Jean-Philippe Lang
h2. /issue_categories/:id.:format
54 1 Jean-Philippe Lang
55 1 Jean-Philippe Lang
h3. GET
56 1 Jean-Philippe Lang
57 1 Jean-Philippe Lang
Returns the issue category of given id.
58 1 Jean-Philippe Lang
59 1 Jean-Philippe Lang
+Example+:
60 1 Jean-Philippe Lang
61 1 Jean-Philippe Lang
<pre>
62 1 Jean-Philippe Lang
GET /issue_categories/2.xml
63 1 Jean-Philippe Lang
</pre>
64 1 Jean-Philippe Lang
65 1 Jean-Philippe Lang
+Response+:
66 1 Jean-Philippe Lang
67 1 Jean-Philippe Lang
<pre>
68 1 Jean-Philippe Lang
<?xml version="1.0" encoding="UTF-8"?>
69 1 Jean-Philippe Lang
<issue_category>
70 1 Jean-Philippe Lang
  <id>2</id>
71 1 Jean-Philippe Lang
  <project name="Redmine" id="1"/>
72 1 Jean-Philippe Lang
  <name>UI</name>
73 1 Jean-Philippe Lang
</version>
74 1 Jean-Philippe Lang
</pre>
75 1 Jean-Philippe Lang
76 1 Jean-Philippe Lang
h3. PUT
77 1 Jean-Philippe Lang
78 1 Jean-Philippe Lang
Updates the issue category of given id
79 1 Jean-Philippe Lang
80 1 Jean-Philippe Lang
+Parameters+:
81 1 Jean-Philippe Lang
82 1 Jean-Philippe Lang
Same as issue category creation
83 1 Jean-Philippe Lang
84 1 Jean-Philippe Lang
+Response+:
85 1 Jean-Philippe Lang
86 1 Jean-Philippe Lang
  * @200 OK@: issue category was updated
87 1 Jean-Philippe Lang
  * @422 Unprocessable Entity@: issue category was not updated due to validation failures (response body contains the error messages)
88 1 Jean-Philippe Lang
89 1 Jean-Philippe Lang
h3. DELETE
90 1 Jean-Philippe Lang
91 1 Jean-Philippe Lang
Deletes the issue category of given id.
92 1 Jean-Philippe Lang
93 1 Jean-Philippe Lang
+Parameters+:
94 1 Jean-Philippe Lang
95 1 Jean-Philippe Lang
* @reassign_to_id@ (optional): when there are issues assigned to the category you are deleting, this parameter lets you reassign these issues to the category with this id
96 1 Jean-Philippe Lang
97 1 Jean-Philippe Lang
+Example+:
98 1 Jean-Philippe Lang
99 1 Jean-Philippe Lang
<pre>
100 1 Jean-Philippe Lang
DELETE /issue_categories/2.xml
101 1 Jean-Philippe Lang
DELETE /issue_categories/2.xml?reassign_to_id=1
102 1 Jean-Philippe Lang
</pre>
103 1 Jean-Philippe Lang
104 1 Jean-Philippe Lang
105 1 Jean-Philippe Lang
+Response+:
106 1 Jean-Philippe Lang
107 1 Jean-Philippe Lang
  * @200 OK@: issue category was deleted