hosting
GET /v1/sites/{siteId}/cdn/budget
This site's slice of the account's metered CDN spend.
การยืนยันตัวตน
ส่ง API key ในรูปแบบ bearer token คีย์ดังกล่าวต้องมีสิทธิ์ sites.view หากไม่มีสิทธิ์ ระบบจะปฏิเสธด้วยรหัส 403 แทนที่จะเป็น 404
ปลายทางนี้ไม่ต้องใช้รหัสองค์กร คีย์ของคุณระบุองค์กรที่เป็นเจ้าของอยู่แล้ว และการตอบกลับจะถูกจำกัดขอบเขตไว้เฉพาะองค์กรนั้น
ทดลองใช้เลย
แทนที่สิ่งใดๆ ที่อยู่ภายในวงเล็บแหลมด้วยค่าของคุณเอง และตัวยึดตำแหน่งคีย์ด้วยคีย์จากแดชบอร์ดของคุณ
curl -X GET https://api.zinndigital.com/v1/sites/{siteId}/cdn/budget \
-H "Authorization: Bearer zdk_live_…"เข้าสู่ระบบแล้วใช่ไหม คอนโซล API ในแดชบอร์ดของคุณจะเติมรหัสองค์กรจริงและคีย์ของคุณเองโดยอัตโนมัติ และทำการส่งคำขอไปยัง API จริง เพื่อให้คุณเห็นผลลัพธ์ที่เป็นข้อมูลจริง เปิดจุดสิ้นสุดนี้ในคอนโซล API
รายละเอียด
A per-site ceiling, which exists so that one site cannot take the rest of an account down with it. With only an account-level cap, a single crawled domain spends the whole balance and every other site in the account stops serving — a denial of service on a customer's entire estate, triggered by a stranger with a scraper. serving is the honest answer to "is the CDN working right now?" and reads both this site's state and its account's, because either can pause it. Requires sites.view.
พารามิเตอร์
| ชื่อ | ประเภท | จำเป็นต้องมี | ลักษณะของสิ่งนี้ |
|---|---|---|---|
siteId (path) | Uuid | ใช่ | Site ID (UUIDv7). |
การตอบกลับ
| ชื่อ | ประเภท | จำเป็นต้องมี | ลักษณะของสิ่งนี้ |
|---|---|---|---|
cap_minor | integer | ใช่ | This site's ceiling in integer minor units. 0 means no per-site ceiling — the account cap alone applies. |
spent_period_minor | integer | ใช่ | — |
state | string<active, paused_cap, paused_standing, paused_admin> | ใช่ | Four 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_reason | string | ไม่ใช่ | — |
metered | boolean | ใช่ | Whether this site is on the tier that pays per gigabyte. |
serving | boolean | ไม่ใช่ | Whether 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,… |
currency | string | ไม่ใช่ | ISO 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… |
ข้อผิดพลาดที่เอนด์พอยต์นี้สามารถส่งกลับได้
401 · 403 · 404 · 429