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 query results

get

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
get
GET /api/v1/queries/{jobId} HTTP/1.1
Host: api.getcortexapp.com
Authorization: Bearer JWT
Accept: */*
{
  "progress": 1,
  "queryDetails": {
    "initiatedAt": "2025-06-28T19:23:14.615Z",
    "jobId": "text",
    "query": "text"
  },
  "result": [
    {
      "description": "text",
      "name": "text",
      "tag": "text",
      "type": "text"
    }
  ],
  "status": "IN_PROGRESS"
}

Run query

post

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
post
POST /api/v1/queries HTTP/1.1
Host: api.getcortexapp.com
Authorization: Bearer JWT
Content-Type: application/json
Accept: */*
Content-Length: 16

{
  "query": "text"
}
{
  "initiatedAt": "2025-06-28T19:23:14.615Z",
  "jobId": "text",
  "query": "text"
}

Last updated

Was this helpful?