Create a saved CoreCluster log query
Saves a query, filters or neither with a source and a time range: for this CoreCluster when cluster_id is sent, for everywhere otherwise. You can keep 50 saved queries.
Path parameters
The id of a CoreCluster. Digits only. At least 1.
Body
Filters, kept with the query.
Up to 60 characters.
A LogsQL query. Up to 4 KB. Up to 4,096 characters.
The time range the query opens with. custom means a range chosen each time.
15m1h6h24h7d30dcustomA log source. all reads every source. search and queue exist only on platforms that run them; the sources list says which ones an environment has. Defaults to all.
allweb-accessweb-errorphpappcrondatabasecachesearchqueueThe {cluster} of the request, to keep the query for this CoreCluster. Left out or null, the query is kept for everywhere. At least 1.
Returns
201 The saved query.
Fields of the 201 answer
True when you may delete it.
The CoreCluster the query is kept for. Sent only for a query kept for a CoreCluster.
Format: date-time.
The saved filters. Null when none were sent, and an empty list when they were saved as an empty object.
At least 1.
The LogsQL query. Null for a query saved as filters.
15m1h6h24h7d30dcustomTrue for a query Corefinity support shared with everyone on the site or CoreCluster.
The site the query is kept for. Null for one kept for every site, or for a CoreCluster.
A log source. all reads every source. search and queue exist only on platforms that run them; the sources list says which ones an environment has. Defaults to all.
allweb-accessweb-errorphpappcrondatabasecachesearchqueueIf it is refused
| Status | Reason | What to do |
|---|---|---|
401 | none | Send a valid token as Authorization: Bearer <token>. |
403 | company_unavailable | Your company is unavailable. |
403 | scope_required | Use a token with the scope named in scope. |
403 | two_factor_required | Turn on two-factor on your account, then send again. |
404 | feature_off | This feature is not on for your organisation yet. |
422 | invalid | Fix the field named in field; errors says why. |
429 | rate_limited | Wait for the seconds in Retry-After. |
Reasons are listed by name in Errors and refusals.
The same task elsewhere
curl -X POST https://manage.corefinity.com/api/corestack/clusters/1017/logs/saved-queries \
-H "Authorization: Bearer $COREFINITY_TOKEN" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-d '{
"filters": {
"level": [
"warning",
"error"
]
},
"name": "PHP warnings",
"range": "7d",
"source": "php"
}'use Illuminate\Support\Facades\Http;
$response = Http::withToken(env('COREFINITY_TOKEN'))
->acceptJson()
->post('https://manage.corefinity.com/api/corestack/clusters/1017/logs/saved-queries', [
'filters' => [
'level' => [
'warning',
'error',
],
],
'name' => 'PHP warnings',
'range' => '7d',
'source' => 'php',
]);
$data = $response->json();const res = await fetch('https://manage.corefinity.com/api/corestack/clusters/1017/logs/saved-queries', {
method: 'POST',
headers: {
Authorization: `Bearer ${process.env.COREFINITY_TOKEN}`,
Accept: 'application/json',
'Content-Type': 'application/json',
},
body: JSON.stringify({
filters: {
level: [
'warning',
'error',
],
},
name: 'PHP warnings',
range: '7d',
source: 'php',
}),
});
// An answer with no body (204) has nothing to parse.
const text = await res.text();
const data = text && JSON.parse(text);import os
import requests
res = requests.post(
"https://manage.corefinity.com/api/corestack/clusters/1017/logs/saved-queries",
headers={
"Authorization": f"Bearer {os.environ['COREFINITY_TOKEN']}",
"Accept": "application/json",
},
json={
"filters": {
"level": [
"warning",
"error",
],
},
"name": "PHP warnings",
"range": "7d",
"source": "php",
},
)
data = res.json() if res.content else None{
"can_delete": true,
"cluster": {
"id": 1017,
"name": "Northwind UK 1"
},
"created_at": "2026-11-03T10:00:00Z",
"filters": null,
"id": 3319,
"name": "Checkout errors",
"query": "status:>=500",
"range": "24h",
"shared": false,
"site": null,
"source": "web-access"
}{
"message": "Unauthenticated."
}{
"code": "company_unavailable",
"message": "Your company is unavailable.",
"reason": "company_unavailable"
}{
"code": "feature_off",
"message": "Not found.",
"reason": "feature_off"
}{
"code": "invalid",
"errors": {
"query": [
"Keep the query under 4 KB."
]
},
"field": "query",
"message": "Keep the query under 4 KB.",
"reason": "invalid"
}{
"code": "rate_limited",
"message": "Too many requests. Try again in 60 seconds.",
"reason": "rate_limited",
"retry_after_seconds": 60
}