Get a histogram of a CoreCluster's logs
Answers how many matching lines each slice of the time range holds, split by level, for the same source, query, filters and time as a search. A query that cannot be counted over time answers no buckets and a warning.
Path parameters
The id of a CoreCluster. Digits only. At least 1.
Query parameters
The sites of this CoreCluster to read, by site row id: a list (sites[]=1042&sites[]=1051) or one comma-separated value. At most 200. Every site you can see when left out. A site that is not on this CoreCluster, or that you cannot see, answers 404.
production reads each site's production environment. all reads every environment. Defaults to production.
productionallThe log source to read. Defaults to all.
allweb-accessweb-errorphpappcrondatabasecachesearchqueueA LogsQL query, sent as written. Every line when left out. Up to 4 KB. Up to 4,096 characters.
The filters of a search (see the search's filters), as JSON encoded in base64.
How many slices to cut the time range into. Defaults to 60. 10 to 200.
How far back from now to read. Ignored when from is sent.
15m1h6h24h7d30dThe start of the time range, as a date and time. It must be inside the time your logs are kept for.
The end of the time range, as a date and time. Now when left out.
Returns
200 The buckets.
Fields of the 200 answer
Fields of each item
The start of the slice. Format: date-time.
The count of each level in the slice. Lines without a level count as unknown.
If 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. |
409 | logs_not_collected | Logs are not being collected for the environment yet. Try again later, or contact support. |
409 | logs_range | The time range is outside the days logs are kept for. Choose a range inside the days the message names. |
409 | logs_scope_split | These sites keep their logs in different places. Choose a cluster or site. |
409 | query_too_wide | The search covers too much. Choose a shorter range or a narrower search. |
422 | invalid | Fix the field named in field; errors says why. |
429 | rate_limited | Wait for the seconds in Retry-After. |
503 | logs_busy | Logs are busy at the moment. Try again in a few seconds. |
503 | logs_cluster_unavailable | Logs are not available at the moment. Try again shortly. |
Reasons are listed by name in Errors and refusals.
The same task elsewhere
curl https://manage.corefinity.com/api/corestack/clusters/1017/logs/histogram \
-H "Authorization: Bearer $COREFINITY_TOKEN" \
-H "Accept: application/json"use Illuminate\Support\Facades\Http;
$response = Http::withToken(env('COREFINITY_TOKEN'))
->acceptJson()
->get('https://manage.corefinity.com/api/corestack/clusters/1017/logs/histogram');
$data = $response->json();const res = await fetch('https://manage.corefinity.com/api/corestack/clusters/1017/logs/histogram', {
method: 'GET',
headers: {
Authorization: `Bearer ${process.env.COREFINITY_TOKEN}`,
Accept: 'application/json',
},
});
// 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.get(
"https://manage.corefinity.com/api/corestack/clusters/1017/logs/histogram",
headers={
"Authorization": f"Bearer {os.environ['COREFINITY_TOKEN']}",
"Accept": "application/json",
},
)
data = res.json() if res.content else None{
"buckets": [
{
"count": 3420,
"from": "2026-11-03T09:00:00Z",
"levels": {
"error": 2,
"info": 3418
}
},
{
"count": 3391,
"from": "2026-11-03T09:05:00Z",
"levels": {
"info": 3391
}
},
{
"count": 0,
"from": "2026-11-03T09:10:00Z",
"levels": {}
}
],
"warnings": []
}{
"message": "Unauthenticated."
}{
"code": "company_unavailable",
"message": "Your company is unavailable.",
"reason": "company_unavailable"
}{
"code": "feature_off",
"message": "Not found.",
"reason": "feature_off"
}{
"code": "logs_not_collected",
"message": "Logs are not being collected for this environment yet",
"reason": "logs_not_collected"
}{
"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
}{
"code": "logs_busy",
"message": "Logs are busy at the moment. Try again in a few seconds",
"reason": "logs_busy"
}