API Reference
POST
varnish-logsGet Varnish Logs
Get Varnish Logs is a POST request to https://api.sharkcluster.com/varnish-logs in the Server Management section of the SharkCluster API. Retrieves real-time or historical logs from the Varnish service. It takes 3 parameters, 1 required (server_id).
Request URL
POST
https://api.sharkcluster.com/varnish-logsHow do you call Get Varnish Logs?
- 1Send a POST request to https://api.sharkcluster.com/varnish-logs.
- 2Include the required parameter: server_id.
- 3Add the optional parameters only if you need them: lines and log_type.
Request parameters
| Parameter | Type | Description |
|---|---|---|
server_idRequired | string | The unique identifier or Instance ID of the server. |
lines | integer | Default 200 |
log_type | string | systemd (default), ncsa (HTTP logs), vsl (detailed), or backend. |
What does Get Varnish Logs 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/varnish-logs', {
server_id: "123",
log_type: "ncsa",
lines: 100
});
console.log(response.data.logs);
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.