İzleme
CPU, disk ve ağ ölçümleri ile sunucu işlem geçmişi.
#GET/cloud/servers/{id}/metrics
CPU, disk ve ağ zaman serileriKapsam: cloud_readgetMetricsBu işlemin OpenAPI parçası
Parametreler
| Alan | in | Tür | Açıklama |
|---|
id zorunlu | path | integer | Server id (= service id in the client area) |
period | query | string (24h, 7d, 30d) | |
Yanıtlar
| 200 | Metrics; each line is a list of [unix_time, value] — data: Metrics |
| 404 | Not found — also returned for objects owned by someone else |
Örnekler
curl -s 'https://www.gyrohosting.com/api/v1/client/cloud/servers/12345/metrics' \
-H "Authorization: Bearer $GYRO_TOKEN"
gyro server metrics 12345
import os, uuid, requests
h = {"Authorization": "Bearer " + os.environ["GYRO_TOKEN"]}
r = requests.get("https://www.gyrohosting.com/api/v1/client/cloud/servers/12345/metrics", headers=h, timeout=60)
r.raise_for_status()
print(r.json()["data"])
const res = await fetch("https://www.gyrohosting.com/api/v1/client/cloud/servers/12345/metrics", {
method: "GET",
headers: {
"Authorization": `Bearer ${process.env.GYRO_TOKEN}`,
},
});
const { data, error } = await res.json();
if (!res.ok) throw new Error(`${error.code}: ${error.message}`);
#GET/cloud/servers/{id}/activity
Sunucudaki son platform işlemleriKapsam: cloud_readserverActivityBu işlemin OpenAPI parçası
Parametreler
| Alan | in | Tür | Açıklama |
|---|
id zorunlu | path | integer | Server id (= service id in the client area) |
Yanıtlar
| 200 | Actions (newest first, max 50) — data: array<object> |
| 404 | Not found — also returned for objects owned by someone else |
Örnekler
curl -s 'https://www.gyrohosting.com/api/v1/client/cloud/servers/12345/activity' \
-H "Authorization: Bearer $GYRO_TOKEN"
gyro server activity list 12345
import os, uuid, requests
h = {"Authorization": "Bearer " + os.environ["GYRO_TOKEN"]}
r = requests.get("https://www.gyrohosting.com/api/v1/client/cloud/servers/12345/activity", headers=h, timeout=60)
r.raise_for_status()
print(r.json()["data"])
const res = await fetch("https://www.gyrohosting.com/api/v1/client/cloud/servers/12345/activity", {
method: "GET",
headers: {
"Authorization": `Bearer ${process.env.GYRO_TOKEN}`,
},
});
const { data, error } = await res.json();
if (!res.ok) throw new Error(`${error.code}: ${error.message}`);