Work Items - Get Work Item Template

Returns a single work item from a template.

GET https://dev.azure.com/{organization}/{project}/_apis/wit/workitems/${type}?api-version=4.1
GET https://dev.azure.com/{organization}/{project}/_apis/wit/workitems/${type}?fields={fields}&asOf={asOf}&$expand={$expand}&api-version=4.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 work item type name

api-version
query True
  • string

Version of the API to use. This should be set to '4.1' to use this version of the api.

$expand
query

The expand parameters for work item attributes. Possible options are { None, Relations, Fields, Links, All }.

asOf
query
  • string
date-time

AsOf UTC date time string

fields
query
  • string

Comma-separated list of requested fields

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 and to receive notifications about work item events via service hooks.

Definitions

ReferenceLinks

The class to represent a collection of REST reference links.

WorkItem

Describes a work item.

WorkItemExpand

The expand parameters for work item attributes. Possible options are { None, Relations, Fields, Links, All }.

WorkItemRelation

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.

WorkItem

Describes a work item.

Name Type Description
_links

Link references to related REST resources.

fields
  • object

Map of field and values for the work item.

id
  • integer

The work item ID.

relations

Relations of the work item.

rev
  • integer

Revision number of the work item.

url
  • string

WorkItemExpand

The expand parameters for work item attributes. Possible options are { None, Relations, Fields, Links, All }.

Name Type Description
all
  • string
fields
  • string
links
  • string
none
  • string
relations
  • string

WorkItemRelation

Name Type Description
attributes
  • object

Collection of link attributes.

rel
  • string

Relation type.

url
  • string

Link url.