Query Worker runtime

Query the Worker running records and number of copies saved by the computing instance. Results do not represent real-time Pod status or operational metrics.

HTTP
GET $CLOUDSIGMA_API_BASE/compute-resources/{resource_id}/runtime

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. First Query the computing instance details and confirm the instance you want to query. Prepare the personal access token, target workspace ID, and computing instance ID that can access the target workspace.

Request parameters

Shell
curl "$CLOUDSIGMA_API_BASE/compute-resources/$RESOURCE_ID/runtime" \
  -H "X-API-Key: $CLOUDSIGMA_API_KEY" \
  -H "X-Workspace-ID: $WORKSPACE_ID"

Field

Type

Required

Description

resource_id

string

Yes

Calculate the instance ID.

Successful response

JSON
{
  "code": "OK",
  "msg": "OK",
  "data": {
    "runtimes": [
      {
        "compute_resource_id": "cr-001",
        "worker_type": "python-worker",
        "status": "ACTIVE",
        "desired_replicas": 1,
        "current_replicas": 1,
        "created_at": "2026-10-14T00:00:00Z",
        "updated_at": "2026-10-14T00:00:00Z"
      }
    ]
  }
}

Field

Type

Description

code

string

success code.

msg

string

Response information.

data

object

The data returned by this operation.

data.runtimes

array of object

Runtime logging for each type of Worker.

data.runtimes[].compute_resource_id

string

Calculate the instance ID.

data.runtimes[].worker_type

string

Worker type.

data.runtimes[].status

string

The running status of this Worker. The value is IAM_CREATE_PENDING, IDLE, DEPLOYING, SCALING, ACTIVE , DRAINING, SUSPENDED, TERMINATING, ERROR, DELETED

data.runtimes[].desired_replicas

integer

Target number of copies.

data.runtimes[].current_replicas

integer

The current number of replicas.

data.runtimes[].last_activation_at

string or null

Last activation time.

data.runtimes[].last_active_at

string or null

Last active time.

data.runtimes[].created_at

string

Record creation time at runtime. In RFC 3339 format.

data.runtimes[].updated_at

string

The last update time is recorded at runtime. In RFC 3339 format.

Error response

JSON
{
  "code": "NOT_FOUND",
  "msg": "计算资源不存在",
  "data": null
}

Field

Type

Description

code

string

error code.

msg

string

Error description.

data

null

Empty on error.

Common HTTP errors

HTTP status

Error code

Common cause

Recommended action

400

INVALID_PARAMS

Invalid request field, workspace, or operation precondition.

Fix the request parameters and submit again.

401

Unauthorized

Missing or invalid authentication credentials.

Check the credential type, expiration, and authentication header.

403

ErrForbidden

The current identity or active role does not have permission for this operation.

Use an authorized identity or contact an administrator to grant access.

404

NOT_FOUND

The target object or required reference was not found.

Verify the object identifier, workspace, and current status.

500

ErrServer

Internal processing failed; write operations may have been partially applied.

Retain request and trace details, and verify the current state before retrying.

503

ErrServiceUnavailable

A business, runtime, or authorization dependency is temporarily unavailable.

After the dependency recovers, check existing results first instead of blindly repeating writes.

Last updated on