Base URL
Authentication
All mutating and read operations are routed throughPOST /manage and require both of the following:
projectIdfield in the JSON body.x-project-keyheader containing the project access key.x-service-versionheader set tov1.
403 Forbidden with a JSON error payload.
Control Plane: POST /manage
All API actions are multiplexed through the /manage endpoint. Provide an action string plus the required fields for that operation. On success, handlers return 2xx JSON payloads outlined below. Failures return structured errors:
| Field | Type | Required | Notes |
|---|---|---|---|
action | string | ✅ | One of createIndex, getIndex, listIndexes, deleteIndex, addDocs, deleteDocs, getDocs. |
projectId | string | ✅ | Project identifier issued by Moss Control. |
indexName | string | ▶︎ | Required for index-scoped actions. |
Required headers:x-project-keywith your project access key andx-service-version: v1.
Supported actions at a glance
| Action | Purpose | Extra required fields |
|---|---|---|
createIndex | Create a new index with seed documents. | indexName, docs |
getIndex | Fetch metadata for a single index. | indexName |
listIndexes | Enumerate every index under the project. | — |
deleteIndex | Remove an index record and assets. | indexName |
addDocs | Upsert documents into an existing index. | indexName, docs |
deleteDocs | Remove documents by ID. | indexName, docIds |
getDocs | Retrieve stored documents (without embeddings). | indexName |
createIndex
Create a new index and persist its artifacts for later retrieval.
Additional body fields
| Field | Type | Required | Notes |
|---|---|---|---|
docs | object[] | ✅ | Array of documents. Each document must include id and text; you may optionally supply metadata (key-value pairs). |
modelId | string | ◻️ | Defaults to moss-minilm. Other options include moss-mediumlm. |
400when any required field is missing.404if the project does not exist.500on unexpected storage or indexing failures.
getIndex
Fetch metadata for a single index.
Required fields: indexName
Success response
404if the index is unknown.
listIndexes
List every index tied to a project.
Success response
deleteIndex
Delete an index record and associated assets.
Required fields: indexName
Success response
404if the index is missing.
addDocs
Append or upsert documents into an existing index. The service merges the new documents, rebuilds the index efficiently, and makes fresh artifacts available for further usage.
Required fields: indexName, docs
Optional fields: options.upsert (defaults to true).
Example request
404if the index cannot be located.500when existing documents cannot be downloaded or the update fails.
deleteDocs
Remove specific documents by ID and rebuild the index.
Required fields: indexName, docIds (non-empty array)
Success response
getDocs
Retrieve the stored documents for an index.
Required fields: indexName
Optional fields: options.docIds to return a subset.
Success response