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