Update an embedding backend through the Workspace API¶
Modify an embedding model backend’s name, declared models, and supported configuration fields.
PUT https://api.moi.matrixorigin.cn/v5/workspaces/{workspace_id}/embeddings/backends/{backend_id}
Before you call this API¶
Set BASE_URL to the product API prefix https://api.moi.matrixorigin.cn/v5. For private deployments, use the corresponding product API URL.
Configure identity, Workspace, and object permissions in the same environment.
Request¶
curl --request PUT \
"$BASE_URL/workspaces/$WORKSPACE_ID/embeddings/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 |
|---|---|---|---|---|
|
Headers |
string |
Yes |
Workspace ID in the same environment. |
|
Path |
string |
Yes |
Workspace ID in the same environment. |
|
Path |
integer |
Yes |
Positive ID returned by an earlier read. |
|
Body |
string |
No |
Omission/null/empty/whitespace-only values preserve the previous name. |
|
Body |
string |
No |
Nonempty values replace; omission/null/empty preserves. Empty values cannot clear credentials. |
|
Body |
integer |
No |
Positive values update; omission/null/nonpositive values preserve. |
|
Body |
array (strings) or null |
No |
Omission/null preserves; [] clears; nonempty arrays replace the complete collection. |
|
Body |
integer or null |
No |
LLM only. Omission/null preserves; 0 explicitly resets NONE, and other valid values are 1–5. |
|
Body |
string or null |
No |
LLM only. Omission/null preserves; explicit values allow only external_provider. Empty strings are rejected. |
|
Body |
string or null |
No |
LLM only. Omission/null preserves; an empty string clears. |
|
Body |
string or null |
No |
LLM only. Omission/null preserves; an empty string clears. |
Requires object model_backend.update. Type is absent from the update structure. No business request_id/CAS protection is supported; read back required fields afterward. Current dedicated Go/Python/CLI clients omit models=[], so clearing requires a call that preserves the complete HTTP array. An omitted models field in a response may also mean an empty collection.
Successful response¶
{
"code": 0,
"data": {
"id": 12,
"name": "更新后",
"timeout_seconds": 30,
"models": [
"bge-m3"
],
"created_at": 1794445200,
"updated_at": 1794445200,
"provider_origin": "unknown",
"api_key_encrypted": "provider-key-example"
}
}
HTTP 200。
Field |
Type |
Description |
|---|---|---|
|
integer |
0 on success. |
|
object |
Error responses¶
Errors and result confirmation distinguishes the two protocols. Parse omitted fields, SDK zero values, and empty HTTP responses separately. Confirm writes using the corresponding read operation.