Skip to main content
POST
/
api
/
query
/
submit
Submit a query to save it and get visualizations
curl --request POST \
  --url https://api.example.com/api/query/submit \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "domain": "<string>",
  "query": "<string>"
}
'
{
  "card_url": "<string>",
  "domain": "<string>",
  "domain_urn": "<string>",
  "query": "<string>",
  "prompt": "<string>",
  "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "dashboard_id": 123,
  "embed_info": {
    "embed_url": "<string>",
    "entity_id": 123,
    "token": "<string>"
  },
  "error": "<string>",
  "analytics_provider": "superset"
}

Authorizations

Authorization
string
header
required

The access token received from the authorization server in the OAuth 2.0 flow.

Body

application/json
domain
string
required

The domain or data context where the query should be executed.

query
string
required

The SQL query string to be executed against the specified domain.

Response

Query for a card submitted successfully.

card_url
string
required

URL of the visualized card or dashboard generated from the query.

domain
string
required

The domain context related to the query or response.

domain_urn
string
required

The unique URN representing the domain in the metadata system.

query
string
required

The SQL query generated or executed in response to the user's prompt.

prompt
string
required

The original prompt or question submitted by the user.

id
string<uuid> | null

A unique identifier for the AI response or query.

dashboard_id

The unique identifier of the dashboard created.

embed_info
AnalyticsEmbedInfo · object

URL to embed the resulting visualization or card.

error
string | null

Error message if any occurred during query generation or execution.

analytics_provider
string | null
default:superset

The analytics platform used for visualization.