Skip to Content
Xeonr Developer Docs
UplApiBuckets

Get owner usage

POST
/uplim.api.v1.BucketsService/GetOwnerUsage

Storage totals for everything one owner owns: bytes and live uploads summed over the owner's buckets, with the per-bucket breakdown (largest first, each with the cap its owner set for it, if any). The owner's storage cap, the most all its buckets may hold together, is pool_bytes with pool_used_bytes beside it: a team's pool when it has one, a person's total (the deployment default unless a platform admin set another); both are absent when the owner is unlimited. owner_scope.personal covers the caller's own buckets; buckets shared with the caller are not theirs and are not counted. With user_id it covers that person's personal buckets instead, for the upl:admin scope only (else PermissionDenied). owner_scope.team covers a team's buckets and needs a upl role of reader or above in that team, or the upl:admin scope, else PermissionDenied. Totals count the same rows GetBucketStatistics does (every upload not deleted), read from a per-bucket rollup refreshed every few minutes rather than counted per request: computed_at says how fresh they are, and a bucket created since the last refresh is counted live. Traffic (requests, downloads, egress and ingress) comes from upl's own per-request log folded hourly: traffic_24h always, traffic_window when the request gives traffic_start_time, and traffic_counted_through for how far it is counted.

Access: a token that reaches the whole owner: a user token, an unrestricted personal access key for personal scope, or a team-wide access key for its own team. Folder- and bucket-scoped integration tokens, client_credentials tokens, and any token carrying RAR authorization details (which includes every access key restricted to particular buckets) are refused with PermissionDenied.

Required scopes: upl:bucket:read

Authorization

OAuth2 upl:bucket:read
AuthorizationBearer <token>

OAuth 2.0 authorization

In: header

Scope: upl:bucket:read

Header Parameters

Connect-Protocol-Version?number

Define the version of the Connect protocol

Connect-Timeout-Ms?number

Define the timeout, in ms

Request Body

application/json

ownerScope*|

Whose usage: the caller personally, or a team the caller holds a upl role in.

trafficStartTime?string

A window for traffic_window: its start. Traffic is counted by the hour (UTC), so the window starts at the hour this falls in. Unset: no traffic_window in the response. traffic_24h is always returned. timestamp.lt_now = true

Formatdate-time
trafficEndTime?string

The window's end, inclusive. Unset with traffic_start_time set: now.

Formatdate-time
userId?|

With owner_scope personal: whose personal buckets to total, by upl's user id (UserStorageSummary.user_id), for a platform admin. Needs upl:admin. Unset: the caller's own.

Formatint64
Range0 < value
[key: string]?never

Response Body

application/json

application/json

curl -X POST "https://uploads-api.xeonr.io/uplim.api.v1.BucketsService/GetOwnerUsage" \  -H "Connect-Protocol-Version: 1" \  -H "Connect-Timeout-Ms: 1000" \  -H "Content-Type: application/json" \  -d '{    "ownerScope": "map[personal:true]"  }'
{
  "bytesUsed": "2952790016",
  "objectCount": "5120",
  "bucketCount": "4",
  "capBytes": "0",
  "buckets": [
    "map[bucketName:Screenshots bucketRef:map[bucketId:1042] bytes:734003200 capBytes:10737418240 capOverridden:true egressBytes24h:2147483648 objects:1284 requests24h:4318 slug:screenshots]"
  ],
  "computedAt": "2026-10-22T09:27:00Z",
  "traffic24h": "map[downloads:912 egressBytes:2147483648 endTime:2026-10-22T10:00:00Z ingressBytes:53477376 requests:4318 startTime:2026-10-21T10:00:00Z]",
  "trafficWindow": "map[downloads:20114 egressBytes:48318382080 endTime:2026-10-22T09:30:00Z ingressBytes:1073741824 requests:98210 startTime:2026-10-01T00:00:00Z]",
  "trafficCountedThrough": "2026-10-22T09:00:00Z",
  "poolBytes": "107374182400",
  "poolUsedBytes": "2952790016"
}