Skip to main content
Three endpoints that answer “how much is in there” without listing everything: aggregate totals for the whole bucket, bounded per-folder summaries, and a recalculation when the totals drift.
Auth: API key required on all three. A dashboard session cookie also works.

Folder summaries

Returns an item count and up to four preview items per folder. Call it only for the folders you are actually rendering, such as the rows currently on screen, so a level with many subfolders does not pay for every summary up front. List Storage leaves this data out for the same reason. An empty or missing paths returns an empty summaries object rather than an error.
summaries is keyed by the folder path you asked for. Each summary object holds:
  • itemCount, number: items counted in the folder, up to the scan ceiling
  • truncated, boolean: true when the folder holds more items than the scan looked at, so itemCount is a floor rather than an exact total. Render it as “99+” rather than as a count
  • previewItems, array: up to four items for a folder thumbnail, each { path, type } where type is image or video. Files that are neither are skipped
Status codes: 200 success · 400 more than 200 paths, or a path that escapes the storage root · 500 storage backend failed

Storage stats

Aggregate size and file count for stored originals, and for cached transformation variants.
On a cloud backend the figures come from incremental counters rather than a live bucket listing, which is what keeps this endpoint cheap. They can drift if the bucket is changed outside Openinary. Recalculate to reconcile. Status codes: 200 success · 500 storage backend failed

Recalculate stats

Recomputes the aggregates from a full bucket listing and returns the same shape as GET /storage/stats. Use it when the counters have drifted, typically after objects were added or removed outside Openinary.
This lists the entire bucket. On a large bucket it is slow and it costs list operations at your storage provider. Run it when you have reason to think the counters are wrong, not on a schedule.
Status codes: 200 success · 500 storage backend failed

List Storage

Browse folders and files one level at a time.

List Folders

Every folder path, for building a folder picker.