CorefinityCorefinityDocs
Open the Control PanelControl Panel
Varnish · 16 of 19

List ready-made VCL

Lists ready-made snippets, each with the hook it belongs in.

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

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 snippets, shortened here.

Fields of the 200 answer
snippetsarray of objectsRequired
Fields of each item
contentstringRequired
descriptionstring
hookstringRequired
recvbackend_responsedeliver
idstringRequired
titlestringRequired

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/vcl/snippets \
  -H "Authorization: Bearer $COREFINITY_TOKEN" \
  -H "Accept: application/json"
{
  "snippets": [
    {
      "content": "# Never cache the stock checker\nif (req.url ~ \"^/stock-checker/\") {\n    return (pass);\n}\n",
      "description": "Never cache requests under a path (a stock checker, a quote tool).",
      "hook": "recv",
      "id": "bypass-path",
      "title": "Bypass a path"
    }
  ]
}
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