- プロジェクトのイシュー・ボード一覧
- 単一のイシュー・ボードを表示
- イシューボードを作成
- イシューボードの更新
- イシューボードの削除
- プロジェクトのイシューボードにあるボードのリストを表示します。
- シングルボードリストの表示
- ボードリストの作成
- ボードのリストの並べ替え
- ボードからボードリストを削除
プロジェクトイシューボードAPI
イシューボードへのAPIコールはすべて認証が必要です。
ユーザーが非公開プロジェクトのメンバーでない場合、そのプロジェクトに対するGET リクエストは404 ステータスコードになります。
プロジェクトのイシュー・ボード一覧
指定されたプロジェクトのイシューボードを一覧表示します。
GET /projects/:id/boards
| 属性 | 種類 | 必須 | 説明 | 
|---|---|---|---|
| id | 整数/文字列 | yes | 認証ユーザーが所有するプロジェクトのIDまたはURLエンコードされたパス | 
curl --header "PRIVATE-TOKEN: <your_access_token>" "https://gitlab.example.com/api/v4/projects/5/boards"
応答例
[
  {
    "id" : 1,
    "name": "board1",
    "project": {
      "id": 5,
      "name": "Diaspora Project Site",
      "name_with_namespace": "Diaspora / Diaspora Project Site",
      "path": "diaspora-project-site",
      "path_with_namespace": "diaspora/diaspora-project-site",
      "http_url_to_repo": "http://example.com/diaspora/diaspora-project-site.git",
      "web_url": "http://example.com/diaspora/diaspora-project-site"
    },
    "milestone":   {
      "id": 12,
      "title": "10.0"
    },
    "lists" : [
      {
        "id" : 1,
        "label" : {
          "name" : "Testing",
          "color" : "#F0AD4E",
          "description" : null
        },
        "position" : 1,
        "max_issue_count": 0,
        "max_issue_weight": 0,
        "limit_metric": null
      },
      {
        "id" : 2,
        "label" : {
          "name" : "Ready",
          "color" : "#FF0000",
          "description" : null
        },
        "position" : 2,
        "max_issue_count": 0,
        "max_issue_weight": 0,
        "limit_metric":  null
      },
      {
        "id" : 3,
        "label" : {
          "name" : "Production",
          "color" : "#FF5F00",
          "description" : null
        },
        "position" : 3,
        "max_issue_count": 0,
        "max_issue_weight": 0,
        "limit_metric":  null
      }
    ]
  }
]
プロジェクト内でボードがアクティビティされていない、または存在しない場合の応答例です:
[]
単一のイシュー・ボードを表示
単一のプロジェクトのイシューボードを取得します。
GET /projects/:id/boards/:board_id
| 属性 | 種類 | 必須 | 説明 | 
|---|---|---|---|
| id | 整数/文字列 | yes | 認証ユーザーが所有するプロジェクトのIDまたはURLエンコードされたパス | 
| board_id | 整数。 | yes | ボードのID | 
curl --header "PRIVATE-TOKEN: <your_access_token>" "https://gitlab.example.com/api/v4/projects/5/boards/1"
応答例
  {
    "id": 1,
    "name": "project issue board",
    "project": {
      "id": 5,
      "name": "Diaspora Project Site",
      "name_with_namespace": "Diaspora / Diaspora Project Site",
      "path": "diaspora-project-site",
      "path_with_namespace": "diaspora/diaspora-project-site",
      "http_url_to_repo": "http://example.com/diaspora/diaspora-project-site.git",
      "web_url": "http://example.com/diaspora/diaspora-project-site"
    },
    "milestone":   {
      "id": 12,
      "title": "10.0"
    },
    "lists" : [
      {
        "id" : 1,
        "label" : {
          "name" : "Testing",
          "color" : "#F0AD4E",
          "description" : null
        },
        "position" : 1,
        "max_issue_count": 0,
        "max_issue_weight": 0,
        "limit_metric":  null
      },
      {
        "id" : 2,
        "label" : {
          "name" : "Ready",
          "color" : "#FF0000",
          "description" : null
        },
        "position" : 2,
        "max_issue_count": 0,
        "max_issue_weight": 0,
        "limit_metric":  null
      },
      {
        "id" : 3,
        "label" : {
          "name" : "Production",
          "color" : "#FF5F00",
          "description" : null
        },
        "position" : 3,
        "max_issue_count": 0,
        "max_issue_weight": 0,
        "limit_metric":  null
      }
    ]
  }
イシューボードを作成
プロジェクトのイシューボードを作成します。
POST /projects/:id/boards
| 属性 | 種類 | 必須 | 説明 | 
|---|---|---|---|
| id | 整数/文字列 | yes | 認証ユーザーが所有するプロジェクトのIDまたはURLエンコードされたパス | 
| name | 文字列です。 | yes | 新しいボードの名前 | 
curl --request POST --header "PRIVATE-TOKEN: <your_access_token>" "https://gitlab.example.com/api/v4/projects/5/boards?name=newboard"
応答例
  {
    "id": 1,
    "project": {
      "id": 5,
      "name": "Diaspora Project Site",
      "name_with_namespace": "Diaspora / Diaspora Project Site",
      "path": "diaspora-project-site",
      "path_with_namespace": "diaspora/diaspora-project-site",
      "http_url_to_repo": "http://example.com/diaspora/diaspora-project-site.git",
      "web_url": "http://example.com/diaspora/diaspora-project-site"
    },
    "name": "newboard",
    "lists" : [],
    "group": null,
    "milestone": null,
    "assignee" : null,
    "labels" : [],
    "weight" : null
  }
イシューボードの更新
GitLab 11.1で導入されました。
プロジェクトのイシューボードを更新します。
PUT /projects/:id/boards/:board_id
| 属性 | 種類 | 必須 | 説明 | 
|---|---|---|---|
| id | 整数/文字列 | yes | 認証ユーザーが所有するプロジェクトのIDまたはURLエンコードされたパス | 
| board_id | 整数。 | yes | ボードのID | 
| name | 文字列です。 | いいえ | ボードの新しい名前 | 
| assignee_id | 整数。 | いいえ | ボードがスコープされるべき担当者 | 
| milestone_id | 整数。 | いいえ | ボードがスコープされるべきマイルストーン | 
| labels | 文字列です。 | いいえ | ボードがスコープされるべきラベル名のカンマ区切りリスト | 
| weight | 整数。 | いいえ | 0から9までのウェイト範囲。 | 
curl --request PUT --header "PRIVATE-TOKEN: <your_access_token>" "https://gitlab.example.com/api/v4/projects/5/boards/1?name=new_name&milestone_id=43&assignee_id=1&labels=Doing&weight=4"
応答例
  {
    "id": 1,
    "project": {
      "id": 5,
      "name": "Diaspora Project Site",
      "name_with_namespace": "Diaspora / Diaspora Project Site",
      "path": "diaspora-project-site",
      "path_with_namespace": "diaspora/diaspora-project-site",
      "created_at": "2018-07-03T05:48:49.982Z",
      "default_branch": null,
      "tag_list": [], //deprecated, use `topics` instead
      "topics": [],
      "ssh_url_to_repo": "ssh://user@example.com/diaspora/diaspora-project-site.git",
      "http_url_to_repo": "http://example.com/diaspora/diaspora-project-site.git",
      "web_url": "http://example.com/diaspora/diaspora-project-site",
      "readme_url": null,
      "avatar_url": null,
      "star_count": 0,
      "forks_count": 0,
      "last_activity_at": "2018-07-03T05:48:49.982Z"
    },
    "lists": [],
    "name": "new_name",
    "group": null,
    "milestone": {
      "id": 43,
      "iid": 1,
      "project_id": 15,
      "title": "Milestone 1",
      "description": "Milestone 1 desc",
      "state": "active",
      "created_at": "2018-07-03T06:36:42.618Z",
      "updated_at": "2018-07-03T06:36:42.618Z",
      "due_date": null,
      "start_date": null,
      "web_url": "http://example.com/root/board1/milestones/1"
    },
    "assignee": {
      "id": 1,
      "name": "Administrator",
      "username": "root",
      "state": "active",
      "avatar_url": "https://www.gravatar.com/avatar/e64c7d89f26bd1972efa854d13d7dd61?s=80&d=identicon",
      "web_url": "http://example.com/root"
    },
    "labels": [{
      "id": 10,
      "name": "Doing",
      "color": "#5CB85C",
      "description": null
    }],
    "weight": 4
  }
イシューボードの削除
プロジェクトのイシューボードを削除します。
DELETE /projects/:id/boards/:board_id
| 属性 | 種類 | 必須 | 説明 | 
|---|---|---|---|
| id | 整数/文字列 | yes | 認証ユーザーが所有するプロジェクトのIDまたはURLエンコードされたパス | 
| board_id | 整数。 | yes | ボードのID | 
curl --request DELETE --header "PRIVATE-TOKEN: <your_access_token>" "https://gitlab.example.com/api/v4/projects/5/boards/1"
プロジェクトのイシューボードにあるボードのリストを表示します。
ボードのリストの一覧を取得します。open とclosed のリストは含まれません。
GET /projects/:id/boards/:board_id/lists
| 属性 | 種類 | 必須 | 説明 | 
|---|---|---|---|
| id | 整数/文字列 | yes | 認証ユーザーが所有するプロジェクトのIDまたはURLエンコードされたパス | 
| board_id | 整数。 | yes | ボードのID | 
curl --header "PRIVATE-TOKEN: <your_access_token>" "https://gitlab.example.com/api/v4/projects/5/boards/1/lists"
応答例
[
  {
    "id" : 1,
    "label" : {
      "name" : "Testing",
      "color" : "#F0AD4E",
      "description" : null
    },
    "position" : 1,
    "max_issue_count": 0,
    "max_issue_weight": 0,
    "limit_metric":  null
  },
  {
    "id" : 2,
    "label" : {
      "name" : "Ready",
      "color" : "#FF0000",
      "description" : null
    },
    "position" : 2,
    "max_issue_count": 0,
    "max_issue_weight": 0,
    "limit_metric":  null
  },
  {
    "id" : 3,
    "label" : {
      "name" : "Production",
      "color" : "#FF5F00",
      "description" : null
    },
    "position" : 3,
    "max_issue_count": 0,
    "max_issue_weight": 0,
    "limit_metric":  null
  }
]
シングルボードリストの表示
単一のボードリストを取得します。
GET /projects/:id/boards/:board_id/lists/:list_id
| 属性 | 種類 | 必須 | 説明 | 
|---|---|---|---|
| id | 整数/文字列 | yes | 認証ユーザーが所有するプロジェクトのIDまたはURLエンコードされたパス | 
| board_id | 整数。 | yes | ボードのID | 
| list_id | 整数。 | yes | ボードリストのID | 
curl --header "PRIVATE-TOKEN: <your_access_token>" "https://gitlab.example.com/api/v4/projects/5/boards/1/lists/1"
応答例
{
  "id" : 1,
  "label" : {
    "name" : "Testing",
    "color" : "#F0AD4E",
    "description" : null
  },
  "position" : 1,
  "max_issue_count": 0,
  "max_issue_weight": 0,
  "limit_metric":  null
}
ボードリストの作成
新しいイシュー・ボード・リストを作成します。
POST /projects/:id/boards/:board_id/lists
| 属性 | 種類 | 必須 | 説明 | 
|---|---|---|---|
| id | 整数/文字列 | yes | 認証ユーザーが所有するプロジェクトのIDまたはURLエンコードされたパス | 
| board_id | 整数。 | yes | ボードのID | 
| label_id | 整数。 | いいえ | ラベルのID | 
| assignee_id | 整数。 | いいえ | ユーザーのID | 
| milestone_id | 整数。 | いいえ | マイルストーンのID | 
Label、担当者、マイルストーンの引数は互いに排他的です。各リストタイプに必要なライセンスの詳細については、イシューボードのドキュメントを確認してください。
curl --request POST --header "PRIVATE-TOKEN: <your_access_token>" "https://gitlab.example.com/api/v4/projects/5/boards/1/lists?label_id=5"
応答例
{
  "id" : 1,
  "label" : {
    "name" : "Testing",
    "color" : "#F0AD4E",
    "description" : null
  },
  "position" : 1,
  "max_issue_count": 0,
  "max_issue_weight": 0,
  "limit_metric":  null
}
ボードのリストの並べ替え
既存のイシュー・ボード・リストを更新します。この呼び出しはリストの位置を変更するために使用されます。
PUT /projects/:id/boards/:board_id/lists/:list_id
| 属性 | 種類 | 必須 | 説明 | 
|---|---|---|---|
| id | 整数/文字列 | yes | 認証ユーザーが所有するプロジェクトのIDまたはURLエンコードされたパス | 
| board_id | 整数。 | yes | ボードのID | 
| list_id | 整数。 | yes | ボードリストのID | 
| position | 整数。 | yes | リストの位置 | 
curl --request PUT --header "PRIVATE-TOKEN: <your_access_token>" "https://gitlab.example.com/api/v4/projects/5/boards/1/lists/1?position=2"
応答例
{
  "id" : 1,
  "label" : {
    "name" : "Testing",
    "color" : "#F0AD4E",
    "description" : null
  },
  "position" : 1,
  "max_issue_count": 0,
  "max_issue_weight": 0,
  "limit_metric":  null
}
ボードからボードリストを削除
管理者とプロジェクトオーナーのみ。ボードリストを削除します。
DELETE /projects/:id/boards/:board_id/lists/:list_id
| 属性 | 種類 | 必須 | 説明 | 
|---|---|---|---|
| id | 整数/文字列 | yes | 認証ユーザーが所有するプロジェクトのIDまたはURLエンコードされたパス | 
| board_id | 整数。 | yes | ボードのID | 
| list_id | 整数。 | yes | ボードリストのID | 
curl --request DELETE --header "PRIVATE-TOKEN: <your_access_token>" "https://gitlab.example.com/api/v4/projects/5/boards/1/lists/1"
