Skip to main content

Create Work Item

CreateWorkItem creates a work item of a specified type in an Azure Boards project.

It calls POST https://dev.azure.com/{organization}/{project}/_apis/wit/workitems/${type}, where {organization}, {project} and {type} come from the Organization, Project and Type fields.

The activity has five tabs: Configuration, AddMetadata, 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.
TypeRequiredSpecify the type of resource.
Suppress NotificationsOptionalSpecify whether to suppress notifications during the operation.
Validate OnlyOptionalSpecify whether to validate only without making changes.
ExpandOptionalSpecify the related entities to include in the response.
Bypass RulesOptionalSpecify whether to bypass certain rules during the operation.

Suppress Notifications, Validate Only and Bypass Rules are checkboxes. Type is a path parameter, so it selects which work item type is created — the remaining three are query parameters on the request.

AddMetadata

The Operations table is mapped to the request body. Each row is one JSON Patch operation against the new work item.

ColumnDescription
OpThe patch operation. One of add, remove, replace, move, copy, or test.
PathThe target of the operation.
ValueThe value to apply.
FromThe source location, for move and copy.

Auth

FieldRequiredDescription
Auth TypeOptionalSelect the authentication method for the request. Options: No Auth, Basic, API Key, OAuth 2.
Auth ResourceOptionalOAuth resource containing credentials.
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. The method, host and URI are already set.

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