Project

General

Profile

Rest Projects » History » Version 3

Christoph Witzany, 2010-07-05 07:39

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