Project

General

Profile

Rest Projects » History » Version 14

Jean-Baptiste Barth, 2014-08-15 11:55

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