CreateWorkitemV2

Updated at:

Create work items for a project, such as requirements, defects, tasks, risks, and themes.

Operation description

See the Get work item field information and Get work item types in a project APIs for details about which fields to complete.

To upload an image to the description area, ensure its size does not exceed 5 MB. We recommend uploading images smaller than 1 MB. In the description field, insert the image using the following format: <img src="data:image/png;base64,*************************"/> In this format, the string of asterisks represents the base64 encoding of the image content, and png is the image format. Replace png with the actual format of your image.

Try it now

Try this API in OpenAPI Explorer, no manual signing needed. Successful calls auto-generate SDK code matching your parameters. Download it with built-in credential security for local usage.

Test

RAM authorization

No authorization for this operation. If you encounter issues with this operation, contact technical support.

Request syntax

POST /organization/{organizationId}/workitem HTTP/1.1

Path Parameters

Parameter

Type

Required

Description

Example

organizationId

string

Yes

The organization ID. You can find this ID in the URL of your organization on Alibaba Cloud DevOps, for example, https://devops.aliyun.com/organization/{organizationId}.

5ebbc0228123212b59xxxxx

Request parameters

Parameter

Type

Required

Description

Example

body

object

No

The request body.

subject

string

Yes

The title of the work item.

测试工作项

description

string

No

The description. To upload an image, we recommend using images smaller than 1 MB. To insert an image, use the following format: <img src="data:image/png;base64,*************************"/> where the asterisks (**) represent the Base64-encoded image content, and png is the image format. Replace png with the actual image format.

测试内容

assignedTo

string

Yes

The assignee ID.

19xxxx31947xxxx

spaceIdentifier

string

Yes

The unique identifier of the project.

asd345xxxxx9q9845xxxxx34

category

string

Yes

The category of the work item. Valid values: Req, Bug, Task, and Topic.

Req

workitemTypeIdentifier

string

Yes

The ID of the work item type. Call the Get Workitem Types API to get the available types for the project.

9uy29901re573f561d69jn40

fieldValueList

array<object>

No

A list of field values. Call the Get Workitem Fields List API to determine the available fields for the specified work item type.

object

No

A single field-value pair.

fieldIdentifier

string

No

The unique identifier of the field.

6aexxxxxa1d98c09c60xxxx16

value

string

No

The field value.

10

parentIdentifier

string

No

The parent work item ID.

11223331122

versions

array

No

A list of unique version identifiers.

string

No

The unique identifier of the version.

[1111,1223]

sprintIdentifier

string

No

The unique identifier of the sprint.

455532323455

tags

array

No

A list of unique tag identifiers.

string

No

The unique identifier of the tag.

[1112,3344]

trackers

array

No

A list of tracker account IDs.

string

No

The tracker account ID.

1123344

participants

array

No

A list of participant account IDs.

string

No

The participant account ID.

1234454

verifier

string

No

The verifier's account ID.

1561159309......

Response elements

Element

Type

Description

Example

object

The response schema

requestId

string

The unique request ID. Use this ID for troubleshooting.

EAE03103-5497-58D1-9169-E524DDE8604C

errorCode

string

  • The error code returned if the request fails (when success is false).

  • An empty string is returned if the request succeeds (when success is true).

InvalidTagGroup.IdNotFound

errorMessage

string

  • The error message returned if the request fails (when success is false).

  • An empty string is returned if the request succeeds (when success is true).

SYSTEM_UNKNOWN_ERROR

success

string

Indicates whether the request was successful.

true

workitemIdentifier

string

The unique identifier of the work item.

11234455454355

workitemIdentifier is the work item ID returned upon successful creation.

Examples

Success response

JSON format

{
  "requestId": "EAE03103-5497-58D1-9169-E524DDE8604C",
  "errorCode": "InvalidTagGroup.IdNotFound",
  "errorMessage": "SYSTEM_UNKNOWN_ERROR",
  "success": "true",
  "workitemIdentifier": "11234455454355"
}

Error codes

HTTP status code

Error code

Error message

Description

400 Openapi.RequestError request error
403 Operate.NoPermission NoPermission You are not authorized to perform this operation.

See Error Codes for a complete list.

Release notes

See Release Notes for a complete list.