Curation — MDDB API

(v2.9.15+) Editorial overrides for FTS + Hybrid search — pin documents to fixed positions, hide others for specific queries

List or fetch curation rules (v2.9.15+) #

GET /v1/curation

Pass id for a single rule, collection to list rules for one collection, or neither to list all rules (admin).

Authorization: BearerAuth or APIKeyAuth or none

Parameters #

Name In Type Description
id query string
collection query string

Responses #

Status Description Body
200 Rule(s) oneOf CurationRule | object (application/json)
400 The request is malformed (a body that is not JSON, a missing or invalid field, an unreadable body) or names a subsystem that is not initialized. The message says which. ErrorResponse (application/json)
401 Auth is on (MDDB_AUTH_ENABLED=true) and the request carries no credentials, an invalid or expired JWT, or an unknown API key. ErrorResponse (application/json)
403 The caller lacks the permission the route needs (SEC-019 access gate, auth on: read, write or admin on the collections the request names), or a write meets read-only mode (MDDB_MODE=read or the protocol's own mode). ErrorResponse (application/json)
404 The thing the request names does not exist. ErrorResponse (application/json)
429 The client is over the API rate limit (MDDB_RATE_LIMIT_ENABLED=true, MDDB_RATE_LIMIT_REQUESTS per MDDB_RATE_LIMIT_WINDOW seconds). A call that embeds can also be refused by the collection's daily embedding budget, with a QuotaExceeded body. RateLimitError (application/json)

400 example (application/json)

{
  "error": "missing collection"
}

401 example (application/json)

{
  "error": "missing authentication"
}

403 example (application/json)

{
  "error": "forbidden"
}

404 example (application/json)

{
  "error": "not found"
}

Replace an existing curation rule (v2.9.15+) #

PUT /v1/curation

Authorization: BearerAuth or APIKeyAuth or none

Request body #

Required.

Content type application/json: CurationRule

{
  "collection": "string",
  "createdAt": 0,
  "enabled": false,
  "hides": [
    "string"
  ],
  "id": "string",
  "matchMode": "exact",
  "pins": [
    {
      "key": "string",
      "lang": "string",
      "position": 0
    }
  ],
  "query": "string",
  "updatedAt": 0
}

Responses #

Status Description Body
200 Updated rule CurationRule (application/json)
400 The request is malformed (a body that is not JSON, a missing or invalid field, an unreadable body) or names a subsystem that is not initialized. The message says which. ErrorResponse (application/json)
401 Auth is on (MDDB_AUTH_ENABLED=true) and the request carries no credentials, an invalid or expired JWT, or an unknown API key. ErrorResponse (application/json)
403 The caller lacks the permission the route needs (SEC-019 access gate, auth on: read, write or admin on the collections the request names), or a write meets read-only mode (MDDB_MODE=read or the protocol's own mode). ErrorResponse (application/json)
404 The thing the request names does not exist. ErrorResponse (application/json)
413 The body is over MDDB_MAX_BODY_BYTES (32 MiB by default). ErrorResponse (application/json)
429 The client is over the API rate limit (MDDB_RATE_LIMIT_ENABLED=true, MDDB_RATE_LIMIT_REQUESTS per MDDB_RATE_LIMIT_WINDOW seconds). A call that embeds can also be refused by the collection's daily embedding budget, with a QuotaExceeded body. RateLimitError (application/json)

400 example (application/json)

{
  "error": "missing collection"
}

401 example (application/json)

{
  "error": "missing authentication"
}

403 example (application/json)

{
  "error": "forbidden"
}

404 example (application/json)

{
  "error": "not found"
}

413 example (application/json)

{
  "error": "request body too large"
}

Create a curation rule (v2.9.15+) #

POST /v1/curation

Authorization: BearerAuth or APIKeyAuth or none

Request body #

Required.

Content type application/json: CurationRule

{
  "collection": "string",
  "createdAt": 0,
  "enabled": false,
  "hides": [
    "string"
  ],
  "id": "string",
  "matchMode": "exact",
  "pins": [
    {
      "key": "string",
      "lang": "string",
      "position": 0
    }
  ],
  "query": "string",
  "updatedAt": 0
}

Responses #

Status Description Body
200 Created rule with assigned id CurationRule (application/json)
400 The request is malformed (a body that is not JSON, a missing or invalid field, an unreadable body) or names a subsystem that is not initialized. The message says which. ErrorResponse (application/json)
401 Auth is on (MDDB_AUTH_ENABLED=true) and the request carries no credentials, an invalid or expired JWT, or an unknown API key. ErrorResponse (application/json)
403 The caller lacks the permission the route needs (SEC-019 access gate, auth on: read, write or admin on the collections the request names), or a write meets read-only mode (MDDB_MODE=read or the protocol's own mode). ErrorResponse (application/json)
413 The body is over MDDB_MAX_BODY_BYTES (32 MiB by default). ErrorResponse (application/json)
429 The client is over the API rate limit (MDDB_RATE_LIMIT_ENABLED=true, MDDB_RATE_LIMIT_REQUESTS per MDDB_RATE_LIMIT_WINDOW seconds). A call that embeds can also be refused by the collection's daily embedding budget, with a QuotaExceeded body. RateLimitError (application/json)

400 example (application/json)

{
  "error": "missing collection"
}

401 example (application/json)

{
  "error": "missing authentication"
}

403 example (application/json)

{
  "error": "forbidden"
}

413 example (application/json)

{
  "error": "request body too large"
}

Delete a curation rule (v2.9.15+) #

DELETE /v1/curation

Authorization: BearerAuth or APIKeyAuth or none

Parameters #

Name In Type Description
id (required) query string

Responses #

Status Description Body
200 Deleted object (application/json)
400 The request is malformed (a body that is not JSON, a missing or invalid field, an unreadable body) or names a subsystem that is not initialized. The message says which. ErrorResponse (application/json)
401 Auth is on (MDDB_AUTH_ENABLED=true) and the request carries no credentials, an invalid or expired JWT, or an unknown API key. ErrorResponse (application/json)
403 The caller lacks the permission the route needs (SEC-019 access gate, auth on: read, write or admin on the collections the request names), or a write meets read-only mode (MDDB_MODE=read or the protocol's own mode). ErrorResponse (application/json)
404 The thing the request names does not exist. ErrorResponse (application/json)
429 The client is over the API rate limit (MDDB_RATE_LIMIT_ENABLED=true, MDDB_RATE_LIMIT_REQUESTS per MDDB_RATE_LIMIT_WINDOW seconds). A call that embeds can also be refused by the collection's daily embedding budget, with a QuotaExceeded body. RateLimitError (application/json)

400 example (application/json)

{
  "error": "missing collection"
}

401 example (application/json)

{
  "error": "missing authentication"
}

403 example (application/json)

{
  "error": "forbidden"
}

404 example (application/json)

{
  "error": "not found"
}