Update Volume
Update a volume's configuration, including size and mount path.
Endpoint
PUT /{envId}/volume/{id}
Authentication
Required: Yes (Session or Bearer Token with 2FA)
Path Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
envId | string (UUID) | Yes | Environment ID containing the volume |
id | string (UUID) | Yes | Volume ID to update |
Request Body
{
"name": "postgres-data-updated",
"resourceRequests": {
"storage": "20GB"
},
"attachedAppsRefs": []
}
Request Fields
| Field | Type | Required | Description |
|---|---|---|---|
name | string | Yes | Volume name (must be unique in environment) |
resourceRequests.storage | string | Yes | Storage size (can only increase, not decrease) |
attachedAppsRefs | array | No | Array of application IDs to attach volume to |
Response
Success Response (200 OK)
{
"id": "vol-550e8400-e29b-41d4-a716-446655440000",
"name": "postgres-data-updated",
"envIdRef": "660e8400-e29b-41d4-a716-446655440001",
"companyIdRef": "770e8400-e29b-41d4-a716-446655440002",
"size": 20480,
"mountPath": "/var/lib/postgresql/data",
"isDeleted": false,
"createdBy": "user-123",
"modifiedBy": "user-456",
"version": 2
}
Error Responses
| Status Code | Description |
|---|---|
| 400 | Bad Request - Invalid configuration or attempting to decrease size |
| 401 | Unauthorized - Invalid or missing authentication |
| 403 | Forbidden - User doesn't have access to this volume |
| 404 | Not Found - Volume or environment doesn't exist |
| 500 | Internal Server Error |
Examples
cURL
curl -X PUT "https://api.thevenin.cloud/environments/{envId}/volume/{volumeId}" \
-H "Authorization: Bearer tvn_your_api_token_here" \
-H "Content-Type: application/json" \
-d '{
"name": "postgres-data-updated",
"resourceRequests": {
"storage": "20GB"
},
"attachedAppsRefs": []
}'
Notes
- Storage size can only be increased, not decreased
- Use
attachedAppsRefsto attach/detach the volume from applications
Use Cases
- Capacity Expansion: Increase storage when running low on space
- Rename: Update volume name for better organization
- Path Correction: Fix incorrect mount paths
Best Practices
- Monitor Usage: Check current usage before expanding
- Plan Ahead: Allocate sufficient space to avoid frequent resizing
- Coordinate Changes: Communicate mount path changes to team
- Test First: Test path changes in development before production