Skip to main content
 print this page

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

Sync job started. Use RunId with GET /nl2sql/sync-jobs to track it.

Response Headers
    Access-Control-Allow-Origin
    Access-Control-Allow-Methods
    Access-Control-Allow-Headers