Updating To-Do Task Information
Function
This API is used to update to-do task information.
Calling Method
For details, see Calling APIs.
URI
PUT /v1/{project_id}/workspaces/{workspace_id}/soc/tasks/{task_id}
|
Parameter |
Mandatory |
Type |
Description |
|---|---|---|---|
|
project_id |
Yes |
String |
Definition Project ID, which is used to specify the project that an asset belongs to. You can query the assets of a project by project ID. You can obtain the project ID from the API or console. Obtaining the Project ID Constraints N/A Range N/A Default Value N/A |
|
workspace_id |
Yes |
String |
Definition Workspace ID. Range N/A |
|
task_id |
Yes |
String |
Definition ID of the to-do task. Range N/A |
Request Parameters
|
Parameter |
Mandatory |
Type |
Description |
|---|---|---|---|
|
X-Auth-Token |
Yes |
String |
Definition User token. Constraints N/A Range N/A Default Value N/A |
|
Content-Type |
Yes |
String |
Definition Content type. Constraints N/A Range Default Value N/A |
Response Parameters
Status code: 200
|
Parameter |
Type |
Description |
|---|---|---|
|
code |
String |
Definition Error code. If the request is successful, the value is "00000000". Range N/A |
|
message |
String |
Definition Error message description. Range N/A |
|
request_id |
String |
Definition Request ID. Constraints N/A |
|
success |
Boolean |
Definition Whether the operation was successful. Range |
|
data |
TaskInfo object |
Information of task |
|
Parameter |
Type |
Description |
|---|---|---|
|
id |
String |
Definition ID of the to-do task. Range N/A |
|
aopengine_task_id |
String |
Definition Engine task ID of the to-do task. Range N/A |
|
name |
String |
Definition Name of the to-do task. Range N/A |
|
project_id |
String |
Definition Project ID for the to-do task. Range N/A |
|
description |
String |
Definition Description of the to-do task. Range N/A |
|
create_time |
String |
Definition To-do task creation time. Range N/A |
|
creator_id |
String |
Definition Creator ID of the to-do task. Range system |
|
creator_name |
String |
Definition Creator name of the to-do task. Range N/A |
|
update_time |
String |
Definition To-do task update time. Range N/A |
|
modifier_id |
String |
Definition Modifier ID of the to-do task. Range system |
|
modifier_name |
String |
Definition Modifier name of the to-do task. Range N/A |
|
approveuser_id |
String |
Definition ID of the to-do task reviewer. Range N/A |
|
approveuser_name |
String |
Definition Username of the to-do task reviewer. Range N/A |
|
approver |
String |
Definition Username of the to-do task reviewer Range N/A |
|
notes |
String |
Definition Remarks of the to-do task. Range N/A |
|
definition_key |
String |
Definition Workflow topology key of the to-do task node. Range N/A |
|
note |
String |
Definition Remarks of the to-do task. Range N/A |
|
due_date |
String |
Definition To-do task overdue time. Range The default value is the creation time plus 15 days. |
|
action_id |
String |
Definition Workflow or playbook ID of the to-do task node. If business_type is WORKFLOWPUBLISH or WORKFLOWNODEAPPROVE, the value of this parameter is the workflow ID. If business_type is PLAYBOOKPUBLISH or PLAYBOOKNODEAPPROVE, the value of this parameter is the playbook ID. Range N/A |
|
action_version_id |
String |
Definition Workflow or playbook version ID of the to-do task node. If business_type is WORKFLOWPUBLISH or WORKFLOWNODEAPPROVE, the value of this parameter is the workflow version ID. If business_type is PLAYBOOKPUBLISH or PLAYBOOKNODEAPPROVE, the value of this parameter is the playbook version ID. Range N/A |
|
action_instance_id |
String |
Definition Workflow or playbook instance ID of the to-do task node. If business_type is WORKFLOWNODEAPPROVE, the value of this parameter is the workflow instance ID. If business_type is PLAYBOOKNODEAPPROVE, the value of this parameter is the playbook instance ID. Range N/A |
|
workspace_id |
String |
Definition ID of the workspace for the to-do task. Range N/A |
|
review_comments |
String |
Definition Review comments of the to-do task. Range N/A |
|
view_parameters |
String |
Definition Parameters for viewing to-do tasks. Range N/A |
|
handle_parameters |
String |
Definition Manual processing parameters of the to-do task. Range N/A |
|
business_type |
String |
Definition Service type of the to-do task. Range |
|
related_object |
String |
Definition Name of the workflow or playbook associated with the to-do task. Range N/A |
|
attachment_id_list |
Array of strings |
Definition ID list of attachments of the to-do task node. Range N/A |
|
comments |
Array of TaskCommentInfo objects |
Definition To-do comments of the to-do task node. Range N/A |
|
status |
String |
Definition Service type of the to-do task. Range |
|
due_handle |
String |
Definition Handling method of expired to-do tasks. Range |
|
Parameter |
Type |
Description |
|---|---|---|
|
id |
String |
Definition To-do task comment ID. Range N/A |
|
message |
String |
Definition To-do task comment information. Range N/A |
|
user_id |
String |
Definition ID of to-do task comment creator. Range N/A |
|
user_name |
String |
Definition Name of the to-do task comment creator. Range N/A |
|
time |
Long |
Definition Time when the to-do task comment is created. Range N/A |
Status code: 400
|
Parameter |
Type |
Description |
|---|---|---|
|
code |
String |
Definition Error code. Range N/A |
|
message |
String |
Definition Error description. Range N/A |
Example Requests
-
{ "action" : "TERMINATE" } -
{ "action" : "CONTINUE" } -
{ "action" : "ADD_COMMENT", "comment" : "comment content" } -
{ "action" : "DELETE_COMMENT", "comment_id" : "909494e3-558e-46b6-a9eb-07a8e18ca62f" } -
Add an attachment to a to-do task node.
{ "action" : "ADD_ATTACHMENT", "attachment_id" : "909494e3-558e-46b6-a9eb-07a8e1XXXX" } -
Remove an attachment from a to-do task node.
{ "action" : "DELETE_ATTACHMENT", "attachment_id" : "909494e3-558e-46b6-a9eb-07a8e1XXXX" }
Example Responses
Status code: 200
Response of update task
{
"code" : "00000000",
"data" : {
"id" : "3e4c170e-7cc9-11f0-9216-fa163e209978",
"aopengine_task_id" : "3e4c170e-7cc9-11f0-9216-fa163e209978",
"name" : "test task",
"project_id" : "15645222e8744afa985c93dab6341da6",
"description" : "",
"create_time" : "2025-08-19T14:53:42.424Z+0800",
"creator_id" : "",
"creator_name" : "XXXX",
"modifier_id" : "",
"modifier_name" : "",
"update_time" : "2025-08-19T16:50:23.743Z+0800",
"approveuser_id" : "",
"approveuser_name" : "",
"approver" : "",
"definition_key" : "Activity_1xkg6ju",
"notes" : "006",
"due_date" : "2025-09-03T14:53:42.398Z+0800",
"action_id" : "e1426fd5-bf48-3b71-8f8e-d5ca1047f68b",
"action_version_id" : "0696648d-9d20-4e21-b1fd-24f9a6f4918c",
"action_instance_id" : "xxxxx",
"workspace_id" : "75645d0a-93b8-4a7f-a77c-e97009389445",
"view_parameters" : "",
"handle_parameters" : "",
"review_comments" : "",
"business_type" : "PLAYBOOKNODEAPPROVE",
"related_object" : "test",
"attachment_id_list" : [ ],
"comments" : [ ],
"due_handle" : "",
"status" : "waiting"
},
"message" : "",
"request_id" : "",
"success" : true
}
Status Codes
|
Status Code |
Description |
|---|---|
|
200 |
Response of update task |
|
400 |
Error response |
Error Codes
See Error Codes.
Feedback
Was this page helpful?
Provide feedbackThank 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