compute

PUT /v1/compute/spend-cap

Set or clear the organisation's monthly limit on metered compute.

جميع نقاط نهاية compute

جميع مستندات المطورين

المصادقة

أرسل مفتاح واجهة برمجة التطبيقات (API) كرمز حامل (bearer token). لا يحدد نقطة النهاية هذه إذنًا محددًا في المواصفات، لذا امنح مفتاحك الحد الأدنى الذي محتاجه وتحقق من الاستجابة بدلاً من الافتراض.

حيث يتم إدخال معرف مؤسستك

تقبل هذه نقطة النهاية 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

التفاصيل

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_minorobjectنعمThe new limit in minor units of the billing currency, or null to clear it.
org_idobjectلاRequired only when the caller belongs to more than one organisation.

الاستجابة

الاسمالنوعمطلوبما هو هذا
monthly_cap_minorobjectنعمThe organisation's monthly limit on metered compute. null = no limit.
currencystringنعمThe organisation's billing currency.
month_to_date_minorintegerنعمWhat metered machines have rated so far this month, in currency.

الأخطاء التي يمكن أن تُرجعها نقطة النهاية هذه

401 · 403 · 422 · 429