콘텐츠로 이동
GitHub

Quota

REST APIGeneratedfrom OpenAPI 3.2.0openapi.json

이 콘텐츠는 아직 번역되지 않았습니다.

What every endpoint shares is on Conventions.

Report the authenticated uploader’s storage-quota snapshot.

Scoped to the caller, and to nobody else: quota is accounted to the uploader, and one account’s storage use is not another’s business.

Authentication: required — bearer.

Parameters

  • X-Capsule-Crypto-Suite header integer

    The crypto suite id from the primitives inventory. Sent on writes; a suite this server does not implement is refused with 400.

  • X-Capsule-Protocol header string required

    The YYYY-MM-DD protocol version this request is written against. Outside the server’s [X-Capsule-Protocol-Min, X-Capsule-Protocol-Max] window the request is refused with 426.

  • X-Capsule-Sidecar-Schema header integer

    The sidecar schema version declared at sidecar_schema field 0. Sent on metadata updates; a schema newer than this server indexes is refused with 400.

Responses

  • 200 QuotaResponse application/json

    OK. Headers: X-Capsule-Min-Client-Build, X-Capsule-Protocol-Max, X-Capsule-Protocol-Min, X-Request-Id.

  • 400 CodedProblem application/problem+json

    Bad Request; Malformed handshake. Headers: X-Capsule-Min-Client-Build, X-Capsule-Protocol-Max, X-Capsule-Protocol-Min, X-Request-Id.

  • 401 CodedProblem application/problem+json

    Unauthorized. Headers: WWW-Authenticate, X-Capsule-Min-Client-Build, X-Capsule-Protocol-Max, X-Capsule-Protocol-Min, X-Request-Id.

  • 403 CodedProblem application/problem+json

    Forbidden. Headers: X-Capsule-Min-Client-Build, X-Capsule-Protocol-Max, X-Capsule-Protocol-Min, X-Request-Id.

  • 413 CodedProblem application/problem+json

    the request body exceeds the configured limit. Headers: X-Capsule-Min-Client-Build, X-Capsule-Protocol-Max, X-Capsule-Protocol-Min, X-Request-Id.

  • 500 CodedProblem application/problem+json

    Internal server error. Headers: X-Capsule-Min-Client-Build, X-Capsule-Protocol-Max, X-Capsule-Protocol-Min, X-Request-Id.

Request
curl -X GET 'https://capsule.example/v1/quota' \
-H "Authorization: Bearer $TOKEN" \
-H 'X-Capsule-Protocol: 2026-01-01'
200 · application/json
{
"used": 0,
"soft_limit": 0,
"hard_limit": 0,
"state": "string"
}

The models these endpoints carry, to 4 references deep.

An RFC 9457 problem detail.

Field Type Description
type string Required.
title string —
status integer Required.
detail string —
instance string —
code string Required. The stable error.* catalog code. The client localizes this; detail stays English. Present on every problem this server renders.
request_id string The UUIDv7 this server minted for the request, as the X-Request-Id header carries it. Quote it when reporting the failure: it names the request’s log lines.

A user’s quota snapshot.

Field Type Description
used integer Required. Bytes charged to the caller.
soft_limit integer | null Where the warning starts, or absent on an unlimited deployment.
hard_limit integer | null Where uploads stop, or absent on an unlimited deployment.
state string Required. The classified state: ok, soft_warning, hard_exceeded, grace_expired, suspended.