Get historical metrics data for a VPS over a specified timeframe
curl --request GET \
--url https://api.storiza.store/vps/{vmId}/metrics/historical \
--header 'Authorization: Bearer <token>'const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.storiza.store/vps/{vmId}/metrics/historical', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.storiza.store/vps/{vmId}/metrics/historical"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text){
"success": true,
"message": "Historical VPS metrics retrieved successfully",
"data": {
"metrics": [
{
"timestamp": "2023-12-25",
"cpu": 123,
"memory": 123,
"disk": 123,
"networkRx": 123,
"networkTx": 123
}
],
"meta": {
"timeframe": "hour",
"points": 123,
"requestedPoints": 123
}
}
}Server metrics
Get historical metrics data for a VPS over a specified timeframe
Returns the VPS’s RRD time series (CPU, memory, disk and network counters) for the requested timeframe. When points is supplied the series is down-sampled to at most that many samples. The meta block echoes the timeframe, the number of samples returned and the number requested.
Required API key permission: vps:read
GET
/
vps
/
{vmId}
/
metrics
/
historical
Get historical metrics data for a VPS over a specified timeframe
curl --request GET \
--url https://api.storiza.store/vps/{vmId}/metrics/historical \
--header 'Authorization: Bearer <token>'const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.storiza.store/vps/{vmId}/metrics/historical', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.storiza.store/vps/{vmId}/metrics/historical"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text){
"success": true,
"message": "Historical VPS metrics retrieved successfully",
"data": {
"metrics": [
{
"timestamp": "2023-12-25",
"cpu": 123,
"memory": 123,
"disk": 123,
"networkRx": 123,
"networkTx": 123
}
],
"meta": {
"timeframe": "hour",
"points": 123,
"requestedPoints": 123
}
}
}Authorizations
An API key from the Storiza dashboard (API & Integrations), sent as Authorization: Bearer stz_….
Path Parameters
Minimum string length:
1Query Parameters
Available options:
hour, day, week, month, year Required range:
1 <= x <= 1000Was this page helpful?