States - List

返回进程的工作项类型中所有状态定义的列表。

GET https://dev.azure.com/{organization}/_apis/work/processdefinitions/{processId}/workItemTypes/{witRefName}/states?api-version=4.1-preview.1

URI 参数

名称 必需 类型 说明
organization
path True

string

Azure DevOps 组织的名称。

processId
path True

string

uuid

进程的 ID

witRefName
path True

string

工作项类型的引用名称

api-version
query True

string

要使用的 API 版本。 这应设置为“4.1-preview.1”才能使用此版本的 API。

响应

名称 类型 说明
200 OK

WorkItemStateResultModel[]

成功的操作

安全性

accessToken

个人访问令牌。 将任何值用作用户名和令牌作为密码。

类型: basic

示例

Get the state definitions

示例请求

GET https://dev.azure.com/{organization}/_apis/work/processdefinitions/{processId}/workItemTypes/{witRefName}/states?api-version=4.1-preview.1

示例响应

{
  "count": 4,
  "value": [
    {
      "id": "de0f680b-1280-4732-814c-96a006ac1d3a",
      "name": "New",
      "color": "b2b2b2",
      "stateCategory": "Proposed",
      "order": 1,
      "url": "https://dev.azure.com/fabrikam/_apis/work/processDefinitions/a6c1d9b6-ea27-407d-8c40-c9b7ab112bb6/workItemTypes/myAgile.CustomWIT/states/de0f680b-1280-4732-814c-96a006ac1d3a"
    },
    {
      "id": "434c2e8d-08aa-4305-b9f9-0d40fa268b20",
      "name": "Active",
      "color": "007acc",
      "stateCategory": "InProgress",
      "order": 2,
      "url": "https://dev.azure.com/fabrikam/_apis/work/processDefinitions/a6c1d9b6-ea27-407d-8c40-c9b7ab112bb6/workItemTypes/myAgile.CustomWIT/states/434c2e8d-08aa-4305-b9f9-0d40fa268b20"
    },
    {
      "id": "aeb5902e-9731-4977-8501-bfcf07e38252",
      "name": "Ready to test",
      "color": "207752",
      "stateCategory": "InProgress",
      "order": 3,
      "url": "https://dev.azure.com/fabrikam/_apis/work/processDefinitions/a6c1d9b6-ea27-407d-8c40-c9b7ab112bb6/workItemTypes/myAgile.CustomWIT/states/aeb5902e-9731-4977-8501-bfcf07e38252"
    },
    {
      "id": "174d9042-bbab-4fbb-bef8-b7b28c76700f",
      "name": "Closed",
      "color": "339933",
      "stateCategory": "Completed",
      "order": 4,
      "url": "https://dev.azure.com/fabrikam/_apis/work/processDefinitions/a6c1d9b6-ea27-407d-8c40-c9b7ab112bb6/workItemTypes/myAgile.CustomWIT/states/174d9042-bbab-4fbb-bef8-b7b28c76700f"
    }
  ]
}

定义

WorkItemStateResultModel

名称 类型 说明
color

string

状态的颜色

hidden

boolean

状态是否隐藏

id

string

状态的 ID

name

string

状态的名称

order

integer

显示状态的顺序

stateCategory

string

状态的类别

url

string

状态的 URL