Trigger Backfill
const url = 'https://example.com/admin/backfill-embeddings/?force=false&all_tenants=false';const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url 'https://example.com/admin/backfill-embeddings/?force=false&all_tenants=false' \ --header 'Authorization: Bearer <token>'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.
Authorizations
Section titled “ Authorizations ”Parameters
Section titled “ Parameters ”Query Parameters
Section titled “ Query Parameters ”Responses
Section titled “ Responses ”Successful Response
Acknowledgement that a backfill run was queued.
The response carries no counts because the work runs asynchronously. Poll
GET /jobs/{job_id} for status.
object
‘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.
Runs queued for the other tenants by an all_tenants request in a multi-tenant deployment. Empty otherwise.
What an all-tenant backfill request did for one other tenant.
object
The tenant the run was queued for.
‘pending’ when a run was queued, ‘already_running’ when that tenant already had one in flight, ‘not_queued’ when queueing failed.
Example
{ "other_tenants": [ { "status": "pending" } ]}Bad request — invalid query parameters or payload
Unauthorized — missing or invalid credentials
Forbidden — caller lacks access to this resource
Not found
Conflict — resource state prevents the operation
Validation error
Too many requests — retry after the advertised interval
Headers
Section titled “ Headers ”Seconds until the request may be retried
Internal server error
Service unavailable — the background job queue could not be reached