Skip to main content
Examples use the blob client from Creating the client.
Object ids are opaque (pub/..., prv/...). Store them as returned, never build or parse them, and replace your stored id whenever update() returns a new one. See Object ids.

Listing

list() is an async generator that follows the cursor through every page. Order is not guaranteed.
listPage() fetches one page. Use it for manual pagination or to get folders:
A page has objects, folders (only with delimiter) and continuationToken (absent on the last page). Each listed object has id, size, created_at, expires_at, private, url and etag. See Object List.

Object details

Returns id, size, content_type, etag, created_at, expires_at, private, url, cache_control, content_disposition, original_name and metadata. See Object Info.
created_at is the storage’s last-modified time: an update that copies the object (visibility, expiration, headers) resets it.
  • A public object gets its permanent CDN URL, with expires_at: null.
  • A private object, or any call with disposition or filename, gets a temporary link that lives expires seconds (up to 24 hours). Creating one needs an active plan; without one, it fails with 401 PERMISSION_DENIED.
A temporary link cannot be revoked on its own. It stops working early when the API key that created it is revoked, regenerated or expires, when the session that created it logs out, and when the object is overwritten, moved, deleted, or made public or private. For links you can revoke one by one, protect with a password or cap by downloads, use a share.
The result has url, expires_at, private, size and content_type. See Object Download.

Updating objects

update() changes the visibility, expiration, cache, disposition or metadata of one object or up to 50. It always returns an array, one result per object, and each result reports its own success in ok.
A successful result (ok: true) has object (the id you sent), changed, id (the id after the change), private, url, expires_at and size. A failed result (ok: false) has object and code. A batch does not throw for per-object failures. See Object Update. Without an active plan, only making objects private works: any other change reports PERMISSION_DENIED on its item. Making a private object public also needs the blob:read scope.

Deleting

Deletion is immediate and permanent: there is no trash.
With a single id in an array, the SDK still returns { deleted, not_found, failed }: a missing object goes to not_found, and DELETE_FAILED or PREFIX_NOT_ALLOWED go to failed instead of throwing. Any other error (authentication, rate limit, network) still throws. See Delete Objects.

Copying, moving and renaming

Both run on the server, without downloading the file.
move(source, destination, options) is copy() with move: true. The result has id, private, url, expires_at, size, source, moved and replaced. See Object Copy. Copying needs blob:read on the source as well as blob:write, and fails with 403 MISSING_SCOPE otherwise. A key restricted to prefixes needs both the source and the destination inside them, or it gets 403 PREFIX_NOT_ALLOWED.
update(), delete(), copy() and move() are writes: they get a single attempt and are never retried. See Retry policy.

Next steps

Sharing

Links that expire, count downloads or ask for a password.

Objects API reference

The REST endpoints behind these methods.