Work Item Types Field - Get

Get a field for a work item type with detailed references.

GET https://dev.azure.com/{organization}/{project}/_apis/wit/workitemtypes/{type}/fields/{field}?api-version=7.1-preview.3
GET https://dev.azure.com/{organization}/{project}/_apis/wit/workitemtypes/{type}/fields/{field}?$expand={$expand}&api-version=7.1-preview.3

URI Parameters

Name In Required Type Description
field
path True

string

organization
path True

string

The name of the Azure DevOps organization.

project
path True

string

Project ID or project name

type
path True

string

Work item type.

api-version
query True

string

Version of the API to use. This should be set to '7.1-preview.3' to use this version of the api.

$expand
query

WorkItemTypeFieldsExpandLevel

Expand level for the API response. Properties: to include allowedvalues, default value, isRequired etc. as a part of response; None: to skip these properties.

Responses

Name Type Description
200 OK

WorkItemTypeFieldWithReferences

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 project scoped work item type field data
Get project scoped work item type field data with expand option

Get project scoped work item type field data

Sample Request

GET https://dev.azure.com/fabrikam/Fabrikam-Fiber-Git/_apis/wit/workitemtypes/Bug/fields/System.IterationPath?api-version=7.1-preview.3

Sample Response

{
  "helpText": "The iteration within which this bug will be fixed",
  "alwaysRequired": false,
  "defaultValue": null,
  "referenceName": "System.IterationPath",
  "name": "Iteration Path",
  "url": "https://dev.azure.com/fabrikam/_apis/wit/fields/System.IterationPath"
}

Get project scoped work item type field data with expand option

Sample Request

GET https://dev.azure.com/fabrikam/Fabrikam-Fiber-Git/_apis/wit/workitemtypes/Bug/fields/System.ChangedBy?$expand=All&api-version=7.1-preview.3

Sample Response

{
  "alwaysRequired": false,
  "defaultValue": null,
  "allowedValues": [
    {
      "displayName": "Jamal Hartnett",
      "id": "df828ec3-71d8-6e69-9afd-e736c5a32145",
      "uniqueName": "fabrikamfiber4@hotmail.com",
      "descriptor": "s2s.M2FjODRhZmItYWIwNC00ZWM0LWEyZWItOGEyYWJmNGJlNDQ3QDcyZjk4OGJmLTg2ZjEtNCFhZi05MWFiLTJkN2NkMDExZGI0Nw"
    },
    {
      "displayName": "Norman Paulk",
      "id": "df828ec3-71d8-6e69-9afd-e736c5b32145",
      "uniqueName": "Fabrikamfiber16@hotmail.com",
      "descriptor": "s2s.M2FjODRhZmIeYWIwNC00ZWM0LWEyZWItOGEyYWJmNGJlNDQ3QDcyZjk4OGJmLTg2ZjEtNDFhZi05MWFiLTJkN2NkMDExZGI0Nw"
    },
    {
      "displayName": "Chuck Reinhart",
      "id": "df828ec3-71d8-6e69-9afd-g736c5a32145",
      "uniqueName": "fabrikamfiber3@hotmail.com",
      "descriptor": "s2s.M2FjODRhZmItYWIwNC00SWG0LWEyZWItOGEyYWJmNGJlNDQ3QDcyZjk4OGJmLTg2ZjEtNDFhZi05MWFiLTJkN2NkMDExZGI0Nw"
    }
  ],
  "dependentFields": [],
  "referenceName": "System.ChangedBy",
  "name": "Changed By",
  "url": "https://dev.azure.com/fabrikam/_apis/wit/fields/System.ChangedBy"
}

Definitions

Name Description
WorkItemFieldReference

Reference to a field in a work item

WorkItemTypeFieldsExpandLevel

Expand level for the API response. Properties: to include allowedvalues, default value, isRequired etc. as a part of response; None: to skip these properties.

WorkItemTypeFieldWithReferences

Field Instance of a workItemype with detailed references.

WorkItemFieldReference

Reference to a field in a work item

Name Type Description
name

string

The friendly name of the field.

referenceName

string

The reference name of the field.

url

string

The REST URL of the resource.

WorkItemTypeFieldsExpandLevel

Expand level for the API response. Properties: to include allowedvalues, default value, isRequired etc. as a part of response; None: to skip these properties.

Name Type Description
all

string

Includes allowed values and dependent fields of the field.

allowedValues

string

Includes allowed values for the field.

dependentFields

string

Includes dependent fields of the field.

none

string

Includes only basic properties of the field.

WorkItemTypeFieldWithReferences

Field Instance of a workItemype with detailed references.

Name Type Description
allowedValues

object[]

The list of field allowed values.

alwaysRequired

boolean

Indicates whether field value is always required.

defaultValue

object

Represents the default value of the field.

dependentFields

WorkItemFieldReference[]

The list of dependent fields.

helpText

string

Gets the help text for the field.

name

string

The friendly name of the field.

referenceName

string

The reference name of the field.

url

string

The REST URL of the resource.