プロジェクト

全般

プロフィール

Rest Projects » 履歴 » バージョン 4

Mitsuyoshi Yoshida, 2011/12/11 18:58

1 4 Mitsuyoshi Yoshida
redmine.org の "Rest_Projects":http://www.redmine.org/projects/redmine/wiki/Rest_Projects (version 10)の日本語訳です。
2 1 Mitsuyoshi Yoshida
3
{{>toc}}
4
5
6
h1. REST プロジェクト
7
8
h2. 一覧
9
10
  GET /projects.xml
11
12 2 Mitsuyoshi Yoshida
全てのプロジェクトのリストを取得します。
13 1 Mitsuyoshi Yoshida
14 3 Mitsuyoshi Yoshida
+レスポンス+:
15 1 Mitsuyoshi Yoshida
16
<pre><code class="xml">
17
<projects type="array">
18
  <project>
19
    <id>1</id>
20
    <name>Redmine</name>
21
    <identifier>redmine</identifier>
22
    <description>
23
      Redmine is a flexible project management web application written using Ruby on Rails framework.
24
    </description>
25
    <created_on>Sat Sep 29 12:03:04 +0200 2007</created_on>
26
    <updated_on>Sun Mar 15 12:35:11 +0100 2009</updated_on>
27
  </project>
28
  <project>
29
    <id>2</id>
30
    ...
31
  </project>
32
</code></pre>
33
34
35
h2. 表示
36
37
  GET /projects/[id].xml
38
39 2 Mitsuyoshi Yoshida
ID や識別名で指定したプロジェクトの情報を取得します。 
40 1 Mitsuyoshi Yoshida
41 4 Mitsuyoshi Yoshida
+パラメーター+:
42
43
* @include@ (オプション): 関連情報を含めます。指定可能な値は以下の 2 つです。
44
** trackers (トラッカー)
45
** issue_categories (チケットのカテゴリ)
46
47 1 Mitsuyoshi Yoshida
+例+:
48
49
<pre>
50
GET /projects/12.xml
51 4 Mitsuyoshi Yoshida
GET /projects/12.xml?include=trackers 
52
GET /projects/12.xml?include=trackers,issue_categories 
53 1 Mitsuyoshi Yoshida
GET /projects/redmine.xml
54
</pre>
55
56
+レスポンス+:
57
58
<pre><code class="xml">
59
<?xml version="1.0" encoding="UTF-8"?>
60
<project id="1">
61
  <name>Redmine</name>
62
  <identifier>redmine</identifier>
63
  <description>
64
    Redmine is a flexible project management web application written using Ruby on Rails framework.
65
  </description>
66
  <homepage></homepage>
67
  <created_on>Sat Sep 29 12:03:04 +0200 2007</created_on>
68
  <updated_on>Sun Mar 15 12:35:11 +0100 2009</updated_on>
69
</project>
70
</code></pre>
71
72
73
h2. 作成
74
75
  POST /projects.xml
76
77
プロジェクトを作成します。
78
79
+要素+:
80
81
* @project@ (必須): 以下の子要素を指定します。
82
83
  * @name@ (必須): 名称
84
  * @identifier@ (必須): 識別子
85
  * @description@ : 説明
86
87
+レスポンス+:
88
89
  * @201 Created@: プロジェクトは作成されました。
90
  * @422 Unprocessable Entity@: 妥当性の検証でエラーが発生し、プロジェクトの作成に失敗しました。
91
    (レスポンスの中身はエラーメッセージです。)
92
93
h2. 更新
94
95
  PUT /projects/[id].xml
96
97
ID や識別子で指定したプロジェクトを更新します。
98
99
h2. 削除
100
101
  DELETE /projects/[id].xml
102
103
ID や識別子で指定したプロジェクトを削除します。