CorefinityCorefinityDocs
Open the Control PanelControl Panel
Logs · 2 of 25

Start an export of a CoreCluster's logs

Starts a file of the matching lines of every site of the CoreCluster that you can see, up to 50,000 lines or 64 MiB, and answers the export with its capability, which is shown only once. Read the export with GET /corestack/logs/exports/{download} until state is ready, then collect the file once, within 24 hours.

POST/api/corestack/clusters/{cluster}/logs/exports

Path parameters

clusterintegerRequired

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

Body

environmentstring or null

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

productionallnull
filtersobject or any or null

Filters applied beside the query.

fromstring or null

The start of the time range, as a date and time. It must be inside the time your logs are kept for.

querystring or null

A LogsQL query, sent as written. Every line when left out. Up to 4 KB. Up to 4,096 characters.

rangestring or any or null

How far back from now to read. One hour when neither range nor from is sent. Ignored when from is sent.

sitesarray of integers or null

The sites of this CoreCluster to read, by site row id. 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.

sourcestring

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
tostring or null

The end of the time range, as a date and time. Now when left out.

formatstringRequired

csv, or json for one JSON object a line.

csvjson

Returns

202 The export, which is being prepared, and its one-time capability. Poll the operation until it finishes.

Fields of the 202 answer
capabilitystringRequired

What opens the file, once. Answered here and never again.

downloadobjectRequired

An export of log lines.

Fields
bytesinteger or nullRequired

The size of the file. Null until it is ready.

errorstring or nullRequired

Why the export failed. Null otherwise.

expires_atstring or nullRequired

When the export can no longer be collected. Format: date-time.

formatstringRequired
csvjson
idstringRequired

The {download} of the export endpoints.

linesinteger or nullRequired

The lines in the file. Null until it is ready.

statestringRequired

preparing, then ready. expired once it was collected or its time ran out. failed when it could not be made.

preparingreadyexpiredfailed
truncatedbooleanRequired

True when the file was cut at 50,000 lines or 64 MiB.

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_rangeThe time range is outside the days logs are kept for. Choose a range inside the days the message names.
409logs_scope_splitThese sites keep their logs in different places. Choose a cluster or site.
409query_too_wideThe search covers too much. Choose a shorter range or a narrower search.
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 -X POST https://manage.corefinity.com/api/corestack/clusters/1017/logs/exports \
  -H "Authorization: Bearer $COREFINITY_TOKEN" \
  -H "Accept: application/json" \
  -H "Content-Type: application/json" \
  -d '{
    "format": "csv",
    "range": "24h",
    "source": "web-access"
  }'
{
  "capability": "Example-export-capability-0000000000000000000001",
  "download": {
    "bytes": null,
    "error": null,
    "expires_at": "2026-11-04T10:00:00Z",
    "format": "csv",
    "id": "01JB2Y8N7Q4X3R5T6V8W9Z0A1B",
    "lines": null,
    "state": "preparing",
    "truncated": false
  }
}
Try it

Try it is off for this endpointIt has not been cleared for the console. Copy the request and run it yourself when you are sure.

Was this helpful?
Open in ClaudeOpen in ChatGPT