Project

General

Profile

Rest Projects » History » Version 19

Matt Wiseley, 2014-12-13 18:19
Added 2 additionally supported POST fields that I had to look up in source code (inherit_members, parent_id)

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