Skip to content

Get per-bucket footprint over a time window

  • Method: GET
  • Path: /v1/orgs/{org}/s3/usage/by-bucket
  • Operation ID: getUsageByBucket
  • Tag: Object storage

Send Authorization: Bearer <credential>. The credential is either an API key (vsk_…) created for an organization, or an OIDC access token obtained by signing in to VirtScale.

Name Type Required Description
org string (uuid) Yes The organization’s id.
Name Type Required Description
granularity string No Bucket width for the series.
from string (date-time), nullable No Window start (inclusive). Default: 7 days ago.
to string (date-time), nullable No Window end (exclusive). Default: now.
Field Type Required Enum Description
from string (date-time) Yes
granularity string Yes
retention_days integer Yes
series array of BucketUsagePointOut Yes
series.bucket string Yes
series.bytes integer Yes
series.objects integer Yes
series.period_start string (date-time) Yes
to string (date-time) Yes

Every error response is application/problem+json (schema Problem).

Status Meaning
400 The request is malformed or failed validation.
401 The credential is missing or invalid.
404 The resource does not exist.
default Any other status is possible; the code field identifies the error.
curl "https://api.virtscale.nl/v1/orgs/$ORG_ID/s3/usage/by-bucket" \
  -H "Authorization: Bearer $VIRTSCALE_API_KEY"