Rest IssueCategories » History » Version 1

Jean-Philippe Lang, 2011-11-20 18:03

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