Skip to main content

Get Work Item

GetWorkItem retrieves a single work item by its ID.

It calls GET https://dev.azure.com/{organization}/{project}/_apis/wit/workitems/{id}, where {id} is the value of the Id field.

The activity has four tabs: Configuration, Auth, Input, and Output.

Configuration

FieldRequiredDescription
NameOptionalName of the step, should be unique within this workflow.
DescriptionOptionalDescribe the purpose or function of this step.
API VersionRequiredSpecify the version of the API to use.
OrganizationRequiredEnter the name of the organization.
ProjectRequiredEnter the name of the project.
IdRequiredEnter the ID of the resource.
FieldsOptionalSpecify the fields to include in the response.
As OfOptionalEnter the date or timestamp to filter results as of that time.
$ ExpandOptionalSpecify related entities to include in the response.

Fields, As Of and $ Expand are query parameters. As Of returns the work item as it stood at that time rather than its current state.

Auth

FieldRequiredDescription
Auth TypeOptionalSelect the authentication method for the request. Options: No Auth, Basic, API Key, OAuth 2.
User NameOptionalUsername for Basic Authentication.
PasswordOptionalPassword for Basic Authentication.

Input

This activity is built on the REST Client, so the Input tab is the generic HTTP request rather than an Azure Boards-shaped payload.

FieldRequiredData TypeDescription
TargetRequiredObjectThe HTTP request.

Output

The activity returns an httpResponse object.

FieldData TypeDescription
status.codeIntegerNumeric HTTP status code.
status.messageStringShort message associated with the HTTP status.
headersObjectHTTP response headers.
bodyObjectParsed body of the response — the work item.

The response body carries the work item:

FieldData TypeDescription
idIntegerThe work item ID.
revIntegerRevision number of the work item.
fieldsObjectMap of field and values for the work item.
relationsArrayRelations of the work item.
commentVersionRefObjectRepresents the reference to a specific version of a comment on a Work Item.
multilineFieldsFormatObjectDictionary describing the Format for multiline fields selected by the last edit user.