Add SQL AI training data
POST/nl2sql/training-documents
Registers a training document used to improve SQL AI responses.
This call creates metadata only. To attach the actual file, follow it with GET /nl2sql/training-documents/{id}?action=get_upload_url and PUT the file to the returned URL. The document only reaches the chatbot's knowledge base after a sync job runs, so trigger POST /nl2sql/sync-jobs once the upload is complete.
Requires SQLAI to be present in the environment's enabled AI services; otherwise the request fails with AI-1004. Not idempotent: a duplicate DocumentName is rejected with IPV-1018.
Request
Responses
- 200
- 400
- 500
Training document registered. Upload the file next, then trigger a sync job.
Response Headers
Input validation or authorization failure. Body is {"Message": " -
Response Headers
Something went wrong at backend