Get Work Item Comments
GetWorkItemComments retrieves a batch of comments from a work item.
It calls
GET https://dev.azure.com/{organization}/{project}/_apis/wit/workItems/{workItemId}/comments,
where {workItemId} is the value of the Work Item 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. |
| Work Item Id | Required | Enter the ID of the work item to retrieve. |
| Ids | Required | Enter the IDs of the items to retrieve, separated by commas. |
| Include Deleted | Optional | Specify whether to include deleted items in the results. |
| $ Expand | Optional | Enter the related entities to expand in the response. |
Include Deleted is a checkbox. Ids is a required query parameter and takes a comma-separated list.
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 batch of comments. |
The response body carries the batch:
| Field | Data Type | Description |
|---|---|---|
| comments | Array | List of comments in the current batch. |
| count | Integer | The count of comments in the current batch. |
| totalCount | Integer | Total count of comments on a work item. |
| continuationToken | String | A string token that can be used to retrieving next page of comments if available. Otherwise null. |
| nextPage | String | Uri to the next page of comments if it is available. Otherwise null. |