Columns - Update

更新板上的列

PUT https://dev.azure.com/{organization}/{project}/{team}/_apis/work/boards/{board}/columns?api-version=7.1

URI 参数

名称 必需 类型 说明
board
path True

string

特定板的名称或 ID

organization
path True

string

Azure DevOps 组织的名称。

project
path True

string

项目 ID 或项目名称

team
path

string

团队 ID 或团队名称

api-version
query True

string

要使用的 API 版本。 这应设置为“7.1”才能使用此版本的 API。

请求正文

名称 类型 说明
body

BoardColumn[]

要更新的板列列表

响应

名称 类型 说明
200 OK

BoardColumn[]

成功作

安全性

oauth2

类型: oauth2
流向: accessCode
授权 URL: https://app.vssps.visualstudio.com/oauth2/authorize&response_type=Assertion
令牌 URL: https://app.vssps.visualstudio.com/oauth2/token?client_assertion_type=urn:ietf:params:oauth:client-assertion-type:jwt-bearer&grant_type=urn:ietf:params:oauth:grant-type:jwt-bearer

作用域

名称 说明
vso.work_write 授予读取、创建和更新工作项和查询、更新板元数据、读取区域和迭代路径、其他工作项跟踪相关元数据、执行查询以及通过服务挂钩接收有关工作项事件的通知的能力。

示例

Update columns on a board

示例请求

PUT https://dev.azure.com/fabrikam/Fabrikam/Fabrikam Team/_apis/work/boards/{board}/columns?api-version=7.1

[
  {
    "id": "12eed5fb-8af3-47bb-9d2a-058fbe7e1196",
    "name": "New",
    "itemLimit": 0,
    "stateMappings": {
      "Product Backlog Item": "New",
      "Bug": "New"
    },
    "columnType": "incoming"
  },
  {
    "id": "5f72391d-af1c-4754-9459-23138eba13e3",
    "name": "Approved",
    "itemLimit": 5,
    "stateMappings": {
      "Product Backlog Item": "Approved",
      "Bug": "Approved"
    },
    "isSplit": false,
    "description": "",
    "columnType": "inProgress"
  },
  {
    "id": "4ddb0875-547e-4d2c-b36a-4ea9a1f7be41",
    "name": "Committed",
    "itemLimit": 5,
    "stateMappings": {
      "Product Backlog Item": "Committed",
      "Bug": "Committed"
    },
    "isSplit": false,
    "description": "",
    "columnType": "inProgress"
  },
  {
    "id": "1016c466-6cb6-4bf9-9a19-4e9cc88204df",
    "name": "Done",
    "itemLimit": 0,
    "stateMappings": {
      "Product Backlog Item": "Done",
      "Bug": "Done"
    },
    "columnType": "outgoing"
  }
]

示例响应

{
  "count": 4,
  "value": [
    {
      "id": "12eed5fb-8af3-47bb-9d2a-058fbe7e1196",
      "name": "New",
      "itemLimit": 0,
      "stateMappings": {
        "Product Backlog Item": "New",
        "Bug": "New"
      },
      "columnType": "incoming"
    },
    {
      "id": "5f72391d-af1c-4754-9459-23138eba13e3",
      "name": "Approved",
      "itemLimit": 5,
      "stateMappings": {
        "Product Backlog Item": "Approved",
        "Bug": "Approved"
      },
      "isSplit": false,
      "description": "",
      "columnType": "inProgress"
    },
    {
      "id": "4ddb0875-547e-4d2c-b36a-4ea9a1f7be41",
      "name": "Committed",
      "itemLimit": 5,
      "stateMappings": {
        "Product Backlog Item": "Committed",
        "Bug": "Committed"
      },
      "isSplit": false,
      "description": "",
      "columnType": "inProgress"
    },
    {
      "id": "1016c466-6cb6-4bf9-9a19-4e9cc88204df",
      "name": "Done",
      "itemLimit": 0,
      "stateMappings": {
        "Product Backlog Item": "Done",
        "Bug": "Done"
      },
      "columnType": "outgoing"
    }
  ]
}

定义

名称 说明
BoardColumn
BoardColumnType

BoardColumn

名称 类型 说明
columnType

BoardColumnType

description

string

id

string (uuid)

isSplit

boolean

itemLimit

integer (int32)

name

string

stateMappings

object

BoardColumnType

说明
inProgress
incoming
outgoing