Create a Volume
const created = await client.volumes.create({ name: "my-workspace" });
console.log(created.id, created.name);
created = client.volumes.create({"name": "my-workspace"})
print(created.id, created.name)
from hyperbrowser.models import CreateVolumeParams
created = client.volumes.create(CreateVolumeParams(name="my-workspace"))
print(created.id, created.name)
hx volume create my-workspace
curl -X POST https://api.hyperbrowser.ai/api/volume \
-H "x-api-key: YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"name": "my-workspace"
}'
Create Response
{
"id": "550e8400-e29b-41d4-a716-446655440000",
"name": "my-workspace",
"size": 0,
"transferAmount": 0
}
List Volumes
const listed = await client.volumes.list();
console.log(listed.volumes.length);
listed = client.volumes.list()
print(len(listed.volumes))
hx volume list
# alias: hx volume ls
curl -X GET https://api.hyperbrowser.ai/api/volume \
-H "x-api-key: YOUR_API_KEY"
List Response
{
"volumes": [
{
"id": "550e8400-e29b-41d4-a716-446655440000",
"name": "my-workspace",
"size": 0,
"transferAmount": 0
}
]
}
Get a Volume
const volume = await client.volumes.get("550e8400-e29b-41d4-a716-446655440000");
console.log(volume.id, volume.name);
volume = client.volumes.get("550e8400-e29b-41d4-a716-446655440000")
print(volume.id, volume.name)
hx volume get <volume-id>
curl -X GET https://api.hyperbrowser.ai/api/volume/VOLUME_ID \
-H "x-api-key: YOUR_API_KEY"
Get Response
{
"id": "550e8400-e29b-41d4-a716-446655440000",
"name": "my-workspace"
}
Next Step
- Continue to Mounting Volumes to attach volumes to a sandbox.