Update an embedding backend through the root API

Change a specified embedding backend’s name, declared models, and supported configuration fields.

PUT https://api.moi.matrixorigin.cn/v5/embedding/backends/{backend_id}

Before you call this API

Set BASE_URL to the product API prefix https://api.moi.matrixorigin.cn/v5; use the corresponding product API URL for a dedicated deployment.

Configure identity, workspace, and object permissions in the same environment.

Request

curl --request PUT \
  "$BASE_URL/embedding/backends/$BACKEND_ID" \
  --header "X-API-Key: $MOI_KEY" \
  --header "X-Workspace-ID: $WORKSPACE_ID" \
  --header "Content-Type: application/json" \
  --data-raw '{"name":"更新后"}'

Parameter

Location

Type

Required

Description

X-Workspace-ID

Headers

string

Yes

Workspace ID in the same environment.

backend_id

Path

integer

Yes

Positive ID returned by a preceding read.

name

Body

string

No

Omission, null, empty strings, or whitespace-only strings retain the old name.

api_key

Body

string

No

Nonempty values replace it. Omission, null, or empty values retain it; empty values cannot clear credentials.

timeout_seconds

Body

integer

No

Updates only for a positive number. Omission, null, or nonpositive values retain it.

models

Body

array (strings) or null

No

Only a nonempty array replaces the value. Omission, null, and [] all retain it.

reasoning_control_protocol

Body

string

No

Only updated for nonempty LLM values; empty values retain it.

Requires object model_backend.update. Type is absent from the update structure. No business request_id/CAS protection is supported. Reread required fields after writing. Extra keys accepted during binding but not used do not establish an update.

Successful response

{
  "code": "OK",
  "msg": "OK",
  "data": {
    "id": 12,
    "name": "更新后",
    "type": "OPENAI",
    "timeout_seconds": 30,
    "models": [
      "bge-m3"
    ],
    "created_at": 1794445200,
    "updated_at": 1794445200,
    "reasoning_control_protocol": "REASONING_CONTROL_NONE"
  }
}

HTTP 200。

Field

Type

Description

code

string

OK on success.

msg

string

OK on success.

data

object

Actual objects for this protocol.

Error responses

Errors and result confirmation distinguishes the two protocols. Parse omitted fields, SDK zero values, and empty HTTP responses separately. Confirm writes with the corresponding reads.

Last updated on