{{< details >}}

  • Tier: 基础版, 专业版, 旗舰版
  • Offering: JihuLab.com, 私有化部署

{{< /details >}}

每次 API 调用 群组议题看板 都必须经过身份验证。

如果用户不是群组成员并且群组是私有的,则 GET 请求会导致 404 状态码。

列出群组中的所有群组议题看板

列出给定群组中的议题看板。

GET /groups/:id/boards
属性 类型 必需 描述
id integer/string 群组的 ID 或 URL 编码路径
curl --header "PRIVATE-TOKEN: <your_access_token>" "https://gitlab.example.com/api/v4/groups/5/boards"

示例响应:

[
  {
    "id": 1,
    "name": "group issue board",
    "hide_backlog_list": false,
    "hide_closed_list": false,
    "group": {
      "id": 5,
      "name": "Documentcloud",
      "web_url": "http://example.com/groups/documentcloud"
    },
    "milestone":   {
      "id": 12,
      "title": "10.0"
    },
    "lists" : [
      {
        "id" : 1,
        "label" : {
          "name" : "Testing",
          "color" : "#F0AD4E",
          "description" : null
        },
        "position" : 1
      },
      {
        "id" : 2,
        "label" : {
          "name" : "Ready",
          "color" : "#FF0000",
          "description" : null
        },
        "position" : 2
      },
      {
        "id" : 3,
        "label" : {
          "name" : "Production",
          "color" : "#FF5F00",
          "description" : null
        },
        "position" : 3
      }
    ]
  }
]

极狐GitLab专业版或旗舰版 的用户会看到不同的参数,因为可以有多个群组看板。

示例响应:

[
  {
    "id": 1,
    "name": "group issue board",
    "hide_backlog_list": false,
    "hide_closed_list": false,
    "group": {
      "id": 5,
      "name": "Documentcloud",
      "web_url": "http://example.com/groups/documentcloud"
    },
    "milestone":   {
      "id": 12,
      "title": "10.0"
    },
    "lists" : [
      {
        "id" : 1,
        "label" : {
          "name" : "Testing",
          "color" : "#F0AD4E",
          "description" : null
        },
        "position" : 1
      },
      {
        "id" : 2,
        "label" : {
          "name" : "Ready",
          "color" : "#FF0000",
          "description" : null
        },
        "position" : 2
      },
      {
        "id" : 3,
        "label" : {
          "name" : "Production",
          "color" : "#FF5F00",
          "description" : null
        },
        "position" : 3
      }
    ]
  }
]

单个群组议题看板

获取单个群组议题看板。

GET /groups/:id/boards/:board_id
属性 类型 必需 描述
id integer/string 群组的 ID 或 URL 编码路径
board_id integer 看板的 ID。
curl --header "PRIVATE-TOKEN: <your_access_token>" "https://gitlab.example.com/api/v4/groups/5/boards/1"

示例响应:

  {
    "id": 1,
    "name": "group issue board",
    "hide_backlog_list": false,
    "hide_closed_list": false,
    "group": {
      "id": 5,
      "name": "Documentcloud",
      "web_url": "http://example.com/groups/documentcloud"
    },
    "milestone":   {
      "id": 12,
      "title": "10.0"
    },
    "lists" : [
      {
        "id" : 1,
        "label" : {
          "name" : "Testing",
          "color" : "#F0AD4E",
          "description" : null
        },
        "position" : 1
      },
      {
        "id" : 2,
        "label" : {
          "name" : "Ready",
          "color" : "#FF0000",
          "description" : null
        },
        "position" : 2
      },
      {
        "id" : 3,
        "label" : {
          "name" : "Production",
          "color" : "#FF5F00",
          "description" : null
        },
        "position" : 3
      }
    ]
  }

极狐GitLab专业版或旗舰版 的用户会看到不同的参数,因为可以有多个群组议题看板。

示例响应:

  {
    "id": 1,
    "name": "group issue board",
    "hide_backlog_list": false,
    "hide_closed_list": false,
    "group": {
      "id": 5,
      "name": "Documentcloud",
      "web_url": "http://example.com/groups/documentcloud"
    },
    "milestone":   {
      "id": 12,
      "title": "10.0"
    },
    "lists" : [
      {
        "id" : 1,
        "label" : {
          "name" : "Testing",
          "color" : "#F0AD4E",
          "description" : null
        },
        "position" : 1
      },
      {
        "id" : 2,
        "label" : {
          "name" : "Ready",
          "color" : "#FF0000",
          "description" : null
        },
        "position" : 2
      },
      {
        "id" : 3,
        "label" : {
          "name" : "Production",
          "color" : "#FF5F00",
          "description" : null
        },
        "position" : 3
      }
    ]
  }

创建群组议题看板

{{< details >}}

  • Tier: 专业版, 旗舰版
  • Offering: JihuLab.com, 私有化部署

{{< /details >}}

创建群组议题看板。

POST /groups/:id/boards
属性 类型 必需 描述
id integer/string 群组的 ID 或 URL 编码路径
name string 新看板的名称。
curl --request POST --header "PRIVATE-TOKEN: <your_access_token>" "https://gitlab.example.com/api/v4/groups/5/boards?name=newboard"

示例响应:

  {
    "id": 1,
    "name": "newboard",
    "hide_backlog_list": false,
    "hide_closed_list": false,
    "project": null,
    "lists" : [],
    "group": {
      "id": 5,
      "name": "Documentcloud",
      "web_url": "http://example.com/groups/documentcloud"
    },
    "milestone": null,
    "assignee" : null,
    "labels" : [],
    "weight" : null
  }

更新群组议题看板

更新群组议题看板。

PUT /groups/:id/boards/:board_id
属性 类型 必需 描述
id integer/string 群组的 ID 或 URL 编码路径
board_id integer 看板的 ID。
name string 看板的新名称。
hide_backlog_list boolean 隐藏未处理列表。
hide_closed_list boolean 隐藏已关闭列表。
assignee_id integer 看板应限定的负责人。仅适用于专业版和旗舰版。
milestone_id integer 看板应限定的里程碑。仅适用于专业版和旗舰版。
labels string 用逗号分隔的标签名称列表,限定看板。仅适用于专业版和旗舰版。
weight integer 权重范围从 0 到 9,看板应限定。仅适用于专业版和旗舰版。
curl --request PUT --header "PRIVATE-TOKEN: <your_access_token>" "https://gitlab.example.com/api/v4/groups/5/boards/1?name=new_name&milestone_id=44&assignee_id=1&labels=GroupLabel&weight=4"

示例响应:

  {
    "id": 1,
    "name": "new_name",
    "hide_backlog_list": false,
    "hide_closed_list": false,
    "project": null,
    "lists": [],
    "group": {
      "id": 5,
      "name": "Documentcloud",
      "web_url": "http://example.com/groups/documentcloud"
    },
    "milestone": {
      "id": 44,
      "iid": 1,
      "group_id": 5,
      "title": "Group Milestone",
      "description": "Group Milestone Desc",
      "state": "active",
      "created_at": "2018-07-03T07:15:19.271Z",
      "updated_at": "2018-07-03T07:15:19.271Z",
      "due_date": null,
      "start_date": null,
      "web_url": "http://example.com/groups/documentcloud/-/milestones/1"
    },
    "assignee": {
      "id": 1,
      "name": "**管理员**",
      "username": "root",
      "state": "active",
      "avatar_url": "https://www.gravatar.com/avatar/e64c7d89f26bd1972efa854d13d7dd61?s=80&d=identicon",
      "web_url": "http://example.com/root"
    },
    "labels": [{
      "id": 11,
      "name": "GroupLabel",
      "color": "#428BCA",
      "description": ""
    }],
    "weight": 4
  }

删除群组议题看板

{{< details >}}

  • Tier: 专业版, 旗舰版
  • Offering: JihuLab.com, 私有化部署

{{< /details >}}

删除群组议题看板。

DELETE /groups/:id/boards/:board_id
属性 类型 必需 描述
id integer/string 群组的 ID 或 URL 编码路径
board_id integer 看板的 ID。
curl --request DELETE --header "PRIVATE-TOKEN: <your_access_token>" "https://gitlab.example.com/api/v4/groups/5/boards/1"

列出群组议题看板列表

获取看板列表。不包括 openclosed 列表

GET /groups/:id/boards/:board_id/lists
属性 类型 必需 描述
id integer/string 群组的 ID 或 URL 编码路径
board_id integer 看板的 ID。
curl --header "PRIVATE-TOKEN: <your_access_token>" "https://gitlab.example.com/api/v4/groups/5/boards/1/lists"

示例响应:

[
  {
    "id" : 1,
    "label" : {
      "name" : "Testing",
      "color" : "#F0AD4E",
      "description" : null
    },
    "position" : 1
  },
  {
    "id" : 2,
    "label" : {
      "name" : "Ready",
      "color" : "#FF0000",
      "description" : null
    },
    "position" : 2
  },
  {
    "id" : 3,
    "label" : {
      "name" : "Production",
      "color" : "#FF5F00",
      "description" : null
    },
    "position" : 3
  }
]

单个群组议题看板列表

获取单个看板列表。

GET /groups/:id/boards/:board_id/lists/:list_id
属性 类型 必需 描述
id integer/string 群组的 ID 或 URL 编码路径
board_id integer 看板的 ID。
list_id integer 看板列表的 ID。
curl --header "PRIVATE-TOKEN: <your_access_token>" "https://gitlab.example.com/api/v4/groups/5/boards/1/lists/1"

示例响应:

{
  "id" : 1,
  "label" : {
    "name" : "Testing",
    "color" : "#F0AD4E",
    "description" : null
  },
  "position" : 1
}

新建群组议题看板列表

创建议题看板列表。

POST /groups/:id/boards/:board_id/lists
属性 类型 必需 描述
id integer/string 群组的 ID 或 URL 编码路径
board_id integer 看板的 ID。
label_id integer 标签的 ID。
assignee_id integer 用户的 ID。仅适用于专业版和旗舰版。
milestone_id integer 里程碑的 ID。仅适用于专业版和旗舰版。
iteration_id integer 迭代的 ID。仅适用于专业版和旗舰版。
curl --request POST --header "PRIVATE-TOKEN: <your_access_token>" "https://gitlab.example.com/api/v4/groups/5/boards/12/lists?milestone_id=7"

示例响应:

{
  "id": 9,
  "label": null,
  "position": 0,
  "milestone": {
    "id": 7,
    "iid": 3,
    "group_id": 12,
    "title": "Milestone with due date",
    "description": "",
    "state": "active",
    "created_at": "2017-09-03T07:16:28.596Z",
    "updated_at": "2017-09-03T07:16:49.521Z",
    "due_date": null,
    "start_date": null,
    "web_url": "https://gitlab.example.com/groups/issue-reproduce/-/milestones/3"
  }
}

编辑群组议题看板列表

更新现有的议题看板列表。此调用用于更改列表位置。

PUT /groups/:id/boards/:board_id/lists/:list_id
属性 类型 必需 描述
id integer/string 群组的 ID 或 URL 编码路径
board_id integer 看板的 ID。
list_id integer 看板列表的 ID。
position integer 列表的位置。
curl --request PUT --header "PRIVATE-TOKEN: <your_access_token>" "https://gitlab.example.com/api/v4/group/5/boards/1/lists/1?position=2"

示例响应:

{
  "id" : 1,
  "label" : {
    "name" : "Testing",
    "color" : "#F0AD4E",
    "description" : null
  },
  "position" : 1
}

删除群组议题看板列表

仅限管理员和群组所有者。删除相关的看板列表。

DELETE /groups/:id/boards/:board_id/lists/:list_id
属性 类型 必需 描述
id integer/string 群组的 ID 或 URL 编码路径
board_id integer 看板的 ID。
list_id integer 看板列表的 ID。
curl --request DELETE --header "PRIVATE-TOKEN: <your_access_token>" "https://gitlab.example.com/api/v4/groups/5/boards/1/lists/1"