cURL
curl -X POST https://api.aiql.io/queries/qry_5e7f/regenerate \
-H "Authorization: Bearer $AIQL_API_KEY" \
-H "AiQL-Workspace: $AIQL_WORKSPACE_ID" \
-H "Content-Type: application/json" \
-d '{"thread_id": "thr_1a2b"}'import os
from aiql import AiQL
client = AiQL(api_key=os.environ["AIQL_API_KEY"])
query = client.queries.regenerate("qry_5e7f", thread_id="thr_1a2b")import { AiQL } from "@aiql.io/sdk";
const client = new AiQL({ apiKey: process.env.AIQL_API_KEY });
const query = await client.queries.regenerate("qry_5e7f", { threadId: "thr_1a2b" });{
"chat_id": "<string>",
"run_id": "<string>",
"channel": "<string>",
"token": "<string>",
"subscription_token": "<string>",
"ws_url": "<string>",
"since": {
"offset": 123,
"epoch": "<string>"
}
}{
"detail": "<string>"
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}Queries
Regenerate Query
POST
/
queries
/
{id}
/
regenerate
cURL
curl -X POST https://api.aiql.io/queries/qry_5e7f/regenerate \
-H "Authorization: Bearer $AIQL_API_KEY" \
-H "AiQL-Workspace: $AIQL_WORKSPACE_ID" \
-H "Content-Type: application/json" \
-d '{"thread_id": "thr_1a2b"}'import os
from aiql import AiQL
client = AiQL(api_key=os.environ["AIQL_API_KEY"])
query = client.queries.regenerate("qry_5e7f", thread_id="thr_1a2b")import { AiQL } from "@aiql.io/sdk";
const client = new AiQL({ apiKey: process.env.AIQL_API_KEY });
const query = await client.queries.regenerate("qry_5e7f", { threadId: "thr_1a2b" });{
"chat_id": "<string>",
"run_id": "<string>",
"channel": "<string>",
"token": "<string>",
"subscription_token": "<string>",
"ws_url": "<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.
Path Parameters
Body
application/json