Rest IssueCategories » History » Revision 3
Revision 2 (Jean-Philippe Lang, 2011-11-20 18:05) → Revision 3/4 (Laurent REMY, 2012-03-01 16:10)
h1. Issue Categories {{>toc}} h2. /projects/:project_id/issue_categories.:format h3. GET Returns the issue categories available for the project of given id or identifier (:project_id). +Examples+: <pre> GET /projects/foo/issue_categories.xml /project/foo/issue_categories.xml GET /projects/1/issue_categories.xml /project/1/issue_categories.xml </pre> +Response+: <pre> <?xml version="1.0" encoding="UTF-8"?> <issue_categories type="array" total_count="2"> <issue_category> <id>57</id> <project name="Foo" id="17"/> <name>UI</name> <assigned_to name="John Smith" id="22"/> </issue_category> <issue_category> <id>58</id> <project name="Foo" id="17"/> <name>Test</name> </issue_category> </issue_categories> </pre> h3. POST Creates an issue category for the project of given id or identifier (:project_id). +Parameters+: * @issue_category@ (required): a hash of the issue category attributes, including: * @name@ (required) * @assigned_to_id@: the id of the user assigned to the category (new issues with this category are assigned by default to this user) +Response+: * @201 Created@: issue category was created * @422 Unprocessable Entity@: issue category was not created due to validation failures (response body contains the error messages) h2. /issue_categories/:id.:format h3. GET Returns the issue category of given id. +Example+: <pre> GET /issue_categories/2.xml </pre> +Response+: <pre> <?xml version="1.0" encoding="UTF-8"?> <issue_category> <id>2</id> <project name="Redmine" id="1"/> <name>UI</name> </version> </pre> h3. PUT Updates the issue category of given id +Parameters+: Same as issue category creation +Response+: * @200 OK@: issue category was updated * @422 Unprocessable Entity@: issue category was not updated due to validation failures (response body contains the error messages) h3. DELETE Deletes the issue category of given id. +Parameters+: * @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 +Example+: <pre> DELETE /issue_categories/2.xml DELETE /issue_categories/2.xml?reassign_to_id=1 </pre> +Response+: * @200 OK@: issue category was deleted