CorefinityCorefinityDocs
Open the Control PanelControl Panel
Logs · 25 of 25

Get a site's logs usage

Answers the logs quota of the website, what is stored, how long lines are kept, 30 days of daily figures and the share of each environment you can see.

GET/api/corestack/sites/{site}/logs/usage

Path parameters

siteintegerRequired

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.

Returns

200 The usage.

Fields of the 200 answer
addonobject

The extra log storage on the owner's contract. Sent only while billing is on for your company, the site or CoreCluster has a usage-billed contract and you may read its billing account.

Fields
monthlyobjectRequired

What the extra GB cost a month.

Fields
amountstringRequired
currencystringRequired
purchased_gbintegerRequired

The extra GB on the contract now.

unitstringRequired
unit_priceobjectRequired

The monthly price of one more GB.

Fields
amountstringRequired
currencystringRequired
by_environmentarray of objectsRequired

The share of each environment you can see.

Fields of each item
environmentobjectRequired

One environment of a website, addressed by its site row.

Fields
env_idstringRequired

The environment's platform identifier.

hostnamestringRequired

The environment's own address on the platform.

idintegerRequired

The site row id, the {site} every /corestack/sites/{site} endpoint takes.

namestringRequired
rolestringRequired

The environment's role, such as production or staging.

role_labelstringRequired
slugstringRequired
percentintegerRequired
stored_bytesintegerRequired
dailyarray of objectsRequired

One entry a day for the last 30 days, oldest first, over the environments you can see.

Fields of each item
daystringRequired

Format: date.

ingested_bytesintegerRequired
rowsintegerRequired

The lines taken in that day.

stored_bytesintegerRequired
forecastobjectRequired
Fields
days_to_quotainteger or nullRequired

Days until the quota is full at the last week's growth. Null when it cannot be told.

next_enforce_atstring or nullRequired

When the oldest lines are next removed to bring the store under its quota. Null while the state is ok. Format: date-time.

percentintegerRequired
quotaobjectRequired
Fields
included_gbintegerRequired
purchased_gbintegerRequired
quota_gbintegerRequired
retention_daysintegerRequired
stored_gbnumberRequired
tenantobjectRequired
Fields
ownerobjectRequired

What the quota belongs to.

Fields
refobjectRequired

The site (id, domain) or the CoreCluster (id, name).

typestringRequired
sitecorecluster
statestringRequired

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

okwarningover_quotaunavailable

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.
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/sites/1042/logs/usage \
  -H "Authorization: Bearer $COREFINITY_TOKEN" \
  -H "Accept: application/json"
{
  "addon": {
    "monthly": {
      "amount": "2.00",
      "currency": "GBP"
    },
    "purchased_gb": 20,
    "unit": "log_storage_gb",
    "unit_price": {
      "amount": "0.10",
      "currency": "GBP"
    }
  },
  "by_environment": [
    {
      "environment": {
        "env_id": "harbourandfinch-example-com",
        "hostname": "harbourandfinch-example-com.northwind.cfstack.example.net",
        "id": 1042,
        "name": "Production",
        "role": "production",
        "role_label": "Production",
        "slug": "production"
      },
      "percent": 90,
      "stored_bytes": 7600000000
    },
    {
      "environment": {
        "env_id": "harbourandfinch-example-com--staging",
        "hostname": "staging-harbourandfinch-example-com.northwind.cfstack.example.net",
        "id": 1043,
        "name": "Staging",
        "role": "staging",
        "role_label": "Staging",
        "slug": "staging"
      },
      "percent": 10,
      "stored_bytes": 800000000
    }
  ],
  "daily": [
    {
      "day": "2026-11-01",
      "ingested_bytes": 1580000000,
      "rows": 1230000,
      "stored_bytes": 395000000
    },
    {
      "day": "2026-11-02",
      "ingested_bytes": 1600000000,
      "rows": 1245000,
      "stored_bytes": 400000000
    },
    {
      "day": "2026-11-03",
      "ingested_bytes": 610000000,
      "rows": 470000,
      "stored_bytes": 152000000
    }
  ],
  "forecast": {
    "days_to_quota": 62,
    "next_enforce_at": null
  },
  "percent": 21,
  "quota": {
    "included_gb": 20,
    "purchased_gb": 20
  },
  "quota_gb": 40,
  "retention_days": 90,
  "stored_gb": 8.4,
  "tenant": {
    "owner": {
      "ref": {
        "domain": "harbourandfinch.example.com",
        "id": 1042
      },
      "type": "site"
    },
    "state": "ok"
  }
}
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