CorefinityCorefinityDocs
Open the Control PanelControl Panel
Logs · 10 of 25

List a CoreCluster's log sources

Answers the log sources, the limits of a read, the logs quota, the time ranges on offer, and each site of the CoreCluster with whether its logs are in the read.

GET/api/corestack/clusters/{cluster}/logs/streams

Path parameters

clusterintegerRequired

The id of a CoreCluster. Digits only. At least 1.

Query parameters

sitesarray of integers

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.

environmentstring

production reads each site's production environment. all reads every environment. Defaults to production.

productionall

Returns

200 The sources, limits, quota and ranges.

Fields of the 200 answer
limitsobjectRequired
Fields
max_limitintegerRequired

The most lines a page.

max_query_bytesintegerRequired
max_range_daysintegerRequired

How far back a read may start, in days.

queries_per_minuteintegerRequired

The reads a minute one person may make, across the Control Panel, the API and MCP.

timeout_secondsintegerRequired
rangesarray of stringsRequired

The ranges a read may use.

15m1h6h24h7d30d
sourcesarray of objectsRequired
Fields of each item
availablebooleanRequired
keystringRequired

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-errorphpappcrondatabasecachesearchqueue
labelstringRequired
reasonstring or nullRequired

Why 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_pendingnull
tenantobjectRequired

The logs quota the lines count against.

Fields
percentintegerRequired

How much of the quota is used.

quota_gbintegerRequired
retention_daysintegerRequired

How many days lines are kept for.

statestringRequired

ok, warning when the quota is nearly used, over_quota, or unavailable.

okwarningover_quotaunavailable
stored_gbnumberRequired
unpack_jsonbooleanRequired

True when a line written as JSON is answered with its keys as fields.

sitesarray of objectsRequired

Each site of the CoreCluster that you can see.

Fields of each item
availablebooleanRequired

True when the site's logs are in the read.

environmentstringRequired
idintegerRequired

The site row id, as sites takes it. At least 1.

labelstringRequired

If it is refused

StatusReasonWhat to do
401noneSend a valid token as Authorization: Bearer <token>.
403company_unavailableYour company is unavailable.
403scope_requiredUse a token with the scope named in scope.
403two_factor_requiredTurn on two-factor on your account, then send again.
404feature_offThis feature is not on for your organisation yet.
409logs_not_collectedLogs are not being collected for the environment yet. Try again later, or contact support.
409logs_scope_splitThese sites keep their logs in different places. Choose a cluster or site.
422invalidFix the field named in field; errors says why.
429rate_limitedWait for the seconds in Retry-After.
503logs_busyLogs are busy at the moment. Try again in a few seconds.
503logs_cluster_unavailableLogs 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/streams \
  -H "Authorization: Bearer $COREFINITY_TOKEN" \
  -H "Accept: application/json"
{
  "limits": {
    "max_limit": 1000,
    "max_query_bytes": 4096,
    "max_range_days": 30,
    "queries_per_minute": 150,
    "timeout_seconds": 15
  },
  "ranges": [
    "15m",
    "1h",
    "6h",
    "24h",
    "7d",
    "30d"
  ],
  "sites": [
    {
      "available": true,
      "environment": "Production",
      "id": 1042,
      "label": "harbourandfinch.example.com"
    },
    {
      "available": true,
      "environment": "Production",
      "id": 1051,
      "label": "journal.harbourandfinch.example.com"
    }
  ],
  "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": 8,
    "quota_gb": 120,
    "retention_days": 30,
    "state": "ok",
    "stored_gb": 10
  },
  "unpack_json": true
}
Try it
Held in this tab's memory only. Never stored or sent to us.

Use a token with only the read scope. How to make one

Was this helpful?
Open in ClaudeOpen in ChatGPT