compute
GET /v1/compute/servers/{serverId}/usage
One server's metered hours, charges and ledger check for a month.
אימות
שלח מפתח API כטוקן Bearer. נקודת קצה זו אינה מציינת הרשאת ספציפית במפרט, לכן הקצה למפתח שלך את המינימום הנדרש ובדוק את התגובה במקום להניח הנחות.
נקודת קצה זו אינה דורשת מזהה ארגון. המפתח שלך כבר מזהה את הארגון שאליו הוא שייך, והתגובה מוגבלת אליו בלבד.
נסה זאת
החלף כל דבר בסוגריים זוויתיים בערכים משלך, ואת מציין מיקום המפתח במפתח מלוח הבקרה שלך.
curl -X GET https://api.zinndigital.com/v1/compute/servers/{serverId}/usage \
-H "Authorization: Bearer zdk_live_…"מחובר? קונסולת ה-API בלוח הבקרה שלך מזינה את מזהה הארגון האמיתי שלך ואת המפתח שלך, ומריצה את הבקשה מול ה-API הפיזי כך שתוכל לראות את התגובה בפועל. פתח נקודת קצה זו במסוף ה-API
פרמטרים
| שם | סוג | נדרש | מה זה |
|---|---|---|---|
serverId (path) | Uuid | כן | The server's id, as listComputeServers reports it. Ours (UUIDv7), minted when the order row was written — never the provider's own identifier for the machine. |
period (query) | string | לא | The month, YYYY-MM (UTC). Defaults to the current month. |
תשובה
| שם | סוג | נדרש | מה זה |
|---|---|---|---|
period | string | כן | — |
hours | integer | כן | Started hours rated in the month. |
rated_minor | integer | כן | Whole minor units rated. A sub-unit remainder is carried, never rounded up. |
settled_minor | integer | כן | Net of tax |
unsettled_minor | integer | כן | Rated and not yet paid. |
currency | string | כן | — |
settlements | ComputeUsageSettlement[] | כן | — |
reconciles | boolean | כן | Whether hours, settlements, their orders and the balance draws all agree. It is computed from four independently written records, never a figure against itself. |
discrepancies | string[] | כן | Every disagreement found, in words. Empty when reconciles is true. |
שגיאות שנקודה קצה זו עשויה להחזיר
401 · 403 · 404 · 422 · 429