Updating Work Items in Batches
Function
This API is used to update work items in batches.
Calling Method
For details, see Calling APIs.
Authorization Information
Each account root user has all the permissions required to call all APIs, but IAM users must be assigned the following required identity policy-based permissions. For details about the required permissions, see Permissions Policies and Supported Actions.
URI
PUT /v2/projects/{project_id}/issues/batch-update
| Parameter | Mandatory | Type | Description |
|---|---|---|---|
| project_id | Yes | String | Definition A 32-character UUID. It uniquely identifies a project. Obtain a project ID by calling the API for querying projects. The value of project_id in the response message body is a project ID. Constraints A string of 32 characters consisting of letters and digits. Range N/A Default Value N/A |
| Parameter | Mandatory | Type | Description |
|---|---|---|---|
| move | No | Boolean | Description: Whether to move issues during batch update. If the request does not contain the move parameter, the default value is false. Value range: true: move false: not move Default value: false |
| OperateType | Yes | String | Definition: Specifies the operation type, for example, import or export. If the operate_type parameter is not provided in the request, this parameter will be null. Constraints: A string of 32 characters consisting of letters and digits. Range: N/A Default Value: null |
| Domain-Id | No | String | Definition Tenant ID. You can query the tenant information of a user using the API for obtaining the current user information. Constraints A string of 32 characters consisting of letters and digits. Range N/A Default Value N/A |
| category | No | String | Description: work item type, such as RR, FE, IR, and TASK. Constraints: Value range: N/A Default value: N/A |
| IsPlan | No | Boolean | Definition: Whether it is a plan issue. Constraints: N/A Value range: true: plan issue. false: not a plan issue. Default value: false |
Request Parameters
| Parameter | Mandatory | Type | Description |
|---|---|---|---|
| X-Auth-Token | Yes | String | Definition User token. Obtain a token by calling the IAM API for obtaining a user token. The value of X-Subject-Token in the response header is the user token. Constraints N/A Range The value contains 10 to 32,768 characters. Default Value N/A |
| Parameter | Mandatory | Type | Description |
|---|---|---|---|
| - | No | Object | Request parameter |
Response Parameters
Status code: 200
None
Status code: 400
| Parameter | Type | Description |
|---|---|---|
| error_code | String | Definition: Error code. Value range: N/A |
| error_msg | String | Definition: Error description. Value range: N/A |
Status code: 401
| Parameter | Type | Description |
|---|---|---|
| error_code | String | Definition: Error code. Value range: N/A |
| error_msg | String | Definition: Error description. Value range: N/A |
| request_id | String | Definition Request ID, which is automatically generated by the system. Range N/A |
Example Requests
PUT https://{endpoint}/v2/projects/5740964bd1164d569bf40258eb343726/issues/batch-update
{
"id" : [ "1135270157030600704", "1135269726766313472", "1113411113095049216" ],
"attribute" : {
"priority" : "High"
}
} Example Responses
Status code: 200
{
"status" : "success",
"message" : null,
"result" : [ {
"success" : [ {
"modified_by" : "a360371833bf4c558f796fd707b44daf",
"operation_id" : "49a61374-0df5-42d4-94aa-2ddd0ed98fff",
"id" : "1113411113095049216",
"priority" : "High",
"modified_date" : "1752722645053"
}, {
"modified_by" : "a360371833bf4c558f796fd707b44daf",
"operation_id" : "5261db89-4b4d-4ed0-986f-c861bf94e2ed",
"id" : "1135269726766313472",
"priority" : "High",
"modified_date" : "1752722645171"
}, {
"modified_by" : "a360371833bf4c558f796fd707b44daf",
"operation_id" : "2324c0d3-a377-48f7-b869-558f12bda613",
"id" : "1135270157030600704",
"priority" : "High",
"modified_date" : "1752722645275"
} ],
"failed" : [ ],
"success_num" : 3,
"fail_num" : 0,
"cr_plan_issues" : [ ],
"cr_update_issues" : [ ]
} ]
} Status Codes
| Status Code | Description |
|---|---|
| 200 | Request succeeded. |
| 400 | Invalid request. |
| 401 | Incorrect or invalid authentication information. |
Error Codes
See Error Codes.
What is your overall rating for this page?
Thank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot