CorefinityCorefinityDocs
Open the Control PanelControl Panel
Varnish · 1 of 19

Get a site's Varnish

Answers whether Varnish is on, its version and the versions the site may use, its share of the site's memory, whether Magento is set up for it, and the purges left this hour.

GET/api/corestack/sites/{site}/varnish

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 site's Varnish.

Fields of the 200 answer
default_versionstring or nullRequired
enabledbooleanRequired
liveany

The latest sampled figures. Null until the site has been sampled.

magento_configobjectRequired

Whether Magento's own cache settings match.

Fields
checked_atstring or null

Format: date-time.

statestring or null
varnishbuiltinneeds_repairpending_codenull
memory_mibinteger or null

Varnish's share of the site's memory, in MiB.

offeredbooleanRequired

Whether the site can use Varnish yet.

opt_outbooleanRequired

Whether somebody switched Varnish off for the site.

optionsarray of objectsRequired
Fields of each item
allowedbooleanRequired

Whether the site may move to it. False for the current version, which it already runs.

currentbooleanRequired
reasonstring or nullRequired

Why it is not allowed; for the current version, that it is the current one.

statusstringRequired

Where the version stands, such as lts, eol or prerelease.

versionstringRequired
pendingobject or any or nullRequired

The switch or version change that is still running: its type, what it changes to (on or off for a switch, the version for a version change) and the operation to follow. Null when none is.

purgeobjectRequired

The site's purges.

Fields
available_inintegerRequired

Seconds until the next purge may be asked for. 0 while any are left.

lastobject or any or nullRequired

The latest purge, whoever or whatever sent it. Null when there has been none.

limit_per_hourintegerRequired
remaining_this_hourintegerRequired
redis_mibobject or any or null

Redis's memory, in MiB, with Varnish on and off. Null when the site's size cannot be told.

siteobjectRequired
Fields
domainstringRequired
environmentstringRequired
idintegerRequired

At least 1.

storage_mibinteger or null

The cache size, in MiB.

switched_offobject or any or null

When somebody switched it off, as at. Null otherwise.

versionstring or nullRequired

The Varnish version. While Varnish is off, the one the site had last; a switch-on without version uses it while it is still allowed for the site, and default_version otherwise.

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.
409varnish_not_offeredVarnish is available for Magento 2 sites only. Nothing to change here.
429rate_limitedWait for the seconds in Retry-After.

Reasons are listed by name in Errors and refusals.

The same task elsewhere

curl https://manage.corefinity.com/api/corestack/sites/1042/varnish \
  -H "Authorization: Bearer $COREFINITY_TOKEN" \
  -H "Accept: application/json"
{
  "default_version": "7.7",
  "enabled": true,
  "live": null,
  "magento_config": {
    "checked_at": "2026-11-06T09:00:12Z",
    "state": "varnish"
  },
  "memory_mib": 1280,
  "offered": true,
  "opt_out": false,
  "options": [
    {
      "allowed": true,
      "current": false,
      "reason": null,
      "status": "eol",
      "version": "8.0"
    },
    {
      "allowed": false,
      "current": true,
      "reason": "This is the current version",
      "status": "eol",
      "version": "7.7"
    },
    {
      "allowed": true,
      "current": false,
      "reason": null,
      "status": "lts",
      "version": "6.0"
    }
  ],
  "pending": null,
  "purge": {
    "available_in": 0,
    "last": {
      "at": "2026-11-06T09:16:40Z",
      "by": "Eleanor Finch",
      "count": 2,
      "items": [
        "cat_p_1180",
        "cat_c_27"
      ],
      "mode": "tags",
      "origin": "api",
      "status": "succeeded"
    },
    "limit_per_hour": 10,
    "remaining_this_hour": 9
  },
  "redis_mib": {
    "off": 768,
    "on": 512
  },
  "site": {
    "domain": "harbourandfinch.example.com",
    "environment": "Production",
    "id": 1042
  },
  "storage_mib": 640,
  "switched_off": null,
  "version": "7.7"
}
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