Get Bucket/Folder Stats

Get disk usage and object count for a bucket or a folder within it.
EndpointMethodAdmin Required
/api/v1/objects/statsGETNo

Returns the total size and object count for a bucket you own, or for a specific folder within it. This is a recursive, on-demand calculation - the console fetches it lazily, one call per bucket/folder row already visible, rather than embedding it in List Objects (which would make listing slow to scale).

Query Parameters

bucket
string required
Name of the bucket.
prefix
string
Scope the stats to a folder (e.g. photos/) instead of the whole bucket. Omit or leave empty for whole-bucket stats.

Response

{
    "sizeBytes": 15728640,
    "objectCount": 42
}

sizeBytes is the total on-disk size of every object under the scope (bucket or folder), objectCount the number of objects.

Errors

StatusReason
400Missing bucket query parameter
404Bucket not found (or not owned by you)