Updated on 2026-02-05 GMT+08:00

Updating a Workflow Instance

Function

This API is used to update a workflow instance.

Calling Method

For details, see Calling APIs.

URI

PUT /v1/{project_id}/workspaces/{workspace_id}/soc/workflows/instances/{instance_id}

Table 1 Path Parameters

Parameter

Mandatory

Type

Description

project_id

Yes

String

Definition

Project ID, which is used to specify the project that a resource belongs to. You can query the resources 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

instance_id

Yes

String

Instance ID.

Request Parameters

Table 2 Request header parameters

Parameter

Mandatory

Type

Description

X-Auth-Token

Yes

String

Definition

User token. You can obtain it by calling the IAM API for obtaining a user token. The user token is the value of X-Subject-Token in the response header. Obtaining a User Token

Constraints

N/A

Range

N/A

Default Value

N/A

Content-Type

Yes

String

Definition

Content type.

  • application/json;charset=UTF-8: common API request type

Constraints

N/A

Range

  • application/json;charset=UTF-8

Default Value

N/A

Table 3 Request body parameters

Parameter

Mandatory

Type

Description

command_type

Yes

String

Definition

Commands used to update a workflow instance.

  • ActionInstanceTerminateCommand: terminates a workflow instance.

  • ActionInstanceRetryCommand: retries a workflow instance.

  • ActionInstanceDebugCommand: updates the debugging result of a workflow instance.

Constraints

If command_type is set to ActionInstanceDebugCommand, task_id and inputdataobject are mandatory.

Range

  • ActionInstanceTerminateCommand

  • ActionInstanceRetryCommand

  • ActionInstanceDebugCommand

Default Value

N/A

task_id

No

String

Definition

Debugging node ID of the workflow instance to be updated.

Constraints

If command_type is set to ActionInstanceDebugCommand, this parameter is mandatory.

Range

N/A

Default Value

N/A

input_dataobject

No

String

Definition

Debugging node parameter of the workflow instance to be updated.

Constraints

If command_type is set to ActionInstanceDebugCommand, this parameter is mandatory.

Range

N/A

Default Value

N/A

Response Parameters

Status code: 200

Table 4 Response body parameters

Parameter

Type

Description

code

String

Definition

Error code.

Range

N/A

message

String

Definition

Error description.

Range

N/A

success

Boolean

Definition

Whether the request is successful.

Range

  • true: successful

  • false: failed

request_id

String

Definition

Request ID.

Constraints

N/A

Status code: 400

Table 5 Response body parameters

Parameter

Type

Description

code

String

Definition

Error code.

Range

N/A

message

String

Definition

Error description.

Range

N/A

Example Requests

  • Retry a workflow instance.

    {
      "command_type" : "ActionInstanceRetryCommand"
    }
  • Terminate a workflow instance.

    {
      "command_type" : "ActionInstanceTerminateCommand"
    }
  • Update a workflow debugging result.

    {
      "command_type" : "ActionInstanceDebugCommand",
      "task_id" : "b5848121-79a5-11f0-9f91-fa163ed04a7f",
      "input_dataobject" : "[{\"readonly\":false,\"extra\":\"\",\"name\":\"uuid\",\"description\":\"UUID\",\"default_value\":\"\",\"type\":\"String\",\"value\":{\"output\":{\"uuid\":\"11f8ebde-ee67-431b-afa9-3e31d8a29ae7\"}},\"key\":\"SecMasterUtilities\",\"required\":false},{\"readonly\":false,\"extra\":\"\",\"name\":\"uuid\",\"description\":\"UUID\",\"default_value\":\"\",\"type\":\"String\",\"value\":{\"output\":{\"uuid\":\"11f8ebde-ee67-431b-afa9-3e31d8a29ae7\"}},\"key\":\"Activity_1atma47\",\"required\":false}]"
    }

Example Responses

Status code: 200

Response to requests for updating a workflow instance.

{
  "code" : "00000000",
  "message" : "",
  "request_id" : "",
  "success" : true
}

Status Codes

Status Code

Description

200

Response to requests for updating a workflow instance.

400

Abnormal response.

Error Codes

See Error Codes.