Retry the compute instance operation

Retry the compute instance in the ERROR state. After success, the instance returns to IDLE and the Worker will not be redeployed immediately.

POST https://moi.matrixorigin.cn/newmoi/compute-resources/{resource_id}/retry

Preparation before calling

First query the calculation instance details and confirm that the instance status is ERROR. Prepare a personal access token with access to the target workspace, the target workspace ID, and the compute instance ID.

The example below uses:

  • $AI_STUDIO_API_KEY: The actual personal access token, passed through the X-API-Key Header.

  • $WORKSPACE_ID: Target workspace ID, passed through X-Workspace-ID Header.

  • $RESOURCE_ID: The compute instance ID to retry the operation.

Request example

curl -X POST "https://moi.matrixorigin.cn/newmoi/compute-resources/$RESOURCE_ID/retry" \
  -H "X-API-Key: $AI_STUDIO_API_KEY" \
  -H "X-Workspace-ID: $WORKSPACE_ID"

Path parameters

Parameter

Type

Required

Description

resource_id

string

Yes

Compute instance ID.

Successful response

When successful, 200 is returned, and data is the calculation instance object.

{
  "code": "OK",
  "msg": "OK",
  "data": {
    "id": "cr-001",
    "name": "data-processing",
    "spec_id": "task-standard-small",
    "status": "IDLE",
    "status_message": "",
    "min_replicas": 0,
    "max_replicas": 2,
    "current_replicas": 0
  }
}

The response fields are as follows.

Field

Type

Description

code

string

OK on success.

msg

string

OK on success.

data.id

string

Compute instance ID.

data.workspace_id

string

ID of the workspace to which it belongs.

data.name

string

Compute instance name.

data.description

string

Example description; returned when there is a value.

data.spec_id

string

Compute spec ID.

data.kind

string

Instance type.

data.cpu

integer

CPU configuration value.

data.memory_gib

integer

Configuration value expressed in GiB of memory.

data.gpu

integer

GPU configuration value.

data.cpu_milli

integer

CPU configuration value in millicores.

data.memory_mib

integer

Configuration value expressed in MiB of memory.

data.gpu_count

integer

Number of GPUs.

data.gpu_memory_mib

integer

MiB of video memory for a single GPU.

data.gpu_cores

integer

Number of GPU cores.

data.min_replicas

integer

Serverless instances are fixed to 0.

data.max_replicas

integer

Maximum number of copies.

data.desired_replicas

integer

Number of target copies.

data.current_replicas

integer

The current number of copies.

data.go_worker_image_id

string

Go Worker image ID; returned if there is a value.

data.python_worker_image_id

string

Python Worker image ID; returned if there is a value.

data.worker_images

object[]

Worker image selection; returned when there is a value.

data.worker_images[].worker_type

string

Worker type.

data.worker_images[].image_id

string

Image ID.

data.worker_images[].platform

string

Running platform.

data.platform

string

Instance running platform; returned if there is a value.

data.auto_suspend_minutes

integer

Automatic pause waiting time.

data.is_default

boolean

Whether it is the default computing instance of the workspace.

data.status

string

IDLE on success.

data.status_message

string

Supplementary status information; returned if there is a value.

data.scale_reason

string

The scaling reason provided by the server; returned if there is a value.

data.last_activation_at

string

Last activation time; returned if there is a value.

data.last_active_at

string

Last active time; returned if there is a value.

data.created_by

string

Creator ID; returned if there is a value.

data.created_at

string

Creation time; returned if there is a value.

data.updated_at

string

Last updated time; returned if there is a value.

In this document, [] after a type means an array; for example, object[] is an array of objects. In field paths, [] means each item in an array; for example, data.worker_images[].worker_type is the worker_type field of each item in data.worker_images.

Error response

{
  "code": "RETRY_FAILED",
  "msg": "请求参数无效",
  "data": null
}

Common HTTP errors

HTTP status code

error code

Common causes

Recommended actions

400

RETRY_FAILED

The instance ID is invalid or the current status does not allow retry.

Check the details first to confirm the failure reason and current status.

401

Missing or invalid access credentials.

Check API Key and Workspace Header.

403

ErrForbidden

The current identity does not have instance operation permissions.

Requesting permission to compute_resource.operate.

404

NOT_FOUND

The instance does not exist or does not belong to the current workspace.

Check resource_id and workspace.

409

ErrConflict

The instance state conflicts with the retry operation.

Read the latest status before operating.

500

RETRY_FAILED

The server failed to handle the retry.

Try again later.

Follow-up operations

Query calculation instance details and Query Worker runtime.

Last updated on