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.
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¶
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 |
|---|---|---|---|
|
string |
Yes |
Calculate the instance ID. |
Successful response¶
{
"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 |
|---|---|---|
|
string |
success code. |
|
string |
Response information. |
|
object |
The data returned by this operation. |
|
array of object |
Runtime logging for each type of Worker. |
|
string |
Calculate the instance ID. |
|
string |
Worker type. |
|
string |
The running status of this Worker. The value is |
|
integer |
Target number of copies. |
|
integer |
The current number of replicas. |
|
string or null |
Last activation time. |
|
string or null |
Last active time. |
|
string |
Record creation time at runtime. In RFC 3339 format. |
|
string |
The last update time is recorded at runtime. In RFC 3339 format. |
Error response¶
{
"code": "NOT_FOUND",
"msg": "计算资源不存在",
"data": null
}
Field |
Type |
Description |
|---|---|---|
|
string |
error code. |
|
string |
Error description. |
|
null |
Empty on error. |
Common HTTP errors¶
HTTP status |
Error code |
Common cause |
Recommended action |
|---|---|---|---|
400 |
|
Invalid request field, workspace, or operation precondition. |
Fix the request parameters and submit again. |
401 |
|
Missing or invalid authentication credentials. |
Check the credential type, expiration, and authentication header. |
403 |
|
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 |
|
The target object or required reference was not found. |
Verify the object identifier, workspace, and current status. |
500 |
|
Internal processing failed; write operations may have been partially applied. |
Retain request and trace details, and verify the current state before retrying. |
503 |
|
A business, runtime, or authorization dependency is temporarily unavailable. |
After the dependency recovers, check existing results first instead of blindly repeating writes. |