API Reference
POSTvarnish-logs

Get 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

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

How do you call Get Varnish Logs?

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

Request parameters

ParameterTypeDescription
server_id
Required
stringThe unique identifier or Instance ID of the server.
linesintegerDefault 200
log_typestringsystemd (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);

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