Volumes API
Volumes provide persistent storage that can be attached to applications. They persist data beyond the application lifecycle and can be shared across multiple applications.
Available Endpoints
| Method | Endpoint | Description |
|---|---|---|
| POST | /{envId}/volume | Create a new volume |
| GET | /{envId}/volume/{id} | Get volume details |
| GET | /{envId}/volume | List all volumes in environment |
| PUT | /{envId}/volume/{id} | Update volume configuration |
| DELETE | /{envId}/volume/{id} | Delete a volume |
| POST | /{envId}/volume/validate | Validate volume configuration |
Volume Object
{
"id": "vol-550e8400-e29b-41d4-a716-446655440000",
"name": "app-data-volume",
"envIdRef": "660e8400-e29b-41d4-a716-446655440001",
"companyIdRef": "770e8400-e29b-41d4-a716-446655440002",
"size": 10240,
"mountPath": "/app/data",
"isDeleted": false,
"createdBy": "user-123",
"modifiedBy": "user-123",
"version": 1
}
Fields
| Field | Type | Description |
|---|---|---|
id | string (UUID) | Unique volume identifier |
name | string | Volume name |
envIdRef | string (UUID) | Parent environment ID |
companyIdRef | string (UUID) | Owner company ID |
size | integer | Volume size in MB |
mountPath | string | Path where volume will be mounted |
isDeleted | boolean | Soft delete flag |
createdBy | string | User ID who created the volume |
modifiedBy | string | User ID who last modified the volume |
version | integer | Version number for tracking changes |
Authentication
All volume endpoints require authentication via:
- Session Cookie: For web application access
- API Token: Bearer token with 2FA enabled
Common Use Cases
- Database Storage: Persistent storage for database data
- File Uploads: Storage for user-uploaded files
- Configuration: Persistent configuration files
- Logs: Application log storage
- Shared Data: Data shared across multiple application instances
Best Practices
- Size Planning: Allocate appropriate size based on expected data growth
- Mount Paths: Use standard Unix paths (e.g.,
/data,/app/storage) - Naming: Use descriptive names that indicate purpose (e.g.,
postgres-data,uploads) - Cleanup: Delete unused volumes to free up resources
- Backups: Implement backup strategies for critical data
Notes
- Volumes are scoped to environments
- Multiple applications can share the same volume
- Volume data persists after application deletion
- Deleting a volume permanently removes its data
- Volume size cannot be decreased after creation