Group Issue Boards API

Group Issue Boards API

对组板的每个 API 调用都必须经过身份验证.

If a user is not a member of a group and the group is private, a request will result in 404 status code.

列出给定组中的发行板.

  1. curl --header "PRIVATE-TOKEN: <your_access_token>" "https://gitlab.example.com/api/v4/groups/5/boards"

响应示例:

  1. [ { "id": 1, "name:": "group issue board", "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 Premium,Silver 或更高版本的用户将看到不同的参数.

响应示例:

  1. [ { "id": 1, "name:": "group issue board", "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 } ] } ]

Single group issue board

获取单个小组问题委员会.

  1. GET /groups/:id/boards/:board_id
Attribute Type Required Description
id integer/string yes 认证用户拥有的组的 ID 或
board_id integer yes 单板编号
  1. curl --header "PRIVATE-TOKEN: <your_access_token>" "https://gitlab.example.com/api/v4/groups/5/boards/1"
  1. { "id": 1, "name:": "group issue board", "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 Premium,Silver 或更高版本的用户将看到不同的参数,这是因为它具有多个组发行板的功能.

响应示例:

  1. { "id": 1, "name:": "group issue board", "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 } ] }

Create a group issue board

创建一个小组发行委员会.

  1. POST /groups/:id/boards
Attribute Type Required Description
id integer/string yes 认证用户拥有的组的 ID 或
name string yes 新板的名称
  1. curl --request POST --header "PRIVATE-TOKEN: <your_access_token>" "https://gitlab.example.com/api/v4/groups/5/boards?name=newboard"

响应示例:

在 GitLab 11.1 中引入 .

更新组发行板.

  1. PUT /groups/:id/boards/:board_id

    响应示例:

    1. { "id": 1, "project": null, "lists": [], "name": "new_name", "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": "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": 11, "name": "GroupLabel", "color": "#428BCA", "description": "" }], "weight": 4 }

    Delete a group issue board

    1. DELETE /groups/:id/boards/:board_id
    Attribute Type Required Description
    id integer/string yes 认证用户拥有的组的 ID 或
    board_id integer yes 单板编号
    1. curl --request DELETE --header "PRIVATE-TOKEN: <your_access_token>" "https://gitlab.example.com/api/v4/groups/5/boards/1"

    List group issue board lists

    获取董事会名单的清单. 不包括openclosed列表

    1. GET /groups/:id/boards/:board_id/lists
    Attribute Type Required Description
    id integer/string yes 认证用户拥有的 ID 或URL 编码路径
    board_id integer yes 单板编号
    1. 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 }, { "id" : 2, "label" : { "name" : "Ready", "color" : "#FF0000", "description" : null }, "position" : 2 }, { "id" : 3, "label" : { "name" : "Production", "color" : "#FF5F00", "description" : null }, "position" : 3 } ]

    获取单板列表.

    1. GET /groups/:id/boards/:board_id/lists/:list_id

    响应示例:

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

    New group issue board list

    创建一个新的发行委员会列表.

    1. POST /groups/:id/boards/:board_id/lists
    Attribute Type Required Description
    id integer/string yes 认证用户拥有的组的 ID 或
    board_id integer yes 单板编号
    label_id integer yes 标签的 ID
    1. curl --request POST --header "PRIVATE-TOKEN: <your_access_token>" "https://gitlab.example.com/api/v4/groups/4/boards/12/lists?milestone_id=7"

    响应示例:

    1. { "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" } }

    Edit group issue board list

    更新现有的发行委员会列表. 此调用用于更改列表位置.

    1. PUT /groups/:id/boards/:board_id/lists/:list_id
    Attribute Type Required Description
    id integer/string yes 认证用户拥有的 ID 或URL 编码路径
    board_id integer yes 单板编号
    list_id integer yes 单板编号
    position integer yes 清单的位置
    1. curl --request PUT --header "PRIVATE-TOKEN: <your_access_token>" "https://gitlab.example.com/api/v4/group/5/boards/1/lists/1?position=2"
    1. { "id" : 1, "label" : { "name" : "Testing", "color" : "#F0AD4E", "description" : null }, "position" : 1 }

    仅适用于管理员和群组所有者. 删除相关的单板列表.

    1. DELETE /groups/:id/boards/:board_id/lists/:list_id