Work Item Type States - List
Returns the state names and colors for a work item type.
GET https://dev.azure.com/{organization}/{project}/_apis/wit/workitemtypes/{type}/states?api-version=7.1
URI Parameters
Name | In | Required | Type | Description |
---|---|---|---|---|
organization
|
path | True |
string |
The name of the Azure DevOps organization. |
project
|
path | True |
string |
Project ID or project name |
type
|
path | True |
string |
The state name |
api-version
|
query | True |
string |
Version of the API to use. This should be set to '7.1' to use this version of the api. |
Responses
Name | Type | Description |
---|---|---|
200 OK |
successful operation |
Security
oauth2
Type:
oauth2
Flow:
accessCode
Authorization URL:
https://app.vssps.visualstudio.com/oauth2/authorize&response_type=Assertion
Token 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
Scopes
Name | Description |
---|---|
vso.work | Grants the ability to read work items, queries, boards, area and iterations paths, and other work item tracking related metadata. Also grants the ability to execute queries, search work items and to receive notifications about work item events via service hooks. |
Examples
Get work item type states
Sample request
GET https://dev.azure.com/fabrikam/{project}/_apis/wit/workitemtypes/{type}/states?api-version=7.1
Sample response
{
"count": 5,
"value": [
{
"name": "New",
"color": "b2b2b2",
"category": "Proposed"
},
{
"name": "Active",
"color": "007acc",
"category": "InProgress"
},
{
"name": "CustomState",
"color": "5688E0",
"category": "InProgress"
},
{
"name": "Resolved",
"color": "ff9d00",
"category": "Resolved"
},
{
"name": "Closed",
"color": "339933",
"category": "Completed"
}
]
}
Definitions
WorkItemStateColor
Work item type state name, color and state category
Name | Type | Description |
---|---|---|
category |
string |
Category of state |
color |
string |
Color value |
name |
string |
Work item type state name |