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