List compute resources as an administrator¶
List compute resources across Workspaces in the current administration directory. Filter by Workspace, status, name, or keyword.
GET https://api.moi.matrixorigin.cn/v5/admin/compute-resources
Before you call this API¶
Prepare an identity configured as a compute specification administrator in this deployment 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.
Pagination sorts by created_at descending, then id descending. It is not a stable snapshot during concurrent changes. DELETED and IAM_CREATE_PENDING resources are excluded, so this list cannot show the DELETED terminal state. Administration items include workspace and omit allowed_actions.
Query parameters¶
curl --get "https://api.moi.matrixorigin.cn/v5/admin/compute-resources" \
-H "X-API-Key: $AI_STUDIO_API_KEY" \
-H "X-Workspace-ID: $AUTH_WORKSPACE_ID" \
--data-urlencode "workspace_id=target-workspace" \
--data-urlencode "limit=50" \
--data-urlencode "offset=0"
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, separate from the resource’s Workspace and the workspace_id list filter. |
|
string |
No |
An exact target Workspace filter; this is not the authentication header. |
|
string |
No |
A valid status enum. DELETED and IAM_CREATE_PENDING cannot be selected and are always excluded. |
|
string |
No |
An exact resource name match. |
|
string |
No |
After trimming whitespace, performs a case-insensitive substring search on resource name/description/Workspace ID and Workspace name/account/Owner. Resource IDs are excluded; % and _ are treated literally. |
|
integer |
No |
Defaults to 50; accepts 1–200. An explicit 0 is rejected. |
|
integer |
No |
Defaults to 0; must be nonnegative. |
Successful response¶
HTTP 200。
{
"code": "OK",
"msg": "OK",
"data": {
"items": [
{
"id": "cr-example",
"workspace_id": "target-workspace",
"name": "示例实例",
"description": "",
"kind": "task",
"spec_id": "spec-example",
"cpu": 1,
"memory_gib": 4,
"gpu": 0,
"cpu_milli": 1000,
"memory_mib": 4096,
"gpu_count": 0,
"gpu_memory_mib": 0,
"gpu_cores": 0,
"min_replicas": 0,
"max_replicas": 2,
"current_replicas": 0,
"desired_replicas": 0,
"go_worker_image_id": "",
"python_worker_image_id": "",
"worker_images": [
{
"worker_type": "python-worker",
"image_id": "image-example",
"platform": "linux/amd64"
}
],
"platform": "linux/amd64",
"auto_suspend_minutes": 30,
"scale_reason": "",
"is_default": false,
"status": "IDLE",
"status_message": "",
"created_by": "creator-example",
"created_at": "2026-11-12T07:00:00Z",
"updated_at": "2026-11-12T07:00:00Z",
"workspace": {
"id": "target-workspace",
"name": "示例工作区",
"owner_id": "owner-example",
"account_name": "account-example"
}
}
],
"total": 1,
"limit": 50,
"offset": 0
}
}
Field |
Type |
Description |
|---|---|---|
|
string |
OK on success. |
|
string |
OK on success. |
|
object |
Data returned by this API; see the fields below. |
|
object (array of objects) |
Administration resources. Each item includes workspace and omits allowed_actions. |
|
integer |
Total matches for this filter, not the number of items on this page. |
|
integer |
Page size for this request. |
|
integer |
Offset for this request. |
|
string |
Compute instance ID. |
|
string |
The instance’s actual Workspace, separate from the authentication header. |
|
string |
Instance name. |
|
string |
Instance description; may be an empty string. |
|
string |
task or query. |
|
string |
Associated specification ID. |
|
integer |
Legacy CPU specification field, in cores; do not confuse it with cpu_milli. |
|
integer |
Legacy memory specification field, in GiB. |
|
integer |
Legacy GPU specification field. |
|
integer |
Specification CPU, in millicores. |
|
integer |
Specification memory, in MiB. |
|
integer |
Specification GPU count. |
|
integer |
Specification GPU memory, in MiB. |
|
integer |
Specification GPU core field. |
|
integer |
Configured minimum replica field; not the currently observed replica count. |
|
integer |
Replica limit for each Worker type, not a combined limit across all types. |
|
integer |
Aggregate current instance replica field; separate from per-type observations. |
|
integer |
Target instance replica field; does not indicate readiness. |
|
string |
Legacy Go Worker image ID; may be empty. |
|
string |
Legacy Python Worker image ID; may be empty. |
|
object (array of objects), optional |
Optional images selected by Worker type. See the item fields below. |
|
string |
Worker platform configuration. |
|
integer |
Configured automatic suspension delay in minutes; not a duration guarantee for this operation. |
|
string |
Most recent scaling or lifecycle reason. |
|
boolean |
Whether this is the default instance; may be false. |
|
string |
Parent instance state. Current models include IDLE, DEPLOYING, SCALING, ACTIVE, DRAINING, SUSPENDED, TERMINATING, ERROR, and others. Do not conflate this with Worker states. |
|
string |
Status text; may be empty. |
|
string, optional |
Echoes normalized dependency text when nonempty; not declared in current typed SDK models. |
|
string, optional |
Echoes the text’s SHA256 when nonempty; not declared in current typed SDK models. |
|
object, optional |
Declared optional observation object. Current list/update converters do not populate it, so it does not guarantee installation progress information. |
|
string |
Creating principal. |
|
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. |
|
object |
Administration Workspace projection. See the four fields in the shared objects page. |
See Shared objects for nested objects and omission rules.
Error responses¶
{"code": "INVALID_PARAMS", "msg": "workspace is required", "data": null}
HTTP / code |
Conditions and handling |
|---|---|
400 / INVALID_PARAMS |
Missing identity/authentication Workspace, or invalid pagination/status filter. |
403 / ErrForbidden |
A classified rejection of administrator eligibility, principal, or Workspace access. |
503 / ErrServiceUnavailable |
A classified shared authorization unavailability error; does not cover every directory/configuration error. |
500 / ErrServer |
An unclassified service, directory, or storage error. |
Field |
Type |
Description |
|---|---|---|
|
string |
Classified by the specific failure stage. |
|
string |
Error text; shared errors may be localized. |
|
null or omitted |
Direct compute errors use null. See error recovery for shared error formats. |
An error does not mean every stage was rolled back. See Errors and recovery.