Project

General

Profile

Rest IssueCategories » History » Version 2

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

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