Queries
REST API operations for saved and scheduled queries
Overview
Use these API operations to interact with Saved and Scheduled Searches in Panther.
To call the API, see the How to use the Panther REST API instructions—including directions for how to invoke it directly from this documentation page.
Queries managed via the API must be written in SQL; they cannot use PantherFlow.
Required permissions
For
GEToperations, your API token must have theQuery Data Lakepermission.For
POST,PUT, andDELETEoperations, your API token must have theManage Saved Searchespermission.
Operations
The description of the query
The name of the query
The raw sql of the query
OK response.
The description of the query
The generated ID of the query
Determines if the query is managed by panther
The name of the query
The raw sql of the query
bad_request: Bad Request response.
exists: Conflict response.
POST /queries HTTP/1.1
Host: your-api-host
X-API-Key: YOUR_API_KEY
Content-Type: application/json
Accept: */*
Content-Length: 208
{
"description": "text",
"emailConfig": {
"preferAttachment": false,
"recipients": [
"text"
],
"sendEmpty": false
},
"name": "text",
"schedule": {
"cron": "text",
"disabled": true,
"rateMinutes": 1,
"timeoutMinutes": 1
},
"sql": "text"
}{
"createdAt": "text",
"description": "text",
"emailConfig": {
"preferAttachment": false,
"recipients": [
"text"
],
"sendEmpty": false
},
"id": "text",
"managed": true,
"name": "text",
"schedule": {
"cron": "text",
"disabled": true,
"rateMinutes": 1,
"timeoutMinutes": 1
},
"sql": "text",
"updatedAt": "text"
}ID of the query to fetch
OK response.
The description of the query
The generated ID of the query
Determines if the query is managed by panther
The name of the query
The raw sql of the query
not_found: Not Found response.
GET /queries/{id} HTTP/1.1
Host: your-api-host
X-API-Key: YOUR_API_KEY
Accept: */*
{
"createdAt": "text",
"description": "text",
"emailConfig": {
"preferAttachment": false,
"recipients": [
"text"
],
"sendEmpty": false
},
"id": "text",
"managed": true,
"name": "text",
"schedule": {
"cron": "text",
"disabled": true,
"rateMinutes": 1,
"timeoutMinutes": 1
},
"sql": "text",
"updatedAt": "text"
}updates a query
The description of the query
The name of the query
The raw sql of the query
OK response.
The description of the query
The generated ID of the query
Determines if the query is managed by panther
The name of the query
The raw sql of the query
bad_request: Bad Request response.
not_found: Not Found response.
POST /queries/{id} HTTP/1.1
Host: your-api-host
X-API-Key: YOUR_API_KEY
Content-Type: application/json
Accept: */*
Content-Length: 208
{
"description": "text",
"emailConfig": {
"preferAttachment": false,
"recipients": [
"text"
],
"sendEmpty": false
},
"name": "text",
"schedule": {
"cron": "text",
"disabled": true,
"rateMinutes": 1,
"timeoutMinutes": 1
},
"sql": "text"
}{
"createdAt": "text",
"description": "text",
"emailConfig": {
"preferAttachment": false,
"recipients": [
"text"
],
"sendEmpty": false
},
"id": "text",
"managed": true,
"name": "text",
"schedule": {
"cron": "text",
"disabled": true,
"rateMinutes": 1,
"timeoutMinutes": 1
},
"sql": "text",
"updatedAt": "text"
}ID of the query to delete
No Content response.
No content
bad_request: Bad Request response.
not_found: Not Found response.
DELETE /queries/{id} HTTP/1.1
Host: your-api-host
X-API-Key: YOUR_API_KEY
Accept: */*
No content
the pagination token
the maximum results to return
100OK response.
Pagination token for the next page of results
GET /queries HTTP/1.1
Host: your-api-host
X-API-Key: YOUR_API_KEY
Accept: */*
OK response.
{
"next": "text",
"results": [
{
"createdAt": "text",
"description": "text",
"emailConfig": {
"preferAttachment": false,
"recipients": [
"text"
],
"sendEmpty": false
},
"id": "text",
"managed": true,
"name": "text",
"schedule": {
"cron": "text",
"disabled": true,
"rateMinutes": 1,
"timeoutMinutes": 1
},
"sql": "text",
"updatedAt": "text"
}
]
}Last updated
Was this helpful?

