API Reference
POST
configure-varnishConfigure 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
POST
https://api.sharkcluster.com/configure-varnishHow do you call Configure Varnish?
- 1Send a POST request to https://api.sharkcluster.com/configure-varnish.
- 2Include the required parameter: server_id.
- 3Add the optional parameters only if you need them: config and vcl_content.
Request parameters
| Parameter | Type | Description |
|---|---|---|
server_idRequired | string | The unique identifier or Instance ID of the server. |
config | object | Includes listen_port, backend_port, cache_size, default_ttl, etc. |
vcl_content | string | Full 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"
}
});
Related Server Management endpoints
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.