Project

General

Profile

Rest Versions » History » Version 9

Go MAEDA, 2019-04-28 16:44
Added wiki_page_title that is going to be supported in Redmine 4.1.0

1 1 Jean-Philippe Lang
h1. Versions
2
3
{{>toc}}
4
5
h2. /projects/:project_id/versions.:format
6
7
h3. GET
8
9
Returns the versions available for the project of given id or identifier (:project_id). The response may include shared versions from other projects.
10
11
+Examples+:
12
13
<pre>
14 5 Stefan Wichmann
GET /projects/foo/versions.xml
15
GET /projects/1/versions.xml
16 1 Jean-Philippe Lang
</pre>
17
18
+Response+:
19
20 7 Toshi MARUYAMA
<pre><code class="xml">
21 1 Jean-Philippe Lang
<?xml version="1.0" encoding="UTF-8"?>
22
<versions type="array" total_count="34">
23
  <version>
24
    <id>1</id>
25
    <project name="Redmine" id="1"/>
26
    <name>0.7</name>
27
    <description/>
28
    <status>closed</status>
29
    <due_date>2008-04-28</due_date>
30 6 Go MAEDA
    <sharing>none</sharing>
31 1 Jean-Philippe Lang
    <created_on>2008-03-09T12:52:06+01:00</created_on>
32
    <updated_on>2009-11-15T12:22:12+01:00</updated_on>
33 9 Go MAEDA
    <wiki_page_title>FooBarWikiPage</version_wiki_page_title>
34 1 Jean-Philippe Lang
  </version>
35
  <version>
36
    <id>2</id>
37
    <project name="Redmine" id="1"/>
38
    <name>0.8</name>
39
    <description/>
40
    <status>closed</status>
41
    <due_date>2008-12-30</due_date>
42 6 Go MAEDA
    <sharing>none</sharing>
43 9 Go MAEDA
    <wiki_page_title>FooBarWikiPage</version_wiki_page_title>
44 1 Jean-Philippe Lang
    <created_on>2008-03-09T12:52:12+01:00</created_on>
45
    <updated_on>2009-11-15T12:22:12+01:00</updated_on>
46
  </version>
47
</versions>
48 7 Toshi MARUYAMA
</code></pre>
49 1 Jean-Philippe Lang
50
h3. POST
51
52
Creates a version for the project of given id or identifier (:project_id).
53
54
+Parameters+:
55
56
* @version@ (required): a hash of the version attributes, including:
57
58
  * @name@ (required)
59 2 Jean-Philippe Lang
  * @status@: the status of the version in: @open (default), locked, closed@
60
  * @sharing@: the version sharing in: @none (default), descendants, hierarchy, tree, system@
61 1 Jean-Philippe Lang
  * @due_date@
62
  * @description@
63 9 Go MAEDA
  * @wiki_page_title@
64 1 Jean-Philippe Lang
65
+Response+:
66
67
  * @201 Created@: version was created
68
  * @422 Unprocessable Entity@: version was not created due to validation failures (response body contains the error messages)
69
70 3 Jean-Philippe Lang
h2. /versions/:id.:format
71 1 Jean-Philippe Lang
72
h3. GET
73
74
Returns the version of given id.
75
76
+Example+:
77
78
<pre>
79 4 Jean-Philippe Lang
GET /versions/2.xml
80 1 Jean-Philippe Lang
</pre>
81
82
+Response+:
83
84 8 Toshi MARUYAMA
<pre><code class="xml">
85 1 Jean-Philippe Lang
<?xml version="1.0" encoding="UTF-8"?>
86
<version>
87
  <id>2</id>
88
  <project name="Redmine" id="1"/>
89
  <name>0.8</name>
90
  <description/>
91
  <status>closed</status>
92
  <due_date>2008-12-30</due_date>
93
  <created_on>2008-03-09T12:52:12+01:00</created_on>
94
  <updated_on>2009-11-15T12:22:12+01:00</updated_on>
95
</version>
96 8 Toshi MARUYAMA
</code></pre>
97 1 Jean-Philippe Lang
98
h3. PUT
99
100
Updates the version of given id
101
102
+Parameters+:
103
104
Same as version creation
105
106
+Response+:
107
108
  * @200 OK@: version was updated
109
  * @422 Unprocessable Entity@: version was not updated due to validation failures (response body contains the error messages)
110
111
h3. DELETE
112
113
Deletes the version of given id.
114
115
+Response+:
116
117
  * @200 OK@: version was deleted
118
  * @422 Unprocessable Entity@: version was not deleted (response body contains the error messages)