Skip to main content
POST
/
api
/
query
/
ask
Asks question about a data domain
curl --request POST \
  --url https://aiapi.{client}.nx1cloud.com/api/query/ask \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "domain": "<string>",
  "prompt": "<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
domain
string
required

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

prompt
string
required

The natural language prompt or question provided by the user.

Response

Ask successful.

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.