palbaseDocs

Palbase Storage · API

GET/storage/stats

Read the storage stats

What the project keeps, counted: its objects and their bytes — an object's own and its renditions', as storage.bytes meters them — in all and per bucket (every bucket; an empty one with zeros), and, for each of the last days UTC days (today included; a day nothing was added on is listed with zeros), the objects first written that day and their bytes. Counted from the objects the project keeps now: a deleted object is in no count, and a replaced one counts on the day it was first written, with the bytes it holds now.

Called by your server, with the project's secret key.

Query

daysinteger · optionalHow many UTC days the series covers, today included: 1 to 90 (30 when absent); a value outside that range is refused.
curl
curl -X GET "https://<your-ref>.palbase.studio/storage/stats" \
  -H "apikey: $PALBASE_SECRET_KEY"

Responses

200The counts

400The request is malformed: a field, a path or a parameter is wrong

401No key, or not a key of this project (the edge's answer)

403Not the project's secret key; or, on a credential-less route, a private object or a link that is not valid for it

429The project's request rate, or its storage quota for the period, is used up — or, slowed for its month's traffic, it has as many downloads under way as are paced at once; Retry-After says when to try again

503The platform could not answer now; retrying is safe (Retry-After)

defaultAn error: the envelope names it (`error`) and explains it (`error_description`).

Operation GetStorageStats of storage's contract.