Skip to Content
Xeonr Developer Docs
UplApi

Buckets

Create, update, delete buckets and manage bucket-level permissions and sharing

postBulk copy content

Copies multiple uploads to a new folder, preserving metadata and thumbnails without re-processing. **Required scopes:** `upl:uploads:create`

postBulk delete content

Permanently deletes multiple uploads or folders in a single operation. **Required scopes:** `upl:bucket:manage`

postBulk move content

Moves multiple uploads or folders to a new parent folder and/or updates their tags. **Required scopes:** `upl:bucket:manage`

postCreate bucket

Creates a new storage bucket with the specified configuration and destination settings. **Required scopes:** `upl:bucket:manage`

postDelete bucket

Permanently removes a bucket and optionally all its contents. Use force=true to delete non-empty buckets. **Required scopes:** `upl:bucket:manage`

postDelete bucket lifecycle

Removes every lifecycle rule from the bucket. **Required scopes:** `upl:bucket:manage`

postGet bucket

Retrieves details for a specific bucket including configuration, aliases, and portal settings. **Required scopes:** `upl:bucket:read`

postGet bucket lifecycle

Returns the lifecycle rules that automatically delete uploads in a bucket. **Required scopes:** `upl:bucket:read`

postGet bucket statistics

A time series over the bucket, one row per hour, day or month (UTC) between `start_time` and `end_time`, every period present: `size_bytes` is the bytes stored at the end of each period (a level), `uploaded_bytes` and `upload_count` are what that period's uploads brought (a flow). `request_count`, `download_count`, `bandwidth_bytes` (egress) and `ingress_bytes` come from upl's own per-request log, folded into hourly per-bucket figures every few minutes; `traffic_counted_through` says how far, and is absent when no traffic has been counted. Egress for a presigned download is the bytes requested, since the bucket hostname redirects to storage rather than streaming. Needs the bucket admin role. **Required scopes:** `upl:bucket:analytics`

postGet owner usage

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`

postGet search token

Generates a scoped search token for querying uploads within a bucket using Typesense. **Required scopes:** `upl:bucket:read`

postGet team entitlement

What a team is entitled to in upl: its storage pool (the most all its buckets may hold together) when it has one, with where it comes from, and the defaults a form for a new team bucket starts from. `can_update_cap` (the pool) and `can_update_defaults` say what the caller may change with UpdateTeamEntitlement. The per-bucket cap fields are deprecated and never set (UPL-160). **Access:** any upl role in the team (reader or above), read from the token, else PermissionDenied. Folder- and bucket-scoped integration tokens, client_credentials tokens and tokens carrying RAR authorization details are refused with PermissionDenied. **Required scopes:** `upl:bucket:read`

postGrant bucket permission

Grants a user access to a bucket with the specified permission level (read, read-write, or admin). **Required scopes:** `upl:bucket:manage`

postGrant resource permission

Grants a user access to a specific folder or upload within a bucket. **Required scopes:** `upl:bucket:manage`

postList bucket permissions

Lists all users who have been granted access to a bucket and their permission levels. **Required scopes:** `upl:bucket:manage`

postList bucket types

Lists all available bucket types including built-in types and integration-defined types. **Required scopes:** `upl:bucket:read`

postList buckets

Retrieves all buckets owned by or shared with the authenticated user, including shared resource access. **Required scopes:** `upl:bucket:read`

postList resource permissions

Lists all folder and upload level permissions granted within a bucket. **Required scopes:** `upl:bucket:manage`

postList team storage

Every team upl knows, by slug, with its storage used (from the usage rollup), its pool with where it comes from, and how many of its buckets have a cap of their own. Caps are read from what upl stores and caches for each team, not asked of Xeonr Auth per row. A team's buckets are listed with GetOwnerUsage. **Access:** the upl:admin scope, else PermissionDenied. **Required scopes:** `upl:admin`

postList personal storage

Every person with at least one personal bucket, by email, with their storage used across those buckets (from the usage rollup), their storage cap with where it comes from, and how many of their buckets have a cap of their own. A person's buckets are listed with GetOwnerUsage, owner_scope personal and their user_id. **Access:** the upl:admin scope, else PermissionDenied. **Required scopes:** `upl:admin`

postMove a bucket to a different owner

Transfers ownership of a bucket to a team or back to the caller. Requires admin on the bucket and the upl admin team role in each team involved. The bucket's slug, aliases and URLs are unchanged; individual permission grants are preserved, while access-key grants that would cross the new ownership boundary are revoked. **Required scopes:** `upl:bucket:manage`

postPreview bucket lifecycle

Counts the uploads and previous versions that the given (or stored) lifecycle rules would delete if they ran now. **Required scopes:** `upl:bucket:read`

postPut bucket lifecycle

Replaces the bucket's lifecycle rules. Matching uploads are deleted automatically. **Required scopes:** `upl:bucket:manage`

postReprocess bucket

Reprocesses uploads in a bucket to regenerate thumbnails, AI metadata, or other derived data. Admin only. **Required scopes:** `upl:admin`

postRestore subfolder access

Restores access to a previously revoked subfolder, removing the exception. **Required scopes:** `upl:bucket:manage`

postRevoke bucket permission

Removes a user's access to a bucket. **Required scopes:** `upl:bucket:manage`

postRevoke resource permission

Removes a user's access to a specific folder or upload. **Required scopes:** `upl:bucket:manage`

postRevoke subfolder access

Revokes access to a subfolder within a shared parent folder, creating an exception to inherited permissions. **Required scopes:** `upl:bucket:manage`

postSet bucket storage cap

Gives one bucket a storage cap of its own, or with `cap_mb` 0 removes it. A bucket's cap is optional and its owner's to set: without one, only the owner's cap (the user's or the team's total) applies, and with one both do. A bucket already over a cap it is given keeps reads and deletes; its new uploads are refused. **Access:** admin on the bucket (its owner, a team's upl admin, or someone granted admin), or the upl:admin scope for any bucket. Folder-scoped clients are refused. **Required scopes:** `upl:bucket:manage`

postTear down a product's managed buckets in a team

Deletes every bucket in `team` that the calling product created while acting for a person (those whose `managed_by` is the product's slug), and returns how many buckets went and how many access keys were revoked with them. It is the absent-user path: the product calls it as its own service account when the team has dropped the product and nobody is present to act for. Buckets a person or another product made in the same team are never seen or touched. Each bucket goes as it does with DeleteBucket: its custom hostnames and aliases are removed, a bucket delete event is published and the WebSocket permissions of everyone who had access are dropped. Every access-key grant on the bucket is removed; a key left with no grant is revoked outright, since a key with no grants would reach every bucket its owner has, while a key with grants on other buckets keeps those. Idempotent: a team with nothing left, or one upl has never seen, answers zeros. A failure part-way returns an error and leaves the buckets already deleted deleted; call again to finish. **Access:** only a service account acting as itself, whose application is registered with upl as a managed-bucket product. Users, OAuth clients and delegated (token-exchanged) tokens get PermissionDenied. **Required scopes:** `upl:managed:reconcile`

postUpdate bucket

Updates bucket settings including name, aliases, type, and portal configuration. **Required scopes:** `upl:bucket:manage`

postUpdate team entitlement

Changes what `update_mask` names. `new_bucket_defaults` sets what a form for a new team bucket starts from (absent goes back to the deployment's). `pool_mb` sets the team's storage pool, the most all its buckets may hold together, as an override of its plan (0 removes the override; with no plan pool the team is unlimited). A team already over a pool it is given keeps reads and deletes; its new uploads are refused. `bucket_cap_mb` is deprecated: a team has no per-bucket cap, and naming it is InvalidArgument. Returns the entitlement after the change. **Access:** `pool_mb` needs the upl:admin scope. `new_bucket_defaults` needs the team's upl admin role, checked with Xeonr Auth rather than the token, or upl:admin. A caller with no upl role in the team gets NotFound; one without what a named field needs gets PermissionDenied and nothing changes. Narrow tokens are refused as for GetTeamEntitlement. **Required scopes:** `upl:bucket:manage`

postUpdate personal storage limits

Changes what `update_mask` names of one person's storage limits. `pool_mb` sets the person's storage cap, the most all their personal buckets may hold together: 0 goes back to the deployment default and -1 is unlimited. `bucket_cap_mb` is deprecated (a person has no per-bucket cap) and naming it is InvalidArgument. A person already over a pool they are given keeps reads and deletes; their new uploads are refused. **Access:** the upl:admin scope, else PermissionDenied. **Required scopes:** `upl:admin`