hosting

POST /v1/sites/{siteId}/quota/resources/{resource}/downgrade

Reduce a site's allowance — refused while the site is over the target.

모든 hosting 엔드포인트

모든 개발자 문서

인증

Bearer 토큰으로 API 키를 전송하세요. 키는 반드시 sites.view 권한을 가지고 있어야 하며, 권한이 없는 키는 404가 아닌 403으로 거부됩니다.

이 엔드포인트는 조직 ID를 받지 않습니다. 사용자의 키가 이미 속한 조직을 식별하며, 응답은 해당 조직으로 한정됩니다.

무료 체험하기

대괄호 안에 있는 모든 내용을 사용자 지정 값으로 바꾸고, 키 플레이스홀더는 대시보드의 키로 바꾸세요.

curl -X POST https://api.zinndigital.com/v1/sites/{siteId}/quota/resources/{resource}/downgrade \
  -H "Authorization: Bearer zdk_live_…" \
  -H "Content-Type: application/json" \
  -d '{ "target": <number> }'

로그인하셨나요? 대시보드의 API 콘솔이 실제 조직 ID와 본인의 키를 자동으로 채우고 라이브 API를 대상으로 요청을 실행하므로 실제 응답을 확인할 수 있습니다. API 콘솔에서 이 엔드포인트를 여세요

상세 정보

Owner ruling: downgrades are allowed only when the site is not over the limit. The check is made against a live reading of the box, not a stored sample: a downgrade is an irreversible narrowing the customer meets at their next write, so an hour-old figure could license one that is already breached. ⛔ An unreadable usage is a refusal, not a pass. If the box cannot be measured the request answers 422; "we could not tell, so we allowed it" is how a customer ends up above a ceiling they did not choose. The 422 body names the real numbers — "This site is using 1.90 GB of disk, which is more than the 1.00 GB you asked for" — because a customer told only "you cannot reduce this" files a ticket, and one told the figures deletes something. Purchased grants for the resource are revoked so the ceiling is the number asked for; staff gestures are deliberately left alone. Requires sites.view and hosting.quota.manage.

매개변수

이름유형필수설명
siteId (path)UuidSite ID (UUIDv7).
resource (path)string<disk, inodes, bandwidth, database>Which metered per-site resource. Every SELLABLE resource is addressable: disk and inodes are written to the box where the driver can hold them, while bandwidth (since the…

요청 본문

이름유형필수설명
targetnumberThe new ceiling, in the resource's sold unit. Refused with 422 when the site is currently using more than this, or when its usage cannot be read.

응답

이름유형필수설명
resourcestring<disk, inodes, bandwidth, database>
unitSiteQuotaUnitThe 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, MB for the…
stepintegerOne purchasable step, in unit. A customer buys N of these, never an arbitrary size.
basenumberThe 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…
grantednumberExtra from grants live right now — staff gestures and purchased upgrades, added together.
totalnumberThe effective ceiling — base + granted. null when base is null.
usednumberMeasured usage. null means unknown — the box was unreachable, or nothing has sampled it yet — and never 0. A client must render those differently.
percentintegerUsage as a whole percentage of total, or null when either is unknown.
measured_atstringWhen 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_atstringWhen 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_percentinteger[]The thresholds at which the platform notifies the customer, ascending.
price_minorintegerCost 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…
price_currencystring
price_intervalstring<monthly, yearly>

이 엔드포인트가 반환할 수 있는 오류

401 · 403 · 404 · 422 · 429