Query resource operation list

Query the asynchronous operation of agent resources in the workspace.

HTTP
GET $CLOUDSIGMA_API_BASE/workspaces/{workspace_id}/operations

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 "$CLOUDSIGMA_API_BASE/workspaces/$WORKSPACE_ID/operations" -H "X-API-Key: $CLOUDSIGMA_API_KEY" -H "X-Workspace-ID: $WORKSPACE_ID"

Path parameters

Field

Type

Required

Description

workspace_id

string

Yes

Workspace ID consistent with X-Workspace-ID.

Query parameters

Field

Type

Required

Description

type

string

No

Filter by action type.

resource_type

string

No

Filter by associated resource type.

resource_id

string

No

Filter by associated resource ID.

status

string

No

Filter by accepted, running, succeeded, failed, or canceled.

limit

integer

No

The number of pages returned.

offset

integer

No

Returns the offset.

Successful response

JSON
{
  "code": 0,
  "data": {
    "items": [],
    "total": 0,
    "limit": 0,
    "offset": 0
  }
}

Field

Type

Description

code

integer

0 when the request is processed successfully.

data

object

response data.

data.items

array of object

Resource operations for the current page.

data.items[].operation_id

string

Operation ID.

data.items[].type

string

Operation type.

data.items[].resource_type

string

Associated resource type. Does not return if not set. Can be omitted if not set.

data.items[].resource_id

string

Associated resource ID. Does not return if not set. Can be omitted if not set.

data.items[].message

string

Operating Instructions. Can be omitted if not set.

data.items[].status

string

operating status. Values: accepted, running, succeeded, failed, canceled.

data.items[].progress

integer

Operation progress.

data.items[].result

object

Successful results. Does not return if not set. Can be omitted if not set.

data.items[].error

object

Failure message. Does not return if not set. Can be omitted if not set.

data.items[].created_at

string

Creation time, in RFC 3339 format.

data.items[].updated_at

string

Last updated in RFC 3339 format.

data.items[].completed_at

string

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

data.total

integer

The total number of operations that match the filter criteria.

data.limit

integer

The number of single pages used this time.

data.offset

integer

The return offset used this time.

Error response

JSON
{
  "code": 6,
  "message": "unauthenticated"
}

Field

Type

Description

code

integer

error code.

message

string

Error message for the caller.

Last updated on