Code Samples #
Copy
curl --request GET \
--url 'https://app.xcloud.host/api/v1/servers/{uuid}/monitoring/history' \
--header 'Authorization: Bearer YOUR_TOKEN'
const response = await fetch('https://app.xcloud.host/api/v1/servers/{uuid}/monitoring/history', {
method: 'GET',
headers: {
'Authorization': 'Bearer YOUR_TOKEN'
}
});
const data = await response.json();
console.log(data);
import requests
headers = {
"Authorization": "Bearer YOUR_TOKEN"
}
response = requests.get("https://app.xcloud.host/api/v1/servers/{uuid}/monitoring/history", headers=headers)
print(response.json())
<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => 'https://app.xcloud.host/api/v1/servers/{uuid}/monitoring/history',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_CUSTOMREQUEST => 'GET',
CURLOPT_HTTPHEADER => [
'Authorization: Bearer YOUR_TOKEN'
],
]);
$response = curl_exec($curl);
curl_close($curl);
echo $response;
using System.Net.Http;
var client = new HttpClient();
var request = new HttpRequestMessage(new HttpMethod("GET"), "https://app.xcloud.host/api/v1/servers/{uuid}/monitoring/history");
request.Headers.Add("Authorization", "Bearer YOUR_TOKEN");
var response = await client.SendAsync(request);
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
import java.net.URI;
import java.net.http.*;
HttpClient client = HttpClient.newHttpClient();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("https://app.xcloud.host/api/v1/servers/{uuid}/monitoring/history"))
.header("Authorization", "Bearer YOUR_TOKEN")
.method("GET", HttpRequest.BodyPublishers.noBody())
.build();
HttpResponse<String> response = client.send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
Response #
Copy
{
"success": true,
"message": "Monitoring history retrieved successfully.",
"data": {
"server": {
"uuid": "55ff66aa-77bb-88cc-99dd-00ee11ff2233",
"name": "web-1"
},
"range": "7d",
"samples": [
{
"cpu_usage": 12.4,
"ram_usage": 68.1,
"disk_usage": 34.7,
"time_at": "10:00 AM",
"sampled_at": "2026-04-01T10:00:00Z"
}
]
}
}
{
"success": false,
"message": "Unauthenticated.",
"data": null
}
{
"success": false,
"message": "An error occurred.",
"data": null
}
{
"success": false,
"message": "Not found.",
"data": null
}
Returns a time-series of Server-wide CPU, RAM, and disk usage sampled from ServerMonitor snapshots. Supports range=24h|7d (default 7d). Requires Pro plan — returns 403 on free plans. Requires the read:servers scope.
Path Parameters #
| Name | Type | Required | Description |
|---|---|---|---|
uuid | string (uuid) | Required | UUID of the Server |
Query Parameters #
| Name | Type | Required | Description |
|---|---|---|---|
range | string | Optional | Sampling window. 24h returns the last 24 hours; 7d returns the last week (default). |
Responses #
200 — Server monitoring history #
| Field | Type | Required | Description |
|---|---|---|---|
success | boolean | Optional | |
message | string | Optional | |
data | object | Optional | |
data | object | Optional | |
data.Server | object | Optional | |
data.Server.uuid | string (uuid) | Optional | |
data.Server.name | string | Optional | |
data.range | string | Optional | Allowed: 24h, 7d |
data.samples | array of object | Optional |
Example 200 response
Copy
{
"success": true,
"message": "Monitoring history retrieved successfully.",
"data": {
"server": {
"uuid": "55ff66aa-77bb-88cc-99dd-00ee11ff2233",
"name": "web-1"
},
"range": "7d",
"samples": [
{
"cpu_usage": 12.4,
"ram_usage": 68.1,
"disk_usage": 34.7,
"time_at": "10:00 AM",
"sampled_at": "2026-04-01T10:00:00Z"
}
]
}
}
401 — Missing or invalid authentication token #
| Field | Type | Required | Description |
|---|---|---|---|
success | boolean | Optional | |
message | string | Optional | |
data | object | Optional |
Example 401 response
Copy
{
"success": false,
"message": "Unauthenticated.",
"data": null
}
403 — Server is on a free plan or token lacks the required scope/policy. #
| Field | Type | Required | Description |
|---|---|---|---|
success | boolean | Optional | |
message | string | Optional | |
data | object | Optional |
Example 403 response
Copy
{
"success": false,
"message": "An error occurred.",
"data": null
}
404 — Resource not found or not accessible to your Team #
| Field | Type | Required | Description |
|---|---|---|---|
success | boolean | Optional | |
message | string | Optional | |
data | object | Optional |
Example 404 response
Copy
{
"success": false,
"message": "Not found.",
"data": null
}
