sdk-v2

Create Sql Example

Create a SQL example, or update the existing one with the same question.

Treated as an upsert keyed on (user_id, question): re-saving a question that already exists overwrites its SQL/note rather than failing on the unique constraint. This makes the "edit" and "delete + re-add same question" flows idempotent instead of returning a 500.

post/v2/sdk/sql-examples

Request

  • Base URL: https://api.pandas-ai.com (the document declares no server; this is the origin it was published from)
  • URL: https://api.pandas-ai.com/v2/sdk/sql-examples
  • Auth: none declared

Request body

questionstring required

Natural language question

sqlstring required

Gold SQL answer

notestring nullable

Optional explanation

tagsstring[]

Optional selection tags (same semantics as the semantic layer)

Response

Successful Response

idstring required
questionstring required
sqlstring required
notestring nullable
tagsstring[]
created_atstring date-time required
updated_atstring date-time required

Changes

No recorded changes to this operation across all 1 revision of this API.