Skip to main content
There are four things you can do to a volume, and this page does all of them end to end — then covers the two behaviors that surprise people.

What you can do to a volume

All four are also in the console, under Volumes — that is the one to reach for when you want to see what you own rather than script against it.
There is no update operation. A volume’s name is fixed at creation, and there is no rename, resize, or patch call in the SDK or on the REST API. To change a name, create a new volume and copy the data through a box that mounts both.
Every operation except create addresses the volume by id, not by name. Name is for mounting — see Reference. The quickest way through all four, if you are at a terminal rather than writing code:
boxlite volume talks to a REST server, so run boxlite auth login first. Full flag tables are on the CLI reference.

Prerequisites

  • An API key from the console, exported as BOXLITE_API_KEY. See API keys.
  • pip install boxlite for Python or npm install @boxlite-ai/boxlite for Node, and the REST URL exported as BOXLITE_REST_URL. See Quickstart.
  • A REST runtime. Managed volumes need one — a local runtime has no volume backend.

Do all four in one script

This creates a volume, finds it in the listing, reads it back by id, then deletes it and waits for reclamation.
To create a volume and actually use it, see Mount a volume.

Deletion is asynchronous

remove() returns nothing and DELETE /v1/volumes/{id} returns 204 — both are acknowledgements, not completed deletions. Immediately afterwards:
  • A REST read of that volume returns 200 with a state of pending_delete — not a 404.
  • A listing can still include the volume for a short window.
  • Reclamation finishes on the platform’s own cycle.
So never write code that waits for a 404. Poll with a bounded timeout and treat “gone from the listing” as done, as the script above does. Deleting a volume that a running box still has mounted does not corrupt that box. The box stays usable.

Find out why a volume is not ready

Two fields reach the REST API but stop at the SDK, and they are the two you want when a volume is not behaving. Read them over REST. state is one of creating, ready, pending_create, pending_delete, deleting, deleted, or error. Creating a volume already waits for it to become ready before returning, so a volume you just created is mountable. Poll state when you are adopting a volume you did not create, or diagnosing one that is misbehaving.

Troubleshooting

Next steps

Mount a volume

Create one and actually use it: mount, write, read back.

Reference

Every parameter and return shape, name-versus-id addressing, and read-only mounts.