Valori LogoValori
POST/v1/index/rebuildREAD / WRITE

Rebuild all indexes

Synchronous, project-wide rebuild of every collection's index. Holds the write lock for its duration.

Project-wide and synchronous. This rebuilds every per-collection index and holds the write lock for its entire duration — no inserts, deletes, or metadata updates can commit while it runs. For a single collection, or for an asynchronous build that doesn't block writes, use Configure a collection's index instead.

Request body

indexstringoptional

Index kind to rebuild to: brute, bruteforce, hnsw, ivf, bq, auto, or mstg — a wider set than collection-level index builds allow, since brute and auto are project-wide selections, not buildable per-collection ANN structures. Omit it to rebuild every collection's index at its current kind.

Response fields

okbooleanrequired

true on success.

effectivestringrequired

The index value from the request, or "rebuilt" when it was omitted.

recordsintegerrequired

Live record count after the rebuild.

Errors

StatuscodeMeaning
401unauthorizedMissing or invalid API key.
403forbiddenThe key's scope doesn't include read_write.

Related endpoints

POST /v1/index/rebuild
curl -X POST "https://app.valori.systems/v1/index/rebuild" \
  -H "Authorization: Bearer vlk_your_project_api_key" \
  -H "Content-Type: application/json" \
  -d '{}'
200
{
  "ok": true,
  "effective": "hnsw",
  "records": 128000
}