Rest Projects » History » Version 2
Jean-Philippe Lang, 2010-01-14 22:44
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 | <project id="1"> |
||
14 | <name>Redmine</name> |
||
15 | <identifier>redmine</identifier> |
||
16 | <description> |
||
17 | Redmine is a flexible project management web application written using Ruby on Rails framework. |
||
18 | </description> |
||
19 | <created_on>Sat Sep 29 12:03:04 +0200 2007</created_on> |
||
20 | <updated_on>Sun Mar 15 12:35:11 +0100 2009</updated_on> |
||
21 | </project> |
||
22 | <project id="2"> |
||
23 | ... |
||
24 | </project> |
||
25 | </pre> |
||
26 | |||
27 | h2. Showing a project |
||
28 | |||
29 | GET /projects/[id].xml |
||
30 | |||
31 | Returns the project of given id or identifier. |
||
32 | |||
33 | +Examples+: |
||
34 | |||
35 | <pre> |
||
36 | GET /projects/12.xml |
||
37 | GET /projects/redmine.xml |
||
38 | </pre> |
||
39 | |||
40 | +Response+: |
||
41 | |||
42 | <pre> |
||
43 | <?xml version="1.0" encoding="UTF-8"?> |
||
44 | <project id="1"> |
||
45 | <name>Redmine</name> |
||
46 | <identifier>redmine</identifier> |
||
47 | <description> |
||
48 | Redmine is a flexible project management web application written using Ruby on Rails framework. |
||
49 | </description> |
||
50 | <homepage></homepage> |
||
51 | <created_on>Sat Sep 29 12:03:04 +0200 2007</created_on> |
||
52 | <updated_on>Sun Mar 15 12:35:11 +0100 2009</updated_on> |
||
53 | </project> |
||
54 | </pre> |
||
55 | |||
56 | |||
57 | h2. Creating a project |
||
58 | |||
59 | POST /projects.xml |
||
60 | |||
61 | Creates a the project. |
||
62 | |||
63 | +Parameters+: |
||
64 | |||
65 | * @project@ (required): a hash of the project attributes, including: |
||
66 | |||
67 | * @name@ (required): the project name |
||
68 | * @identifier@ (required): the project identifier |
||
69 | * @description@ |
||
70 | |||
71 | +Response+: |
||
72 | |||
73 | * @201 Created@: project was created |
||
74 | * @422 Unprocessable Entity@: project was not created due to validation failures (response body contains the error messages) |
||
75 | |||
76 | h2. Updating a project |
||
77 | |||
78 | PUT /projects/[id].xml |
||
79 | |||
80 | Updates the project of given id or identifier. |
||
81 | |||
82 | h2. Deleting a project |
||
83 | |||
84 | DELETE /projects/[id].xml |
||
85 | |||
86 | Deletes the project of given id or identifier. |