Dela via


Fields - Get

Gets information on a specific field.

GET https://dev.azure.com/{organization}/{project}/_apis/wit/fields/{fieldNameOrRefName}?api-version=7.1

URI Parameters

Name In Required Type Description
fieldNameOrRefName
path True

string

Field simple name or reference name

organization
path True

string

The name of the Azure DevOps organization.

project
path

string

Project ID or project 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

WorkItemField2

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

Gets information on a specific field

Sample request

GET https://dev.azure.com/fabrikam/_apis/wit/fields/{fieldNameOrRefName}?api-version=7.1

Sample response

{
  "name": "Iteration Path",
  "referenceName": "System.IterationPath",
  "type": "treePath",
  "readOnly": true,
  "supportedOperations": [
    {
      "referenceName": "SupportedOperations.Under",
      "name": "Under"
    },
    {
      "referenceName": "SupportedOperations.NotUnder",
      "name": "Not Under"
    },
    {
      "referenceName": "SupportedOperations.Equals",
      "name": "="
    },
    {
      "referenceName": "SupportedOperations.NotEquals",
      "name": "<>"
    },
    {
      "referenceName": "SupportedOperations.In",
      "name": "In"
    }
  ],
  "url": "https://dev.azure.com/fabrikam/_apis/wit/fields/System.IterationPath"
}

Definitions

Name Description
FieldType

The type of the field.

FieldUsage

The usage of the field.

ReferenceLinks

The class to represent a collection of REST reference links.

WorkItemField2

Describes a field on a work item and it's properties specific to that work item type.

WorkItemFieldOperation

Describes a work item field operation.

FieldType

The type of the field.

Value Description
boolean

Boolean field type.

dateTime

Datetime field type.

double

Double field type.

guid

Guid field type.

history

History field type.

html

HTML (Multiline) field type.

identity

Identity field type.

integer

Integer field type.

picklistDouble

Double picklist field type. When creating a double picklist field from REST API, use "Double" FieldType.

picklistInteger

Integer picklist field type. When creating a integer picklist field from REST API, use "Integer" FieldType.

picklistString

String picklist field type. When creating a string picklist field from REST API, use "String" FieldType.

plainText

Plain text field type.

string

String field type.

treePath

Treepath field type.

FieldUsage

The usage of the field.

Value Description
none

Empty usage.

tree

Treenode field usage.

workItem

Work item field usage.

workItemLink

Work item link field usage.

workItemTypeExtension

Work Item Type Extension usage.

The class to represent a collection of REST reference links.

Name Type Description
links

object

The readonly view of the links. Because Reference links are readonly, we only want to expose them as read only.

WorkItemField2

Describes a field on a work item and it's properties specific to that work item type.

Name Type Description
_links

ReferenceLinks

Link references to related REST resources.

canSortBy

boolean

Indicates whether the field is sortable in server queries.

description

string

The description of the field.

isDeleted

boolean

Indicates whether this field is deleted.

isIdentity

boolean

Indicates whether this field is an identity field.

isLocked

boolean

Indicates whether this field is marked as locked for editing.

isPicklist

boolean

Indicates whether this instance is picklist.

isPicklistSuggested

boolean

Indicates whether this instance is a suggested picklist .

isQueryable

boolean

Indicates whether the field can be queried in the server.

name

string

The name of the field.

picklistId

string

If this field is picklist, the identifier of the picklist associated, otherwise null

readOnly

boolean

Indicates whether the field is [read only].

referenceName

string

The reference name of the field.

supportedOperations

WorkItemFieldOperation[]

The supported operations on this field.

type

FieldType

The type of the field.

url

string

usage

FieldUsage

The usage of the field.

WorkItemFieldOperation

Describes a work item field operation.

Name Type Description
name

string

Friendly name of the operation.

referenceName

string

Reference name of the operation.