Project

General

Profile

Rest Projects » History » Version 29

Marius BĂLTEANU, 2021-02-26 22:54
Added homepage attribute projects#get response.

1 1 Jean-Philippe Lang
h1. Projects
2
3 21 yuya ito
{{>toc}}
4
5 1 Jean-Philippe Lang
h2. Listing projects
6
7
  GET /projects.xml
8
9 18 Jaroslav Balaz
Returns all projects (all public projects and private projects where user have access to)
10 1 Jean-Philippe Lang
11 17 Jean-Baptiste Barth
+Parameters+:
12
13
* @include@: fetch associated data (optional). Possible values: trackers, issue_categories, enabled_modules (since 2.6.0). Values should be separated by a comma ",".
14
15 1 Jean-Philippe Lang
+Response+:
16
17 24 Toshi MARUYAMA
<pre><code class="xml">
18 1 Jean-Philippe Lang
<projects type="array">
19 3 Christoph Witzany
  <project>
20
    <id>1</id>
21 13 Terence Mill
    <name>Redmine</name>
22
    <identifier>redmine</identifier>
23 1 Jean-Philippe Lang
    <description>
24 13 Terence Mill
      Redmine is a flexible project management web application written using Ruby on Rails framework.
25 1 Jean-Philippe Lang
    </description>
26 29 Marius BĂLTEANU
    <homepage>https://redmine.org</homepage>
27 1 Jean-Philippe Lang
    <created_on>Sat Sep 29 12:03:04 +0200 2007</created_on>
28
    <updated_on>Sun Mar 15 12:35:11 +0100 2009</updated_on>
29 14 Jean-Baptiste Barth
    <is_public>true</is_public>
30 1 Jean-Philippe Lang
  </project>
31 3 Christoph Witzany
  <project>
32
    <id>2</id>
33 1 Jean-Philippe Lang
    ...
34
  </project>
35 24 Toshi MARUYAMA
</code></pre>
36 1 Jean-Philippe Lang
37 14 Jean-Baptiste Barth
+Notes+:
38
* @is_public@ is exposed since 2.6.0
39
40 1 Jean-Philippe Lang
h2. Showing a project
41
42
  GET /projects/[id].xml
43
44
Returns the project of given id or identifier.
45
46 9 Jean-Philippe Lang
+Parameters+:
47
48 22 Go MAEDA
* @include@: fetch associated data (optional). Possible values: trackers, issue_categories, enabled_modules (since 2.6.0), time_entry_activities (since 3.4.0). Values should be separated by a comma ",".
49 9 Jean-Philippe Lang
50 1 Jean-Philippe Lang
+Examples+:
51
52
<pre>
53
GET /projects/12.xml
54 10 Jean-Philippe Lang
GET /projects/12.xml?include=trackers
55 1 Jean-Philippe Lang
GET /projects/12.xml?include=trackers,issue_categories
56 15 Jean-Baptiste Barth
GET /projects/12.xml?include=enabled_modules
57 13 Terence Mill
GET /projects/redmine.xml
58 1 Jean-Philippe Lang
</pre>
59
60
+Response+:
61
62 24 Toshi MARUYAMA
<pre><code class="xml">
63 1 Jean-Philippe Lang
<?xml version="1.0" encoding="UTF-8"?>
64
<project id="1">
65 13 Terence Mill
  <name>Redmine</name>
66
  <identifier>redmine</identifier>
67 1 Jean-Philippe Lang
  <description>
68 13 Terence Mill
    Redmine is a flexible project management web application written using Ruby on Rails framework.
69 1 Jean-Philippe Lang
  </description>
70
  <homepage></homepage>
71 28 Go MAEDA
  <parent id="123" name="foo"/>
72 1 Jean-Philippe Lang
  <created_on>Sat Sep 29 12:03:04 +0200 2007</created_on>
73
  <updated_on>Sun Mar 15 12:35:11 +0100 2009</updated_on>
74 14 Jean-Baptiste Barth
  <is_public>true</is_public>
75 1 Jean-Philippe Lang
</project>
76 24 Toshi MARUYAMA
</code></pre>
77 1 Jean-Philippe Lang
78 14 Jean-Baptiste Barth
+Notes+:
79
* @is_public@ is exposed since 2.6.0
80 1 Jean-Philippe Lang
81
h2. Creating a project
82
83
  POST /projects.xml
84
85
Creates a the project.
86
87
+Parameters+:
88
89
* @project@ (required): a hash of the project attributes, including:
90
91
  * @name@ (required): the project name
92
  * @identifier@ (required): the project identifier
93
  * @description@
94 20 Lucile Quirion
  * @homepage@
95
  * @is_public@: true or false
96
  * @parent_id@: the parent project number
97
  * @inherit_members@: true or false
98
  * @tracker_ids@: (repeatable element) the tracker id: 1 for Bug, etc.
99 1 Jean-Philippe Lang
  * @enabled_module_names@: (repeatable element) the module name: boards, calendar, documents, files, gantt, issue_tracking, news, repository, time_tracking, wiki.
100 27 Igor Rybak
  * @issue_custom_field_ids@: (repeatable element) issue custom field id.
101 1 Jean-Philippe Lang
102
<pre>
103
POST /projects.xml
104 24 Toshi MARUYAMA
</pre>
105
106 25 Toshi MARUYAMA
<pre><code class="xml">
107 26 Mayama Takeshi
<project>
108
  <name>test project</name>
109
  <identifier>test</identifier>
110
  <enabled_module_names>time_tracking</enabled_module_names>
111
  <enabled_module_names>issue_tracking</enabled_module_names>
112
</project>
113 25 Toshi MARUYAMA
</code></pre>
114 1 Jean-Philippe Lang
115
+Response+:
116
117
  * @201 Created@: project was created
118
  * @422 Unprocessable Entity@: project was not created due to validation failures (response body contains the error messages)
119
120
h2. Updating a project
121
122
  PUT /projects/[id].xml
123
124
Updates the project of given id or identifier.
125
126
h2. Deleting a project
127
128
  DELETE /projects/[id].xml
129
130
Deletes the project of given id or identifier.
131 11 Wim Bertels
132
h2. Limitations:
133
134 23 Toshi MARUYAMA
A POST request on Redmine 1.0.1-2 (Debian stable) does not work using the API key, but does work with a login/passwd authentication
135
#12104