پرش به محتوای اصلی
همه چیز در حال کار است
آغاز محتوای اصلی
بازگشت به مستندات

edge

4 endpoint

GET /api/v1/edge/records scope: edge:read

List CDN-eligible records and their proxy state

پاسخ‌ها
  • 200Edge records
نمونه cURL
curl -X GET -H "Authorization: Bearer ic_pat_…" \
  https://iranclaud.ir/api/v1/edge/records
GET /api/v1/edge/usage scope: edge:read

Per-domain CDN usage over the last 30 days

پاسخ‌ها
  • 200Usage rows
نمونه cURL
curl -X GET -H "Authorization: Bearer ic_pat_…" \
  https://iranclaud.ir/api/v1/edge/usage
POST /api/v1/edge/records/{rid} scope: edge:toggle

Enable/disable CDN (+auto-SSL) on a record

پارامترهای مسیر
  • ridDNS record ID
بدنه درخواست (JSON)
{
    "enabled": true
}
پاسخ‌ها
  • 200Updated edge record
نمونه cURL
curl -X POST -H "Authorization: Bearer ic_pat_…" \
  -H "Content-Type: application/json" \
    -d '{"enabled":true}' \
  https://iranclaud.ir/api/v1/edge/records/{rid}
PATCH /api/v1/edge/records/{rid}/settings scope: edge:toggle

Update a record's edge settings (WAF, caches, headers, IP lists, rate limits)

پارامترهای مسیر
  • ridDNS record ID
بدنه درخواست (JSON)
{
    "hsts": true,
    "cors": true,
    "security_headers": true,
    "blocked_ips": [
        "203.0.113.10"
    ]
}
پاسخ‌ها
  • 200Updated settings
نمونه cURL
curl -X PATCH -H "Authorization: Bearer ic_pat_…" \
  -H "Content-Type: application/json" \
    -d '{"hsts":true,"cors":true,"security_headers":true,"blocked_ips":["203.0.113.10"]}' \
  https://iranclaud.ir/api/v1/edge/records/{rid}/settings