billing
GET /v1/cdn/credit
The account's prepaid metered-CDN balance, spend cap and top-up settings.
Authentification
Envoyez une clé API en tant que jeton du porteur. La clé doit posséder l'autorisation billing.view ; une clé qui ne l'a pas est refusée avec le code 403, et non 404.
Cet endpoint ne prend aucun identifiant d'organisation. Votre clé identifie déjà l'organisation à laquelle elle appartient, et la réponse y est limitée.
Essayer
Remplacez tout ce qui se trouve entre crochets par vos propres valeurs, et le espace réservé à la clé par une clé de votre tableau de bord.
curl -X GET https://api.zinndigital.com/v1/cdn/credit \
-H "Authorization: Bearer zdk_live_…"Connecté ? La console d'API de votre tableau de bord saisit votre véritable ID d'organisation ainsi que votre propre clé, et exécute la requête sur l'API de production afin que vous puissiez voir la réponse réelle. Ouvrir ce point de terminaison dans la console API
Détails
The metered Enterprise-edge tier is prepaid. This is the balance, the customer's own spend ceiling, what has been spent this period, and whether auto-top-up is on. `worst_case_overshoot_minor` is reported to the customer rather than hidden, and it is the honest part of this endpoint. A spend cap cannot be exact: between one usage sample and the cut-off, traffic keeps flowing, so the cap is overshot by `peak_bandwidth x poll_interval x rate`. That is bounded by a hard egress rate limit at the vendor, not by how often we poll — but it is not zero, and a product that promises an exact ceiling it cannot hold is worse than one that states the tolerance. Requires `billing.view`.
Réponse
| Nom | Type | Obligatoire | Qu'est-ce que c'est |
|---|---|---|---|
currency | string | Oui | — |
balance_minor | integer | Oui | — |
spend_cap_minor | integer | Oui | The customer's own ceiling. Enforced, not advisory. |
spent_period_minor | integer | Oui | — |
min_spend_cap_minor | integer | Oui | The lowest cap the platform accepts. |
auto_top_up | boolean | Oui | On by default. Refills the balance so serving continues **below** the cap; it never raises the cap. |
auto_top_up_amount_minor | integer | Oui | — |
state | string<active, paused_cap, paused_standing, paused_admin> | Oui | — |
paused_reason | string | Non | — |
worst_case_overshoot_minor | integer | Non | How far past the cap spending can run before the next usage sample stops it. Reported rather than hidden: the cap cannot be exact, and a product promising a ceiling it cannot ho… |
Erreurs que cet point de terminaison peut renvoyer
401 · 403 · 404 · 429