Atlas
Query

Ask a question

Runs the Atlas agent to completion and returns a structured JSON response with the answer, SQL queries executed, result data, step count, and token usage.

POST
/api/v1/query

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

application/json

application/json

application/json

application/json

application/json

curl -X POST "http://localhost:3001/api/v1/query" \  -H "Content-Type: application/json" \  -d '{    "question": "string"  }'
{
  "answer": "string",
  "sql": [
    "string"
  ],
  "data": [
    {
      "columns": [
        "string"
      ],
      "rows": [
        {
          "property1": null,
          "property2": null
        }
      ]
    }
  ],
  "steps": 0,
  "usage": {
    "totalTokens": 0
  },
  "pendingActions": [
    {
      "id": "string",
      "type": "string",
      "target": "string",
      "summary": "string",
      "approveUrl": "string",
      "denyUrl": "string"
    }
  ]
}
{
  "error": "string",
  "message": "string",
  "requestId": "string"
}
{
  "property1": null,
  "property2": null
}
{
  "property1": null,
  "property2": null
}
{
  "error": "string",
  "message": "string",
  "requestId": "string"
}
{
  "error": "string",
  "message": "string",
  "requestId": "string",
  "details": [
    null
  ]
}
{
  "property1": null,
  "property2": null
}
{
  "error": "string",
  "message": "string",
  "requestId": "string"
}
{
  "error": "string",
  "message": "string",
  "requestId": "string"
}
{
  "error": "string",
  "message": "string",
  "requestId": "string"
}
{
  "error": "string",
  "message": "string",
  "requestId": "string"
}
Edit on GitHub

Last updated on