Parser management objects and calling rules¶
Before you call this API¶
Use BASE_URL, MOI_KEY, and WORKSPACE_ID from the same environment. Obtain BACKEND_ID/ENDPOINT_ID from Parser reads/creation in that environment. Example addresses and key-example-* are placeholders. Verify production support and real services separately.
/parser management endpoints use regular product identity and select tenants through X-Workspace-ID. Backend kind is parser and canonical IDs are positive decimal integers. Equal LLM/Embedding numeric IDs do not identify the same object. Collections/details/endpoint reads require model_backend.read; creation requires workspace model_backend.create; update/endpoint writes require object update; deletion requires delete. Router separately requires workspace model_router.read/update.
Raw file parsing and conversion are outside these ten product management operations; see Related APIs. Regular PATs, system secrets, and verified Worker execution identities are not interchangeable.
HTTP and client responses¶
Operation |
HTTP data |
SDK/CLI adaptation |
|---|---|---|
Backend list |
Array; may be null when empty |
backends collection. |
Endpoint list |
Array; may be null when empty |
endpoints collection. |
Create/details/update |
Backend object |
ProviderBackend, not a model configuration object. |
Create endpoint |
Endpoint object |
ProviderEndpoint. |
Delete/set endpoint state |
null |
Clients may synthesize success:true; not an additional server field. |
Read/write Router |
Configuration object |
ProviderRouterConfig. |
All ten operations return HTTP 200, code=”OK”, msg=”OK”. They do not use workspace LLM201/204, total, or public pagination.
Backend field |
Type |
Description |
|---|---|---|
id |
integer |
Parser backend ID. |
name |
string |
Name. |
type |
string |
PARSER_* protocol type. |
timeout_seconds |
integer |
Timeout in seconds; creation default 3600, configuration maximum 86400. |
supported_mime_types |
array (array of strings) or null |
Declared MIME types; empty is catch-all. Actual parsing capability is not tested. |
endpoints |
array (array of objects) |
Nonempty reads may include online endpoints; omitted when empty. Regular creation/update does not populate endpoints. |
created_at |
integer |
Unix seconds. |
updated_at |
integer |
Unix seconds. |
Returned objects contain no api_key, api_keys_encrypted, or models. Default empty properties from SDK reuse of ProviderBackend do not mean HTTP returned those fields.
Parser types include PARSER_MINERU, PARSER_UNOSERVER, PARSER_OPENXML, PARSER_PADDLEOCR, PARSER_DEV, PARSER_WPS_CONVERTER, PARSER_LIBREOFFICE, and PARSER_MOI_AUDIO_SERVICE. Non-Parser creation values fall back to MINERU; saved configuration does not prove adapter/deployment support. Regular parser selection excludes WPS_CONVERTER/LIBREOFFICE, which are conversion paths. DEV is not a production capability guarantee.
Endpoint field |
Type |
Description |
|---|---|---|
id |
integer |
Endpoint ID; retain before taking offline. |
backend_id |
integer |
Owning Parser backend. |
address |
string |
Access URL. |
status |
string |
ONLINE/OFFLINE. Input is trimmed and uppercased; invalid input becomes ONLINE. |
created_at |
integer |
Unix seconds. |
updated_at |
integer |
Unix seconds. |
Parser collection JOINs, backend details, and endpoint reads all filter offline endpoints. Internal DAO batch reads by ID do not imply public cursor/page support. Saving state does not test health. There is no separate endpoint deletion operation; offline does not mean deleted.
Secret pools and updates¶
Creation/update api_keys_encrypted is an ordered pool. Every item must be nonempty after trimming; normalization trims without deduplication. A nonempty pool takes precedence over api_key in the same request. The saved single-key mirror is the first pool item. Empty names/single keys and nonpositive timeouts do not clear values. MIME updates only accept nonempty arrays; [] retains existing declarations.
Omitted/null update pools retain existing values; nonempty arrays fully replace them. [] falls back to single-key mode. Without a simultaneous nonempty api_key, the original single key/first pool item remains; this does not clear all credentials. DAO normalizes single keys into a one-item pool, so an empty JSON array is not proof of mode conversion. Sending only api_key when the existing pool has more than one item returns 400/ErrParamInvalid. Retain your complete pool configuration for full replacement; responses do not return it.
Router and runtime effects¶
Field |
Type |
Write default |
|---|---|---|
strategy |
string |
Invalid/omitted uses ROUND_ROBIN; also accepts LEAST_CONNECTIONS/MODEL_BASED. |
health_check_interval |
integer |
Nonpositive/omitted uses 30 seconds. |
max_retries |
integer |
Nonpositive/omitted uses 0. |
session_affinity |
boolean |
Omitted/null uses false. |
Without configuration, GET supplies temporary owner defaults ROUND_ROBIN/30/2/false; this does not prove persistence. PUT writes request values plus defaults in full; DAO updates existing rows.
The selected Parser selector rotates by exact MIME, catch-all, tenant/system candidates, and online endpoints; it does not read strategy. MIME declarations may include exact types or /; empty means catch-all. Explicit system MIME can take precedence in particular tenant catch-all cases.
Errors and result confirmation¶
Errors use string code/msg. Input, timeout-limit, invalid type/ID, or single-key overwrite of a multi-key pool may return 400/ErrParamInvalid; missing objects404; role denial403; dependency failures503; others follow endpoint mappings. Binding does not commonly enforce strict unknown-key rejection. Success does not prove extra fields were written.
Confirm configuration, route resolution, file execution, and actual results separately.