Cancel resource operation

Mark the resource operation record as canceled. Currently executing tasks will not be stopped.

HTTP
POST $CLOUDSIGMA_API_BASE/workspaces/{workspace_id}/operations/{operation_id}/cancel

Before you call

Configure the CloudSigma regional endpoint and authentication before calling. The endpoint, credentials, workspace, and resource IDs must belong to the same region. Prepare a personal access token and target workspace ID that can access the target workspace.

Request parameters

Shell
curl -X POST "$CLOUDSIGMA_API_BASE/workspaces/$WORKSPACE_ID/operations/$OPERATION_ID/cancel" -H "X-API-Key: $CLOUDSIGMA_API_KEY" -H "X-Workspace-ID: $WORKSPACE_ID"

Field

Type

Required

Description

workspace_id

string

Yes

Target workspace ID.

operation_id

string

Yes

The resource operation ID to cancel.

Successful response

JSON
{
  "code": 0,
  "data": {
    "operation_id": "operation_example",
    "type": "agent_package_load",
    "status": "canceled",
    "progress": 0,
    "created_at": "2026-10-14T00:00:00Z",
    "updated_at": "2026-10-14T00:00:00Z"
  }
}

Field

Type

Description

code

integer

0 when the request is processed successfully.

data

object

response data.

data.operation_id

string

Operation record ID.

data.type

string

Operation type.

data.resource_type

string

Resource type. Can be omitted if not set.

data.resource_id

string

Associated resource ID. Can be omitted if not set.

data.message

string

Operating Instructions. Can be omitted if not set.

data.status

string

status after cancellation. Values: accepted, running, succeeded, failed, canceled.

data.progress

integer

Current progress.

data.result

object

Operation results. Can be omitted if not set.

data.error

object

Error details. Can be omitted if not set.

data.created_at

string

Creation time, in RFC 3339 format.

data.updated_at

string

Last updated in RFC 3339 format.

data.completed_at

string

Completion time, may be omitted if not completed. Can be omitted if not set.

Error response

JSON
{
  "code": 3,
  "message": "operation not found"
}

Field

Type

Description

code

integer

error code.

message

string

Error message for the caller.

Last updated on