Skip to main content

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

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.
Work Item IdRequiredEnter the ID of the work item to retrieve.
IdsRequiredEnter the IDs of the items to retrieve, separated by commas.
Include DeletedOptionalSpecify whether to include deleted items in the results.
$ ExpandOptionalEnter 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

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 batch of comments.

The response body carries the batch:

FieldData TypeDescription
commentsArrayList of comments in the current batch.
countIntegerThe count of comments in the current batch.
totalCountIntegerTotal count of comments on a work item.
continuationTokenStringA string token that can be used to retrieving next page of comments if available. Otherwise null.
nextPageStringUri to the next page of comments if it is available. Otherwise null.