compute
PUT /v1/compute/spend-cap
Set or clear the organisation's monthly limit on metered compute.
אימות
שלח מפתח API כטוקן Bearer. נקודת קצה זו אינה מציינת הרשאת ספציפית במפרט, לכן הקצה למפתח שלך את המינימום הנדרש ובדוק את התגובה במקום להניח הנחות.
המקום שבו מזהה הארגון שלך נכנס
נקודת קצה זו מקבלת את org_id כשדה בגוף ה-JSON.
מזהה הארגון שלך נמצא במסוף מפתחות ה-API בלוח הבקרה שלך, לצד המפתח עצמו. זהו אותו מזהה בכל קריאה שאתה מבצע.
נסה זאת
החלף כל דבר בסוגריים זוויתיים בערכים משלך, ואת מציין מיקום המפתח במפתח מלוח הבקרה שלך.
curl -X PUT https://api.zinndigital.com/v1/compute/spend-cap \
-H "Authorization: Bearer zdk_live_…" \
-H "Content-Type: application/json" \
-d '{ "monthly_cap_minor": <object> }'מחובר? קונסולת ה-API בלוח הבקרה שלך מזינה את מזהה הארגון האמיתי שלך ואת המפתח שלך, ומריצה את הבקשה מול ה-API הפיזי כך שתוכל לראות את התגובה בפועל. פתח נקודת קצה זו במסוף ה-API
פרטים
When this month's metered hours reach the limit, the organisation's pay-by-the-hour machines are stopped within the hour, and started again within the hour of the limit being raised or the month turning. ⛔ A stopped machine still exists and is still rated by the hour; deleting it is what stops the billing.
גוף הבקשה
| שם | סוג | נדרש | מה זה |
|---|---|---|---|
monthly_cap_minor | object | כן | The new limit in minor units of the billing currency, or null to clear it. |
org_id | object | לא | Required only when the caller belongs to more than one organisation. |
תשובה
| שם | סוג | נדרש | מה זה |
|---|---|---|---|
monthly_cap_minor | object | כן | The organisation's monthly limit on metered compute. null = no limit. |
currency | string | כן | The organisation's billing currency. |
month_to_date_minor | integer | כן | What metered machines have rated so far this month, in currency. |
שגיאות שנקודה קצה זו עשויה להחזיר
401 · 403 · 422 · 429