VCL

A VCL is a Varnish configuration file used to customize the configuration for a Service.

Data model

contentStringThe VCL code to be included.
mainBooleanSet to true when this is the main VCL, otherwise false.
nameStringThe name of this VCL.
service_idStringThe alphanumeric string identifying a service.
versionIntegerThe current version of a service.

Endpoints

List custom VCL files

GET/service/service_id/version/version/vcl

Get boilerplate VCL with the service's TTL from the <a href="/api/config#settings">settings</a>

GET/service/service_id/version/version/boilerplate

Get a custom VCL file

GET/service/service_id/version/version/vcl/name

Get a custom VCL file with syntax highlighting

GET/service/service_id/version/version/vcl/name/content

Download a custom VCL file

GET/service/service_id/version/version/vcl/name/download

Get the generated VCL for a service

GET/service/service_id/version/version/generated_vcl

Get the generated VCL with syntax highlighting

GET/service/service_id/version/version/generated_vcl/content

Create a custom VCL file

POST/service/service_id/version/version/vcl

Set a custom VCL file as main

PUT/service/service_id/version/version/vcl/name/main

Update a custom VCL file

PUT/service/service_id/version/version/vcl/old_name

Delete a custom VCL file

DELETE/service/service_id/version/version/vcl/name

User contributed notes

We welcome comments that add use cases, ideas, tips, and caveats. All comments will be moderated before publication. To post support questions, visit our support center and we'll find you the help you need.