hosting

PATCH /v1/sites/{siteId}/cdn/budget

Set this site's metered CDN spend ceiling.

Bütün hosting nöqtələri

Doğrulama

API açarını bearer token kimi göndərin. Açar hosting.cdn.manage icazəsinə malik olmalıdır; bu icazəsi olmayan açar 404 deyil, 403 xətası ilə rədd edilir.

Bu endpoint heç bir təşkilat ID-si tələb etmir. Sizin açarınız artıq aid olduğu təşkilatı müəyyən edir və cavab həmin təşkilat üçün məhdudlaşdırılır.

Sınaqdan keçir

Bucaqlı mötərizələrdə olan hór şeyi öz qiymətlərinizlə, açar yertutucusunu isə idarə panelinizdən bir açarla əvəz edin.

curl -X PATCH https://api.zinndigital.com/v1/sites/{siteId}/cdn/budget \
  -H "Authorization: Bearer zdk_live_…" \
  -H "Content-Type: application/json" \
  -d '{ "cap_minor": <integer> }'

Sistemə daxil olmusunuz? İdarə panelinizdəki API konsolu real təşkilatınızın identifikatorunu və öz açarınızı avtomatik doldurur, sorğunu canlı API-yə qarşı icra edir ki, siz faktiki cavabı görə biləsiniz. Bu son nöqtəni API konsolunda açın

Təfərrüatlar

`cap_minor: 0` means **no per-site ceiling** — the account cap alone applies — and is the default. Any other value must be at least the platform minimum; a cap of a few cents is a site that pauses on its first visitor and reads as broken hosting rather than as a budget working. Raising the cap above what the site has already spent **resumes** it. Leaving it paused would require a second, undiscoverable action and would read as the setting not working. A site paused by staff is not resumed by this — that pause is not the customer's to lift. Requires `hosting.cdn.manage`.

Parametrlər

AdTipTələb olunurNədir
siteId (path)UuidBəliSite ID (UUIDv7).

Sorğu gövdəsi

AdTipTələb olunurNədir
cap_minorintegerBəli0 for no per-site ceiling, otherwise at least the platform minimum.

Cavab

AdTipTələb olunurNədir
cap_minorintegerBəliThis site's ceiling in integer minor units. `0` means no per-site ceiling — the account cap alone applies.
spent_period_minorintegerBəli
statestring<active, paused_cap, paused_standing, paused_admin>BəliFour states rather than a boolean, because the remedy differs: the customer's own cap is self-service, a standing lapse needs a payment, and a staff pause needs staff.
paused_reasonstringXeyr
meteredbooleanBəliWhether this site is on the tier that pays per gigabyte.
servingbooleanXeyrWhether the **metered** CDN is serving right now. Reads both this site's state and its account's, because either can pause it. ⛔ **Absent entirely when `metered` is `false`**, r…
currencystringXeyrISO code denominating `cap_minor` and `spent_period_minor` (§2.8). ⛔ Absent when the org has not opened metered credit, because minor units without an exponent are unreadable: a…

Bu son nöqtənin qaytara biləcəyi xətalar

401 · 403 · 404 · 422 · 429