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
| Field | Required | Description |
|---|---|---|
| Name | Optional | Name of the step, should be unique within this workflow. |
| Description | Optional | Describe the purpose or function of this step. |
| API Version | Required | Specify the version of the API to use. |
| Organization | Required | Enter the name of the organization. |
| Project | Required | Enter the name of the project. |
| Id | Required | Enter the ID of the resource. |
| Fields | Optional | Specify the fields to include in the response. |
| As Of | Optional | Enter the date or timestamp to filter results as of that time. |
| $ Expand | Optional | Specify 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
| Field | Required | Description |
|---|---|---|
| Auth Type | Optional | Select the authentication method for the request. Options: No Auth, Basic, API Key, OAuth 2. |
| User Name | Optional | Username for Basic Authentication. |
| Password | Optional | Password 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.
| Field | Required | Data Type | Description |
|---|---|---|---|
| Target | Required | Object | The HTTP request. |
Output
The activity returns an httpResponse object.
| Field | Data Type | Description |
|---|---|---|
| status.code | Integer | Numeric HTTP status code. |
| status.message | String | Short message associated with the HTTP status. |
| headers | Object | HTTP response headers. |
| body | Object | Parsed body of the response — the work item. |
The response body carries the work item:
| Field | Data Type | Description |
|---|---|---|
| id | Integer | The work item ID. |
| rev | Integer | Revision number of the work item. |
| fields | Object | Map of field and values for the work item. |
| relations | Array | Relations of the work item. |
| commentVersionRef | Object | Represents the reference to a specific version of a comment on a Work Item. |
| multilineFieldsFormat | Object | Dictionary describing the Format for multiline fields selected by the last edit user. |