Update a parser backend¶
Update parser backend name, key configuration, and MIME declarations.
PUT https://api.moi.matrixorigin.cn/v5/parser/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 permissions in the same environment.
Request¶
curl --request PUT \
"$BASE_URL/parser/backends/$BACKEND_ID" \
--header "X-API-Key: $MOI_KEY" \
--header "X-Workspace-ID: $WORKSPACE_ID" \
--header "Content-Type: application/json" \
--data-raw '{"name":"更新后","api_keys_encrypted":["key-example-new-a","key-example-new-b"]}'
Parameter |
Location |
Type |
Required |
Description |
|---|---|---|---|---|
|
Headers |
string |
Yes |
Workspace ID in the same environment. |
|
Path |
integer |
Yes |
Canonical positive integer ID returned by creation/read for the same Parser kind. |
|
Body |
string |
No |
Updates when nonempty after trimming. Omission/null/empty preserves. |
|
Body |
string |
No |
Nonempty values update the single key. Rejected when a multi-key pool exists and no pool was explicitly supplied. |
|
Body |
array (strings) or null |
No |
Omission/null preserves; a nonempty pool replaces the complete pool; [] returns to single-key mode. |
|
Body |
integer |
No |
Positive values update, up to 86400; nonpositive/omitted values preserve. |
|
Body |
array (strings) |
No |
Only a nonempty array replaces the entire collection. Omission/null/[] all preserve; [] cannot clear it to catch-all. |
Requires object update permission; type cannot change. A key pool [] does not clear all credentials: without a simultaneous nonempty api_key, the previous single key/first pool item remains. A nonempty pool takes precedence. Go/Python convenience options and CLI do not cover the complete pool; Python raw requests can preserve arrays. Do not substitute old Worker administration paths.
Read back name, timeout, and MIME declarations using Backend details. Responses omit the key pool; its absence does not establish replacement failure.
Successful response¶
{
"code": "OK",
"msg": "OK",
"data": {
"id": 12,
"name": "更新后",
"type": "PARSER_MINERU",
"timeout_seconds": 3600,
"supported_mime_types": [
"application/pdf"
],
"created_at": 1794445200,
"updated_at": 1794445200
}
}
Field |
Type |
Description |
|---|---|---|
|
string |
HTTP200, OK on success. |
|
string |
OK on success. |
|
object |
Actual objects or empty values; do not infer them from LLM envelopes. |
Error responses¶
Errors and result confirmation distinguishes actual input, object admission, and business results.