Skip to main content
POST
/
api
/
query
Creates query for a card
curl --request POST \
  --url https://aiapi.{client}.nx1cloud.com/api/query \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "suggestion_id": "<string>"
}
'
{
  "card_url": "<string>",
  "domain": "<string>",
  "domain_urn": "<string>",
  "query": "<string>",
  "prompt": "<string>",
  "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "embed_url": "<string>",
  "error": "<string>"
}

Authorizations

Authorization
string
header
required

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

Body

application/json
suggestion_id
string
required

The unique ID of the selected suggestion used to create the query.

Response

Query for a card created 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.

embed_url
string | null

URL to embed the resulting visualization or card.

error
string | null

Error message if any occurred during query generation or execution.