Trigger a SQL AI documents sync
POST/nl2sql/sync-jobs
Starts a knowledge-base ingestion job that syncs the uploaded SQL AI training documents into the store backing the chatbot. Run this after adding, replacing or deleting training documents, since those changes do not affect the chatbot's answers until a sync completes.
The sync is asynchronous: a 200 means the job started, not that ingestion has finished. Poll GET /nl2sql/sync-jobs and match on the returned RunId to follow its progress.
Only one sync may run at a time per tenant. A concurrent request is rejected, but note that the handler raises that conflict as a backend exception, so it surfaces as HTTP 500 rather than 409 or 400.
Requires SQLAI to be present in the environment's enabled AI services; otherwise the request fails with AI-1004.
Request
Responses
- 200
- 400
- 500
Sync job started. Use RunId with GET /nl2sql/sync-jobs to track it.
Response Headers
Input validation or authorization failure. Body is {"Message": " -
Response Headers
Backend failure, and also two conditions that are really caller errors: a sync is already running for the tenant (GE-1034), and an unknown TenantName, which fails while resolving the tenant's configuration and produces a message with no error-code prefix. Codes: GE-1034, DB-1001 (the run record could not be persisted). Body is {"Message": " -