Cancel resource operation¶
Requests the cancellation of an unfinished agent resource operation.
HTTP
POST $CLOUDSIGMA_API_BASE/workspaces/{workspace_id}/operations/{operation_id}/cancel
Before you call this API¶
Configure the regional API endpoint and authentication, and select the target workspace.
Set the operation-specific values used in the request: $OPERATION_ID.
Request¶
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"
Successful response¶
Returns 200 and operation status on success.
JSON
{"code":0,"data":{"id":"op_01","status":"canceled"}}
The response fields are as follows.
Field |
Type |
Description |
|---|---|---|
|
string |
Operation ID. |
|
string |
The state after cancellation. |
Error response¶
JSON
{"code":5,"message":"operation not found"}
Last updated on