Skip to main content

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

MethodEndpointDescription
POST/{envId}/volumeCreate a new volume
GET/{envId}/volume/{id}Get volume details
GET/{envId}/volumeList all volumes in environment
PUT/{envId}/volume/{id}Update volume configuration
DELETE/{envId}/volume/{id}Delete a volume
POST/{envId}/volume/validateValidate 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

FieldTypeDescription
idstring (UUID)Unique volume identifier
namestringVolume name
envIdRefstring (UUID)Parent environment ID
companyIdRefstring (UUID)Owner company ID
sizeintegerVolume size in MB
mountPathstringPath where volume will be mounted
isDeletedbooleanSoft delete flag
createdBystringUser ID who created the volume
modifiedBystringUser ID who last modified the volume
versionintegerVersion 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

  1. Size Planning: Allocate appropriate size based on expected data growth
  2. Mount Paths: Use standard Unix paths (e.g., /data, /app/storage)
  3. Naming: Use descriptive names that indicate purpose (e.g., postgres-data, uploads)
  4. Cleanup: Delete unused volumes to free up resources
  5. 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