API Reference
POSTconfigure-varnish

Configure Varnish

Configure Varnish is a POST request to https://api.sharkcluster.com/configure-varnish in the Server Management section of the SharkCluster API. Updates Varnish settings (ports, cache size, TTL) or applies a full VCL override. It automatically updates systemd overrides and Nginx proxy settings. It takes 3 parameters, 1 required (server_id).

Request URL

POSThttps://api.sharkcluster.com/configure-varnish

How do you call Configure Varnish?

  1. 1Send a POST request to https://api.sharkcluster.com/configure-varnish.
  2. 2Include the required parameter: server_id.
  3. 3Add the optional parameters only if you need them: config and vcl_content.

Request parameters

ParameterTypeDescription
server_id
Required
stringThe unique identifier or Instance ID of the server.
configobjectIncludes listen_port, backend_port, cache_size, default_ttl, etc.
vcl_contentstringFull VCL code to apply directly.

What does Configure Varnish return?

This endpoint has no documented response sample yet; check the response body of your first call.

Request sample

const axios = require('axios');
const response = await axios.post('https://api.sharkcluster.com/configure-varnish', {
    server_id: "123",
    config: {
        listen_port: "6081",
        cache_size: "512m",
        strip_cookies: "true"
    }
});

Stuck on an integration?

Raise a ticket from the panel with the endpoint and the response you got back — it reaches an engineer with your server already attached.

Contact us