Rest Projects » History » Version 13
Terence Mill, 2013-05-17 11:12
1 | 1 | Jean-Philippe Lang | h1. Projects |
---|---|---|---|
2 | |||
3 | h2. Listing projects |
||
4 | |||
5 | GET /projects.xml |
||
6 | |||
7 | Returns all projects |
||
8 | |||
9 | +Response+: |
||
10 | |||
11 | <pre> |
||
12 | <projects type="array"> |
||
13 | 3 | Christoph Witzany | <project> |
14 | <id>1</id> |
||
15 | 13 | Terence Mill | <name>Redmine</name> |
16 | <identifier>redmine</identifier> |
||
17 | 1 | Jean-Philippe Lang | <description> |
18 | 13 | Terence Mill | Redmine is a flexible project management web application written using Ruby on Rails framework. |
19 | 1 | Jean-Philippe Lang | </description> |
20 | <created_on>Sat Sep 29 12:03:04 +0200 2007</created_on> |
||
21 | <updated_on>Sun Mar 15 12:35:11 +0100 2009</updated_on> |
||
22 | </project> |
||
23 | 3 | Christoph Witzany | <project> |
24 | <id>2</id> |
||
25 | 1 | Jean-Philippe Lang | ... |
26 | </project> |
||
27 | </pre> |
||
28 | |||
29 | h2. Showing a project |
||
30 | |||
31 | GET /projects/[id].xml |
||
32 | |||
33 | Returns the project of given id or identifier. |
||
34 | |||
35 | 9 | Jean-Philippe Lang | +Parameters+: |
36 | |||
37 | 10 | Jean-Philippe Lang | * @include@: fetch associated data (optional). Possible values: trackers, issue_categories. |
38 | 9 | Jean-Philippe Lang | |
39 | 1 | Jean-Philippe Lang | +Examples+: |
40 | |||
41 | <pre> |
||
42 | GET /projects/12.xml |
||
43 | 10 | Jean-Philippe Lang | GET /projects/12.xml?include=trackers |
44 | GET /projects/12.xml?include=trackers,issue_categories |
||
45 | 13 | Terence Mill | GET /projects/redmine.xml |
46 | 1 | Jean-Philippe Lang | </pre> |
47 | |||
48 | +Response+: |
||
49 | |||
50 | <pre> |
||
51 | <?xml version="1.0" encoding="UTF-8"?> |
||
52 | <project id="1"> |
||
53 | 13 | Terence Mill | <name>Redmine</name> |
54 | <identifier>redmine</identifier> |
||
55 | 1 | Jean-Philippe Lang | <description> |
56 | 13 | Terence Mill | Redmine is a flexible project management web application written using Ruby on Rails framework. |
57 | 1 | Jean-Philippe Lang | </description> |
58 | <homepage></homepage> |
||
59 | <created_on>Sat Sep 29 12:03:04 +0200 2007</created_on> |
||
60 | <updated_on>Sun Mar 15 12:35:11 +0100 2009</updated_on> |
||
61 | </project> |
||
62 | </pre> |
||
63 | |||
64 | |||
65 | h2. Creating a project |
||
66 | |||
67 | POST /projects.xml |
||
68 | |||
69 | Creates a the project. |
||
70 | |||
71 | +Parameters+: |
||
72 | |||
73 | * @project@ (required): a hash of the project attributes, including: |
||
74 | |||
75 | * @name@ (required): the project name |
||
76 | * @identifier@ (required): the project identifier |
||
77 | * @description@ |
||
78 | |||
79 | +Response+: |
||
80 | |||
81 | * @201 Created@: project was created |
||
82 | * @422 Unprocessable Entity@: project was not created due to validation failures (response body contains the error messages) |
||
83 | |||
84 | h2. Updating a project |
||
85 | |||
86 | PUT /projects/[id].xml |
||
87 | |||
88 | Updates the project of given id or identifier. |
||
89 | |||
90 | h2. Deleting a project |
||
91 | |||
92 | DELETE /projects/[id].xml |
||
93 | |||
94 | Deletes the project of given id or identifier. |
||
95 | 11 | Wim Bertels | |
96 | h2. Limitations: |
||
97 | |||
98 | 13 | Terence Mill | A POST request on Redmine 1.0.1-2 (debian stable) does not work using the API key, but does work with a login/passw authentication |
99 | http://www.redmine.org/issues/12104 |