Skip to main content

Get Work Item Comment

GetWorkItemComment retrieves a single comment from a work item.

It calls GET https://dev.azure.com/{organization}/{project}/_apis/wit/workItems/{workItemId}/comments/{commentId}, where {workItemId} and {commentId} come from the Work Item Id and Comment Id fields.

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.
Comment IdRequiredEnter the ID of the comment.
Include DeletedOptionalWhether to include deleted items in the response.
$ ExpandOptionalSpecify related entities to include in the response.

Include Deleted is a checkbox.

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 comment.

The response body carries the comment:

FieldData TypeDescription
idIntegerThe id assigned to the comment.
workItemIdIntegerThe id of the work item this comment belongs to.
textStringThe text of the comment.
renderedTextStringThe text of the comment in HTML format.
formatObjectRepresents the possible types for the comment format.
versionIntegerThe current version of the comment.
isDeletedBooleanIndicates if the comment has been deleted.
createdByObjectThe identity that created the comment.
createdDateStringThe creation date of the comment.
createdOnBehalfOfObjectThe identity the comment was added on behalf of.
createdOnBehalfDateStringEffective Date/time value for adding the comment. Can be optionally different from CreatedDate.
modifiedByObjectThe identity that last modified the comment.
modifiedDateStringThe last modification date of the comment.
mentionsArrayThe mentions of the comment.
reactionsArrayThe reactions of the comment.