cURL
curl https://api.aiql.io/queries/qry_5e7f \
-H "Authorization: Bearer $AIQL_API_KEY" \
-H "AiQL-Workspace: $AIQL_WORKSPACE_ID"import os
from aiql import AiQL
client = AiQL(api_key=os.environ["AIQL_API_KEY"])
query = client.queries.get("qry_5e7f")import { AiQL } from "@aiql.io/sdk";
const client = new AiQL({ apiKey: process.env.AIQL_API_KEY });
const query = await client.queries.get("qry_5e7f");{
"id": "<string>",
"content": "<string>",
"status": "<string>",
"output": "<string>",
"steps": [
{
"text": "<string>"
}
]
}{
"detail": "<string>"
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}Queries
Get Query
GET
/
queries
/
{id}
cURL
curl https://api.aiql.io/queries/qry_5e7f \
-H "Authorization: Bearer $AIQL_API_KEY" \
-H "AiQL-Workspace: $AIQL_WORKSPACE_ID"import os
from aiql import AiQL
client = AiQL(api_key=os.environ["AIQL_API_KEY"])
query = client.queries.get("qry_5e7f")import { AiQL } from "@aiql.io/sdk";
const client = new AiQL({ apiKey: process.env.AIQL_API_KEY });
const query = await client.queries.get("qry_5e7f");{
"id": "<string>",
"content": "<string>",
"status": "<string>",
"output": "<string>",
"steps": [
{
"text": "<string>"
}
]
}{
"detail": "<string>"
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}Authorizations
API key or UI session JWT passed as a Bearer token.
Headers
ID of the workspace the request operates on.
Path Parameters
Response
Successful Response
Unique identifier of the query.
Natural-language content of the query.
Status of the query: PENDING, PROCESSING, PROCESSED, or FAILED.
Result the query produced.
Ordered steps taken while working toward the final output. Each step is either an assistant text message ({"text": ...}) or a tool invocation ({"tool": ...}). Reasoning parts, tool arguments, and tool outputs are not included, and the final output is not repeated.
- QueryTextStep
- QueryToolStep
Show child attributes
Show child attributes