Get lines around a CoreCluster's log line
Answers one line with the lines before and after it in the same stream, each list oldest first. Name the line as <stream_id>,<time>, both taken from a line a search answered.
Path parameters
The id of a CoreCluster. Digits only. At least 1.
Query parameters
The line, as <stream_id>,<time>. Up to 200 characters.
How many earlier lines to answer. Defaults to 20. 0 to 100.
How many later lines to answer. Defaults to 20. 0 to 100.
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.
productionallReturns
200 The line and its neighbours.
Fields of the 200 answer
The later lines, oldest first.
Fields of each item
The line's other fields, by name. An empty list when it has none.
The line's text.
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-errorphpappcrondatabasecachesearchqueueThe stream the line belongs to. With time, it names the line for the context endpoint.
When the line was written. Format: date-time.
The site the line came from. Null for a query with a pipe, or when the site cannot be told.
The earlier lines, oldest first.
Fields of each item
The line's other fields, by name. An empty list when it has none.
The line's text.
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-errorphpappcrondatabasecachesearchqueueThe stream the line belongs to. With time, it names the line for the context endpoint.
When the line was written. Format: date-time.
The site the line came from. Null for a query with a pipe, or when the site cannot be told.
One log line of a CoreCluster read, with the site it came from. One log line.
Fields
The line's other fields, by name. An empty list when it has none.
The line's text.
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-errorphpappcrondatabasecachesearchqueueThe stream the line belongs to. With time, it names the line for the context endpoint.
When the line was written. Format: date-time.
The site the line came from. Null for a query with a pipe, or when the site cannot be told.
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. |
404 | line_not_found | The log line is no longer available. Search again. |
409 | logs_not_collected | Logs are not being collected for the environment yet. Try again later, or contact support. |
409 | logs_scope_split | These sites keep their logs in different places. Choose a cluster or site. |
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/context?line=00000001000000003e23e8160039594a33894f6564e1b134%2C2026-11-03T09%3A53%3A00Z' \
-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/context?line=00000001000000003e23e8160039594a33894f6564e1b134%2C2026-11-03T09%3A53%3A00Z');
$data = $response->json();const res = await fetch('https://manage.corefinity.com/api/corestack/clusters/1017/logs/context?line=00000001000000003e23e8160039594a33894f6564e1b134%2C2026-11-03T09%3A53%3A00Z', {
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/context?line=00000001000000003e23e8160039594a33894f6564e1b134%2C2026-11-03T09%3A53%3A00Z",
headers={
"Authorization": f"Bearer {os.environ['COREFINITY_TOKEN']}",
"Accept": "application/json",
},
)
data = res.json() if res.content else None{
"after": [
{
"fields": {
"level": "info",
"method": "GET",
"src": "nginx-access",
"status": 200
},
"msg": "GET /basket/4 200",
"site": {
"environment": "Production",
"id": 1051,
"label": "journal.harbourandfinch.example.com"
},
"source": "web-access",
"stream_id": "00000001000000003e23e8160039594a33894f6564e1b134",
"time": "2026-11-03T09:54:00Z"
}
],
"before": [
{
"fields": {
"level": "info",
"method": "GET",
"src": "nginx-access",
"status": 200
},
"msg": "GET /basket/2 200",
"site": {
"environment": "Production",
"id": 1051,
"label": "journal.harbourandfinch.example.com"
},
"source": "web-access",
"stream_id": "00000001000000003e23e8160039594a33894f6564e1b134",
"time": "2026-11-03T09:52:00Z"
}
],
"line": {
"fields": {
"level": "info",
"method": "GET",
"src": "nginx-access",
"status": 200
},
"msg": "GET /basket/3 200",
"site": {
"environment": "Production",
"id": 1051,
"label": "journal.harbourandfinch.example.com"
},
"source": "web-access",
"stream_id": "00000001000000003e23e8160039594a33894f6564e1b134",
"time": "2026-11-03T09:53:00Z"
}
}{
"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"
}