CorefinityCorefinityDocs
Open the Control PanelControl Panel
Varnish · 14 of 19

Get one VCL revision

Answers one revision with its three snippets and a unified diff of each against the VCL now, or against another revision.

GET/api/corestack/sites/{site}/varnish/vcl/revisions/{number}

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.

numberintegerRequired

A revision's number, from the list. The first is 0.

Query parameters

againststring

The number of the revision to compare with, or current (the default).

Returns

200 The revision and its differences.

Fields of the 200 answer
appliedbooleanRequired

Whether Varnish runs it.

authorstring or null

The person's name, or Corefinity. Left out when the account no longer exists.

created_atstring or nullRequired

Format: date-time.

currentbooleanRequired

Whether it is the saved VCL.

diagnosticsobject
Fields
errorsinteger
warningsinteger
hooksarray of stringsRequired

The snippets it changed.

recvbackend_responsedeliver
idintegerRequired

At least 1.

mcpboolean

Whether an AI assistant made it.

notestring or null
numberintegerRequired
operation_idinteger or null
originstringRequired

How the revision came about, such as save, revert or platform for revision 0.

statusstringRequired

Where the revision stands, such as saving, pending_verify, applied, rejected, verify_failed, rolled_back, superseded or saved_dormant.

againstinteger or nullRequired

The number of the revision it is compared with. Null when the site has no revision with the number asked for; the diff is then against nothing.

contentobjectRequired

The three snippets: recv runs when a request arrives, backend_response when Magento has answered, deliver before the answer is sent.

Fields
backend_responsestringRequired
deliverstringRequired
recvstringRequired
content_sha256string
diagnostics_listarray of objects
Fields of each item
codestring

The policy's rule, such as VN-POL-09; the policy explains each. Left out of a finding of the compiler, which has no rule.

columninteger or null
hookstring or null

The snippet it is about (recv, backend_response or deliver), or * for the policy's limit on the snippets together. Empty for a finding of the compiler about the VCL as a whole, whose line and column are 0.

kindstringRequired

What found it: the policy (policy for an error, advice for a warning) or the compiler (compile).

policycompileadvice
lineinteger or null
messagestringRequired
severitystringRequired
errorwarning
sourcestring

What found it, in words, such as the Varnish version the compile ran on. Left out of a finding of the policy.

diffobjectRequired

A unified diff per snippet. Null where it agrees.

Fields
backend_responsestring or null
deliverstring or null
recvstring or null

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.
422invalidFix the field named in field; errors says why.
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/revisions/0 \
  -H "Authorization: Bearer $COREFINITY_TOKEN" \
  -H "Accept: application/json"
{
  "against": 1,
  "applied": false,
  "author": "Corefinity",
  "content": {
    "backend_response": "# Your vcl_backend_response snippet. Empty means the platform VCL only.\n",
    "deliver": "# Your vcl_deliver snippet. Empty means the platform VCL only.\n",
    "recv": "# Your vcl_recv snippet. Empty means the platform VCL only.\n"
  },
  "content_sha256": "3b4323671f111e8235c1f2dec5c8b2757c2ceddb81a234dda5df7b02c7306bfa",
  "created_at": "2026-11-01T10:02:11Z",
  "current": false,
  "diagnostics": {
    "errors": 0,
    "warnings": 0
  },
  "diagnostics_list": [],
  "diff": {
    "backend_response": null,
    "deliver": null,
    "recv": "--- revision 1\n+++ revision 0\n@@ -1,3 +1,1 @@\n-if (req.url ~ \"^/stock-checker/\") {\n-    return (pass);\n-}\n+# Your vcl_recv snippet. Empty means the platform VCL only.\n"
  },
  "hooks": [
    "recv",
    "backend_response",
    "deliver"
  ],
  "id": 40,
  "mcp": false,
  "number": 0,
  "operation_id": null,
  "origin": "platform",
  "status": "applied"
}
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