hosting
POST /v1/sites/{siteId}/quota/resources/{resource}/upgrade
Buy more disk or file allowance for one site.
인증
Bearer 토큰으로 API 키를 전송하세요. 키는 반드시 sites.view 권한을 가지고 있어야 하며, 권한이 없는 키는 404가 아닌 403으로 거부됩니다.
이 엔드포인트는 조직 ID를 받지 않습니다. 사용자의 키가 이미 속한 조직을 식별하며, 응답은 해당 조직으로 한정됩니다.
무료 체험하기
대괄호 안에 있는 모든 내용을 사용자 지정 값으로 바꾸고, 키 플레이스홀더는 대시보드의 키로 바꾸세요.
curl -X POST https://api.zinndigital.com/v1/sites/{siteId}/quota/resources/{resource}/upgrade \
-H "Authorization: Bearer zdk_live_…" \
-H "Content-Type: application/json" \
-d '{ "steps": <integer> }'로그인하셨나요? 대시보드의 API 콘솔이 실제 조직 ID와 본인의 키를 자동으로 채우고 라이브 API를 대상으로 요청을 실행하므로 실제 응답을 확인할 수 있습니다. API 콘솔에서 이 엔드포인트를 여세요
상세 정보
Raises this site's ceiling by `steps` purchasable steps (1 GB of disk, 50,000 inodes) and applies it to the box. Recorded as an open-ended grant rather than by editing the base, so *what the site started with* and *what the customer bought* stay separately revocable. ⛔⛔ **The charge is created BEFORE the ceiling is raised, and an upgrade that cannot be charged for is refused with `422` — no grant, nothing on the box.** Both refusals answer `422` and the body distinguishes them: no published price in the caller's currency, or no way to take the payment. Free capacity on a real box is the failure no customer reports, because they received what they asked for. Charge-then-apply is deliberate: a charged-but-unapplied upgrade is repaired by the ten-minute reconciler, and free capacity is repaired by nobody. An upgrade also **lifts a quota freeze immediately**, because paying is the remedy and waiting for a sweep would be the worst minute of the product to leave to a schedule. Requires `sites.view` **and** `hosting.quota.manage` — an upgrade commits the organisation to a recurring charge, which is a money authority rather than a hosting one.
매개변수
| 이름 | 유형 | 필수 | 설명 |
|---|---|---|---|
siteId (path) | Uuid | 예 | Site ID (UUIDv7). |
resource (path) | string<disk, inodes> | 예 | Which metered per-site resource. Only resources the platform actually enforces are addressable — `bandwidth` is modelled and priceable in admin but nothing measures or enforces… |
요청 본문
| 이름 | 유형 | 필수 | 설명 |
|---|---|---|---|
steps | integer | 예 | How many purchasable steps to add. |
응답
| 이름 | 유형 | 필수 | 설명 |
|---|---|---|---|
resource | string<disk, inodes, bandwidth> | 예 | — |
unit | SiteQuotaUnit | 예 | The unit a quota's figures are expressed in, as a **code the client localises** — never a word to render raw. `GB` for disk and bandwidth, `files` for inodes. ⛔ This was an unco… |
step | integer | 예 | One purchasable step, in `unit`. A customer buys N of these, never an arbitrary size. |
base | number | 예 | The site's own allowance, copied from the product line's admin-set default when the site was provisioned. `null` means this site has no limit row yet — it has not been through p… |
granted | number | 예 | Extra from grants live right now — staff gestures and purchased upgrades, added together. |
total | number | 예 | The effective ceiling — `base + granted`. `null` when `base` is null. |
used | number | 예 | Measured usage. `null` means **unknown** — the box was unreachable, or nothing has sampled it yet — and never `0`. A client must render those differently. |
percent | integer | 예 | Usage as a whole percentage of `total`, or `null` when either is unknown. |
measured_at | string | 예 | When the box was last asked. **Render the age.** A bar drawn from a two-day-old reading looks identical to one drawn a minute ago, and the customer cannot tell. |
reverts_at | string | 예 | When the ceiling next **drops**, because a temporary grant expires. `null` when no live grant has an expiry. A customer whose limit is about to fall needs to know before it does. |
warn_at_percent | integer[] | 예 | The thresholds at which the platform notifies the customer, ascending. |
price_minor | integer | 예 | Cost of ONE step, in integer minor units of `price_currency`, NET of tax. `null` means no price is published in the caller's currency — the client must then show no upgrade cont… |
price_currency | string | 예 | — |
price_interval | string<monthly, yearly> | 예 | — |
이 엔드포인트가 반환할 수 있는 오류
401 · 403 · 404 · 422 · 429