compute
PUT /v1/compute/spend-cap
Set or clear the organisation's monthly limit on metered compute.
Πισtoποίηση
Στείλτε ένα κλειδί API ως διακριτικό φορέα (bearer token). Αυτό το τελικό σημείο δεν ορίζει μια συγκεκριμένη άδεια στην προδιαγραφή, οπότε δώστε στο κλειδί σας τα ελάχιστα δυνατά δικαιώματα και ελέγξτε την απόκριση αντί να κάνετε υποθέσεις.
Πού μπαίνει το αναγνωριστικό του οργανισμού σας
Αυτό το endpoint δέχεται το πεδίο org_id στο σώμα JSON.
Το αναγνωριστικό του οργανισμού σας βρίσκεται στην οθόνη των κλειδιών API στον πίνακα ελέγχου σας, δίπλα στο ίδιο το κλειδί. Είναι το ίδιο αναγνωριστικό σε κάθε κλήση που πραγματοποιείτε.
Δοκιμάστε το
Ατικatastήstε ό,τι βρίskεtai μέσα σe γώniaδeς μe τis δikές sas timές, kai to placeholder klεidioύ μe éna klεidi apó ton pinaka ελέgchou sas.
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.
Σώμα αίτησης
| Όνομα | Τύpος | Υποχρεωτικό | Τι είναι |
|---|---|---|---|
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. |
Απάντηση
| Όνομα | Τύpος | Υποχρεωτικό | Τι είναι |
|---|---|---|---|
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