Create volume
/volumes
Creates a new volume. Supports two modes:
- JSON body: Creates an empty volume of the specified size
- Multipart form: Creates a volume pre-populated with content from a tar.gz archive
Body Parameters
name: string
Volume name
size_gb: number
Size in gigabytes
id: optional string
Optional custom identifier (auto-generated if not provided)
Returns
Create volume
curl http://localhost:8080/volumes \
-H 'Content-Type: application/json' \
-H "Authorization: Bearer $HYPEMAN_API_KEY" \
-d '{
"name": "my-data-volume",
"size_gb": 10,
"id": "vol-data-1"
}'
{
"id": "vol-data-1",
"created_at": "2025-01-15T09:00:00Z",
"name": "my-data-volume",
"size_gb": 10,
"attachments": [
{
"instance_id": "inst-abc123",
"mount_path": "/mnt/data",
"readonly": false
}
]
}
Returns Examples
{
"id": "vol-data-1",
"created_at": "2025-01-15T09:00:00Z",
"name": "my-data-volume",
"size_gb": 10,
"attachments": [
{
"instance_id": "inst-abc123",
"mount_path": "/mnt/data",
"readonly": false
}
]
}