Queries
Use these operations to interact with CQL queries in Cortex.
Required permissions
Edit entities: Your API key must have the Enable Query builder permission.
Operations
Retrieve the status and results of a CQL query
All requests to the Cortex API need to provide an Authorization: Bearer <token> header, where <token> is an API key created in the Settings page of your workspace.
jobId of the query to retrieve
Successfully found query
Query not found
The client has exceeded the rate limit by performing too many requests in a short period. Retry the request after a delay.
GET /api/v1/queries/{jobId} HTTP/1.1
Host: api.getcortexapp.com
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
{
"progress": 1,
"queryDetails": {
"initiatedAt": "2025-11-14T23:41:38.917Z",
"jobId": "text",
"query": "text"
},
"result": [
{
"description": "text",
"name": "text",
"tag": "text",
"type": "text"
}
],
"status": "IN_PROGRESS"
}Run a CQL query. For more information about the types of queries you can run, take a look at our CQL Explorer in the app.
All requests to the Cortex API need to provide an Authorization: Bearer <token> header, where <token> is an API key created in the Settings page of your workspace.
Successfully submitted query
Bad request
Conflict
The client has exceeded the rate limit by performing too many requests in a short period. Retry the request after a delay.
POST /api/v1/queries HTTP/1.1
Host: api.getcortexapp.com
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 16
{
"query": "text"
}{
"initiatedAt": "2025-11-14T23:41:38.917Z",
"jobId": "text",
"query": "text"
}Last updated
Was this helpful?