Admin

Trigger Backfill

Changed on

Queue semantic-search embedding generation for records (admin only).

Pass ?force=true to regenerate every record and replace its stored vectors. Without it, the run embeds only records that lack a current-model embedding.

The run covers the calling tenant's records. In a multi-tenant deployment the embedding model and width are shared by every tenant, so a change leaves each tenant to regenerate. Pass ?all_tenants=true to also queue a run for every other registered tenant; there it needs manage_tenants instead of manage_users, and other_tenants reports each run. When the calling tenant already has a run in flight, the status is already_running, job_id is that run (null when the caller may not read it) and the other tenants are still queued. This request did not queue that run and it may predate the change, so run the backfill again once it ends. A single-tenant deployment ignores the flag.

The run happens on the job queue because a full regeneration can exceed request timeouts. This endpoint returns the job id; poll GET /jobs/{job_id} for the outcome.

post/admin/backfill-embeddings/

Request

  • The document declares no server URL.
  • Auth: one of:
    • OAuth 2 (password, token URL /api/auth/login)
    • API key in header X-Api-Key
    • API key in query parameter api_key

Query parameters

forceboolean
all_tenantsboolean

Response

Successful Response

job_idstring uuid nullable required

Identifier of the queued backfill job; poll /jobs/{job_id}. Null only with status 'already_running' when the caller may not read that run.

statusstring required

'pending' when this request queued job_id. 'already_running' when an all_tenants request found a run in flight in the calling tenant; job_id is then that run, which this request did not queue. Run the backfill again once it ends.

Changes

    • breaking

      response property job_id list-of-types was widened by adding types null to media type application/json of response 200

    • info

      added the new optional query request parameter all_tenants

    • info

      added the optional property to the response with the status