List a site's log field values
Answers up to 50 values of one field with how many lines carry each, most frequent first. The time range defaults to the last 24 hours.
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.
The name of a field, as the fields list answers it. Letters, digits and _, ., :, @ and -.
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.
envsiteThe log source to read. Defaults to all.
allweb-accessweb-errorphpappcrondatabasecachesearchqueueAnswer only the values that start with this text. Up to 256 characters.
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 values and their counts.
Fields of the 200 answer
True when the field has more than 50 values.
Up to 50 items.
Fields of each item
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_unavailable | Logs could not be read, or are not collected for the site yet. Read the message; try again shortly. |
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/sites/1042/logs/fields/status/values \
-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/fields/status/values');
$data = $response->json();const res = await fetch('https://manage.corefinity.com/api/corestack/sites/1042/logs/fields/status/values', {
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/fields/status/values",
headers={
"Authorization": f"Bearer {os.environ['COREFINITY_TOKEN']}",
"Accept": "application/json",
},
)
data = res.json() if res.content else None{
"field": "status",
"truncated": false,
"values": [
{
"count": 41203,
"value": "200"
},
{
"count": 812,
"value": "404"
},
{
"count": 17,
"value": "500"
}
]
}{
"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"
}