Skip to main content

Create a Volume

const created = await client.volumes.create({ name: "my-workspace" });
console.log(created.id, created.name);

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);

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);

Get Response

{
  "id": "550e8400-e29b-41d4-a716-446655440000",
  "name": "my-workspace"
}

Next Step