cURL
curl https://api.aiql.io/queries/qry_5e7f/token \
-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"])
token = client.queries.token("qry_5e7f")import { AiQL } from "@aiql.io/sdk";
const client = new AiQL({ apiKey: process.env.AIQL_API_KEY });
const token = await client.queries.token("qry_5e7f");{
"chat_id": "<string>",
"channel": "<string>",
"token": "<string>",
"subscription_token": "<string>",
"ws_url": "<string>",
"run_id": "<string>",
"since": {
"offset": 123,
"epoch": "<string>"
}
}{
"detail": "<string>"
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}Queries
Get Query Token
GET
/
queries
/
{id}
/
token
cURL
curl https://api.aiql.io/queries/qry_5e7f/token \
-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"])
token = client.queries.token("qry_5e7f")import { AiQL } from "@aiql.io/sdk";
const client = new AiQL({ apiKey: process.env.AIQL_API_KEY });
const token = await client.queries.token("qry_5e7f");{
"chat_id": "<string>",
"channel": "<string>",
"token": "<string>",
"subscription_token": "<string>",
"ws_url": "<string>",
"run_id": "<string>",
"since": {
"offset": 123,
"epoch": "<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.