API Reference
GETmetrics/{dropletId}

Get Performance Metrics

Get Performance Metrics is a GET request to https://api.sharkcluster.com/metrics/{dropletId} in the Server Management section of the SharkCluster API. Retrieves historical performance data for CPU, Memory, and Bandwidth. Data is automatically grouped into time ranges: today, week, month, and year. Perfect for rendering trend charts. It takes 1 parameter, 1 required (dropletId).

Request URL

GEThttps://api.sharkcluster.com/metrics/{dropletId}

How do you call Get Performance Metrics?

  1. 1Get a token from the login endpoint (POST /login) and send it as Authorization: Bearer <token>. See Login.
  2. 2Send a GET request to https://api.sharkcluster.com/metrics/{dropletId}, replacing {dropletId} in the path with your own value.

Request parameters

ParameterTypeDescription
dropletId
Required
stringThe Internal Server ID or Provider Instance ID.
Authorization
Required
headerBearer token for authentication (e.g., Bearer eyJ...).

What does Get Performance Metrics return?

A successful call returns a JSON object with the fields cpu, memory, disk and bandwidth.

Request sample

const axios = require('axios');

const dropletId = "0000-1111-2222";

axios.get(`https://api.sharkcluster.com/metrics/${dropletId}`, {
  headers: { 'Authorization': 'Bearer YOUR_TOKEN' }
})
.then(res => console.log("Real-time Stats:", res.data.data))
.catch(err => console.error(err));

Response

{
    "cpu": {
        "today": [
            {
                "Time": "12:00",
                "CPU Usage": 388.29
            }
        ],
        "week": [
            {
                "Time": "Tue",
                "CPU Usage": 590.31
            }
        ],
        "month": [
            {
                "Time": "Week 1",
                "CPU Usage": 351.14
            }
        ],
        "year": []
    },
    "memory": {
        "today": [
            {
                "Time": "12:00",
                "Memory Free (Bytes)": 320875315.2
            }
        ],
        "week": [
            {
                "Time": "Tue",
                "Memory Free (Bytes)": 292038656
            }
        ],
        "month": [
            {
                "Time": "Week 1",
                "Memory Free (Bytes)": 283795456
            }
        ],
        "year": []
    },
    "disk": {
        "read": {},
        "write": {}
    },
    "bandwidth": {
        "in": {
            "today": [
                {
                    "Time": "12:00",
                    "Mbps In": 0.51
                }
            ],
            "week": [
                {
                    "Time": "Tue",
                    "Mbps In": 0.93
                }
            ],
            "month": [
                {
                    "Time": "Week 1",
                    "Mbps In": 0
                }
            ],
            "year": []
        },
        "out": {
            "today": [
                {
                    "Time": "12:00",
                    "Mbps Out": 0.07
                }
            ],
            "week": [
                {
                    "Time": "Tue",
                    "Mbps Out": 0.02
                }
            ],
            "month": [
                {
                    "Time": "Week 1",
                    "Mbps Out": 0.14
                }
            ],
            "year": []
        }
    }
}

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