Skip to main content
POST
/
api
/
dataeng
/
ask
Ask eng
curl --request POST \
  --url https://api.example.com/api/dataeng/ask \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "tables": [
    "<string>"
  ],
  "prompt": "<string>",
  "job_name": "<string>",
  "federated": true,
  "preview": true
}
'
{
  "query": "<string>",
  "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "data": {
    "start": 123,
    "row_count": 123,
    "columns": [
      "<string>"
    ],
    "next_start": 123,
    "data": [
      [
        "<unknown>"
      ]
    ]
  },
  "error": "<string>"
}

Documentation Index

Fetch the complete documentation index at: https://docs.nx1cloud.com/llms.txt

Use this file to discover all available pages before exploring further.

Authorizations

Authorization
string
header
required

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

Headers

x-correlation-id
string | null

Body

application/json
tables
string[]
required

List of the tables involved in the job or query. Format for a single table: .

(For example, public.employees).

prompt
string
required

The input question to generate the query.

job_name
string
required

Specifies the unique name of the job.

federated
boolean
required

Indicates whether we are selecting one or more catalogs.

preview
boolean
required

Specifies if a preview of the query is required.

Response

Ask successful.

query
string
required

The interpreted SQL query generated from the prompt.

id
string<uuid> | null

A unique ID for the generated query.

data
DataResponse · object

The data returned as part of the query response, if applicable.

error
string | null

Error message if any issue occurred during query generation.