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
Authorizations
Path parameters
jobIdstringRequired
jobId of the query to retrieve
Responses
200
Successfully found query
application/json
404
Query not found
application/json
429
The client has exceeded the rate limit by performing too many requests in a short period. Retry the request after a delay.
application/problem+json
get
/api/v1/queries/{jobId}GET /api/v1/queries/{jobId} HTTP/1.1
Host: api.getcortexapp.com
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
{
  "progress": 1,
  "queryDetails": {
    "initiatedAt": "2025-11-03T19:01:35.764Z",
    "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.
Authorizations
Body
querystringRequired
Responses
200
Successfully submitted query
application/json
400
Bad request
application/json
409
Conflict
application/json
429
The client has exceeded the rate limit by performing too many requests in a short period. Retry the request after a delay.
application/problem+json
post
/api/v1/queriesPOST /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-03T19:01:35.764Z",
  "jobId": "text",
  "query": "text"
}Last updated
Was this helpful?