Get Bucket/Folder Stats
Get disk usage and object count for a bucket or a folder within it.
| Endpoint | Method | Admin Required |
|---|---|---|
/api/v1/objects/stats | GET | No |
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
| Status | Reason |
|---|---|
400 | Missing bucket query parameter |
404 | Bucket not found (or not owned by you) |