Get compute resource runtime state as an administrator¶
Read a target instance’s Worker types, states, and replica records separately from the parent instance state.
GET https://api.moi.matrixorigin.cn/v5/admin/compute-resources/{id}/runtime
Before you call this API¶
Prepare a valid identity for this deployment, configured compute specification administrator privileges, and an accessible authentication Workspace. Workspace Owner status or a Genesis administration scope is insufficient. Replace example IDs with targets you are authorized to read or operate on. See Compute Instances.
There are no pagination or Worker type filters. Distinguish a missing resource from an existing resource with empty runtimes. These are stored runtime projections; they are not guaranteed to match external Pod, process, or service readiness timing.
Request parameters¶
curl -X GET "https://api.moi.matrixorigin.cn/v5/admin/compute-resources/cr-example/runtime" \
-H "X-API-Key: $AI_STUDIO_API_KEY" \
-H "X-Workspace-ID: $AUTH_WORKSPACE_ID"
Parameter |
Type |
Required |
Description |
|---|---|---|---|
|
string |
Yes in this example |
A valid personal access token for an identity configured as a compute specification administrator in this deployment. |
|
string |
Yes |
One nonempty authentication Workspace accessible to the current principal; not a target instance Workspace filter. |
|
string |
Yes |
Target instance ID. The service resolves its actual Workspace from this ID. |
This API does not read a business request body. Do not submit the target Workspace or state through the body.
Successful response¶
{
"code": "OK",
"msg": "OK",
"data": {
"runtimes": [
{
"compute_resource_id": "cr-example",
"worker_type": "python-worker",
"status": "IDLE",
"desired_replicas": 0,
"current_replicas": 0,
"created_at": "2026-11-12T07:00:00Z",
"updated_at": "2026-11-12T07:00:00Z"
}
]
}
}
Field |
Type |
Description |
|---|---|---|
|
string |
OK on success. |
|
string |
OK on success. |
|
object |
Data read now or after the operation. |
|
object (array of objects) |
Returned by Worker type. An existing parent resource without records returns []; this does not establish that it is callable. |
|
string |
Associated parent compute instance ID. |
|
string |
Worker type identifier. Do not reduce arbitrary types to a Go/Python choice. |
|
string |
Lifecycle state of this Worker type record. Check it separately from the parent instance state. |
|
integer |
Target replica field for this Worker type. |
|
integer |
Current replica field for this Worker type. |
|
string, optional |
Most recent activation time in RFC3339; omitted when unrecorded. |
|
string, optional |
Most recent activity time in RFC3339; omitted when unrecorded. |
|
string |
Creation time in RFC3339. |
|
string |
Update time in RFC3339; not a caller-supplied concurrency version. |
See Shared objects for nested images, declared observation objects, and parent/Worker state relationships.
Error responses¶
{"code":"INVALID_PARAMS","msg":"invalid compute resource request","data":null}
Field |
Type |
Description |
|---|---|---|
|
string |
Distinguished by failure stage and operation. |
|
string |
Error text; some branches are localized and do not expose unclassified underlying errors. |
|
null |
This example uses null; shared authentication error branches may omit it. |
HTTP / code |
Conditions and handling |
|---|---|
400 / INVALID_PARAMS |
Missing authentication Workspace, principal, or resource ID. |
403 / ErrForbidden |
The authorization boundary rejects administrator eligibility, the current principal, or Workspace access. |
503 / ErrServiceUnavailable |
Classified shared authorization unavailability; does not apply to every directory failure. |
404 / NOT_FOUND |
The parent resource is missing or outside the currently readable set. |
500 / ErrServer |
An unclassified directory, storage, or internal failure. |
See Errors and recovery for differences between handlers, identities, and recovery stages.