همهٔ سیستم‌ها عملیاتی‌اند

مرجع API · نسخهٔ v1

API متریک سرور

مصرف لحظه‌ای پردازنده، حافظه و دیسک و نمودار زمانی مصرف و سرعت شبکه. این گروه با شناسهٔ vm-metrics در فایل OpenAPI آمده و ۳ endpoint دارد.

نمونه‌های curl توکن را از متغیر محیطی IRANCLAUD_TOKEN می‌خوانند؛ ساخت توکن و تنظیم این متغیر در راهنمای شروع سریع آمده است.

GET /api/v1/vms/{uuid}/metrics #

Live usage snapshot (CPU, memory, disk, uptime)

دسترسی لازم: vm:read محدودیت نرخ: خواندن
پارامترهای مسیر (۱)
uuid string
الزامی Server UUID (from GET /api/v1/vms)
پاسخ‌ها (۶)
  • 200 Snapshot data: statuscpu_pctmem_mbmax_mem_mbdisk_mbmax_disk_mbuptime_sects
  • 401 unauthenticated — Authorization header missing or not "Bearer …"; token_invalid — token unknown, expired, revoked or the account is not active
  • 403 scope_missing — the token lacks vm:read (details.required_scope)
  • 404 not_found — unknown server or owned by another account
  • 429 rate_limited — read limit reached; wait Retry-After seconds (details.retry_after_sec)
  • 503 compute_unavailable — the server platform did not answer; retry later
نمونهٔ curl
curl
curl \
  -H "Authorization: Bearer $IRANCLAUD_TOKEN" \
  "https://iranclaud.ir/api/v1/vms/YOUR_UUID/metrics"
GET /api/v1/vms/{uuid}/metrics/timeseries #

CPU, memory and network time series

دسترسی لازم: vm:read محدودیت نرخ: خواندن
پارامترهای مسیر (۱)
uuid string
الزامی Server UUID (from GET /api/v1/vms)
پارامترهای Query (۱)
tf string
اختیاری Time frame: hour | day | week | month (default hour)
پاسخ‌ها (۷)
  • 200 Series; t is a Unix timestamp data: tfrows
  • 401 unauthenticated — Authorization header missing or not "Bearer …"; token_invalid — token unknown, expired, revoked or the account is not active
  • 403 scope_missing — the token lacks vm:read (details.required_scope)
  • 404 not_found — unknown server or owned by another account
  • 422 validation_failed — unknown tf
  • 429 rate_limited — read limit reached; wait Retry-After seconds (details.retry_after_sec)
  • 503 compute_unavailable — the server platform did not answer; retry later
نمونهٔ curl
curl
curl \
  -H "Authorization: Bearer $IRANCLAUD_TOKEN" \
  "https://iranclaud.ir/api/v1/vms/YOUR_UUID/metrics/timeseries"
GET /api/v1/vms/{uuid}/traffic #

Network in/out rate series (kbps) — monthly quota: GET …/traffic/quota

دسترسی لازم: vm:read محدودیت نرخ: خواندن
پارامترهای مسیر (۱)
uuid string
الزامی Server UUID (from GET /api/v1/vms)
پارامترهای Query (۱)
tf string
اختیاری Time frame: hour | day | week | month (default hour)
پاسخ‌ها (۷)
  • 200 Series; t is a Unix timestamp data: tfrows
  • 401 unauthenticated — Authorization header missing or not "Bearer …"; token_invalid — token unknown, expired, revoked or the account is not active
  • 403 scope_missing — the token lacks vm:read (details.required_scope)
  • 404 not_found — unknown server or owned by another account
  • 422 validation_failed — unknown tf
  • 429 rate_limited — read limit reached; wait Retry-After seconds (details.retry_after_sec)
  • 503 compute_unavailable — the server platform did not answer; retry later
نمونهٔ curl
curl
curl \
  -H "Authorization: Bearer $IRANCLAUD_TOKEN" \
  "https://iranclaud.ir/api/v1/vms/YOUR_UUID/traffic"

همهٔ گروه‌های API