List a site's log sources
Answers the log sources of the environment, whether each one is collected, the limits of a read, the logs quota and the time ranges on offer.
Path parameters
The id of a site row. A website's production site and each of its environments has its own id. Digits only. At least 1.
Query parameters
The site row id of another environment of the same website to read instead of {site}. At least 1.
env reads the one environment. site reads every environment of the website that you can see. Defaults to env.
envsiteReturns
200 The sources, limits, quota and ranges.
Fields of the 200 answer
Fields
The most lines a page.
How far back a read may start, in days.
The reads a minute one person may make, across the Control Panel, the API and MCP.
The ranges a read may use.
15m1h6h24h7d30dFields of each item
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-errorphpappcrondatabasecachesearchqueueWhy the source is not available: not_collected (the environment does not run it), or contract_v3 or tenant_pending (it starts once the environment's next platform update has applied). Null when available.
not_collectedcontract_v3tenant_pendingnullThe logs quota the lines count against.
Fields
How much of the quota is used.
How many days lines are kept for.
ok, warning when the quota is nearly used, over_quota, or unavailable.
okwarningover_quotaunavailableTrue when a line written as JSON is answered with its keys as fields.
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. |
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/sites/1042/logs/streams \
-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/sites/1042/logs/streams');
$data = $response->json();const res = await fetch('https://manage.corefinity.com/api/corestack/sites/1042/logs/streams', {
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/sites/1042/logs/streams",
headers={
"Authorization": f"Bearer {os.environ['COREFINITY_TOKEN']}",
"Accept": "application/json",
},
)
data = res.json() if res.content else None{
"limits": {
"max_limit": 1000,
"max_query_bytes": 4096,
"max_range_days": 90,
"queries_per_minute": 150,
"timeout_seconds": 15
},
"ranges": [
"15m",
"1h",
"6h",
"24h",
"7d",
"30d"
],
"sources": [
{
"available": true,
"key": "all",
"label": "All",
"reason": null
},
{
"available": true,
"key": "web-access",
"label": "Web access",
"reason": null
},
{
"available": true,
"key": "web-error",
"label": "Web errors",
"reason": null
},
{
"available": true,
"key": "php",
"label": "PHP",
"reason": null
},
{
"available": true,
"key": "app",
"label": "Application",
"reason": null
},
{
"available": true,
"key": "cron",
"label": "Cron",
"reason": null
},
{
"available": true,
"key": "database",
"label": "Database",
"reason": null
},
{
"available": true,
"key": "cache",
"label": "Cache",
"reason": null
},
{
"available": false,
"key": "search",
"label": "Search",
"reason": "not_collected"
},
{
"available": false,
"key": "queue",
"label": "Queue",
"reason": "not_collected"
}
],
"tenant": {
"percent": 42,
"quota_gb": 20,
"retention_days": 90,
"state": "ok",
"stored_gb": 8.4
},
"unpack_json": true
}{
"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"
}