Skip to content

Get usage over a time window

  • Method: GET
  • Path: /v1/orgs/{org}/s3/usage
  • Operation ID: getUsage
  • 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: start of the current UTC month.
to string (date-time), nullable No Window end (exclusive). Default: now.
Field Type Required Enum Description
from string (date-time) Yes
granularity string Yes
series array of UsagePointOut Yes
series.meter string Yes
series.period_start string (date-time) Yes
series.quantity string Yes
to string (date-time) Yes
totals UsageTotalsOut Yes
totals.egress_gb string Yes
totals.storage_gb_month string 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" \
  -H "Authorization: Bearer $VIRTSCALE_API_KEY"