Skip to content
getgeolens.com

Trigger Backfill

POST
/admin/backfill-embeddings/
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.

force
Force
boolean
all_tenants
All Tenants
boolean

Successful Response

Media type application/json
BackfillResponse

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
job_id
required
Any of:
string format: uuid
status
required
Status

‘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.

string
other_tenants
Other Tenants

Runs queued for the other tenants by an all_tenants request in a multi-tenant deployment. Empty otherwise.

Array<object>
BackfillTenantRun

What an all-tenant backfill request did for one other tenant.

object
tenant_id
required
Tenant Id

The tenant the run was queued for.

string format: uuid
job_id
required
Any of:
string format: uuid
status
required
Status

‘pending’ when a run was queued, ‘already_running’ when that tenant already had one in flight, ‘not_queued’ when queueing failed.

string
Allowed values: pending already_running not_queued

Example

{
"other_tenants": [
{
"status": "pending"
}
]
}

Bad request — invalid query parameters or payload

Media type application/problem+json
ProblemDetail
object
type
Type
string
default: about:blank
title
required
Title
string
status
required
Status
integer
detail
required
Any of:
string

Example

{
"detail": "Dataset not found",
"status": 404,
"title": "Not Found",
"type": "about:blank"
}

Unauthorized — missing or invalid credentials

Media type application/problem+json
ProblemDetail
object
type
Type
string
default: about:blank
title
required
Title
string
status
required
Status
integer
detail
required
Any of:
string

Example

{
"detail": "Dataset not found",
"status": 404,
"title": "Not Found",
"type": "about:blank"
}

Forbidden — caller lacks access to this resource

Media type application/problem+json
ProblemDetail
object
type
Type
string
default: about:blank
title
required
Title
string
status
required
Status
integer
detail
required
Any of:
string

Example

{
"detail": "Dataset not found",
"status": 404,
"title": "Not Found",
"type": "about:blank"
}

Not found

Media type application/problem+json
ProblemDetail
object
type
Type
string
default: about:blank
title
required
Title
string
status
required
Status
integer
detail
required
Any of:
string

Example

{
"detail": "Dataset not found",
"status": 404,
"title": "Not Found",
"type": "about:blank"
}

Conflict — resource state prevents the operation

Media type application/problem+json
ProblemDetail
object
type
Type
string
default: about:blank
title
required
Title
string
status
required
Status
integer
detail
required
Any of:
string

Example

{
"detail": "Dataset not found",
"status": 404,
"title": "Not Found",
"type": "about:blank"
}

Validation error

Media type application/problem+json
ProblemDetail
object
type
Type
string
default: about:blank
title
required
Title
string
status
required
Status
integer
detail
required
Any of:
string

Example

{
"detail": "Dataset not found",
"status": 404,
"title": "Not Found",
"type": "about:blank"
}

Too many requests — retry after the advertised interval

Media type application/problem+json
ProblemDetail
object
type
Type
string
default: about:blank
title
required
Title
string
status
required
Status
integer
detail
required
Any of:
string

Example

{
"detail": "Dataset not found",
"status": 404,
"title": "Not Found",
"type": "about:blank"
}
Retry-After
integer

Seconds until the request may be retried

Internal server error

Media type application/problem+json
ProblemDetail
object
type
Type
string
default: about:blank
title
required
Title
string
status
required
Status
integer
detail
required
Any of:
string

Example

{
"detail": "Dataset not found",
"status": 404,
"title": "Not Found",
"type": "about:blank"
}

Service unavailable — the background job queue could not be reached

Media type application/problem+json
ProblemDetail
object
type
Type
string
default: about:blank
title
required
Title
string
status
required
Status
integer
detail
required
Any of:
string

Example

{
"detail": "Dataset not found",
"status": 404,
"title": "Not Found",
"type": "about:blank"
}