Volumes
Base path: /api/cloud/volumes (all protected)
POST /api/cloud/volumes/create
- Auth: Bearer (Keycloak)
- Body (JSON):
name(string, required)size(number, GiB, required)description(string, optional)
- Responses:
201 Createdwith volume object;400/401/500 - Example:
curl -X POST https://your-host/api/cloud/volumes/create \
-H "Authorization: Bearer $TOKEN" -H 'Content-Type: application/json' \
-d '{"name":"data-vol","size":50,"description":"extra storage"}'GET /api/cloud/volumes/list
- Auth: Bearer (Keycloak)
- Description: Lists volumes for the project.
- Example:
curl -H "Authorization: Bearer $TOKEN" \
https://your-host/api/cloud/volumes/listDELETE /api/cloud/volumes/delete/:id
- Auth: Bearer (Keycloak)
- Params:
id(string, volume ID)
- Responses:
200 OK{ message: "Volume deleted successfully" };400/401/500 - Example:
curl -X DELETE https://your-host/api/cloud/volumes/delete/VOLUME_ID \
-H "Authorization: Bearer $TOKEN"POST /api/cloud/volumes/attach
- Auth: Bearer (Keycloak)
- Body (JSON):
volume_id(string, required)instance_id(string, required)
- Responses:
200 OKwith attach result;400/401/500 - Example:
curl -X POST https://your-host/api/cloud/volumes/attach \
-H "Authorization: Bearer $TOKEN" -H 'Content-Type: application/json' \
-d '{"volume_id":"VOLUME_ID","instance_id":"INSTANCE_ID"}'POST /api/cloud/volumes/detach
- Auth: Bearer (Keycloak)
- Body (JSON):
attachment_id(string, required)volume_id(string, required)
- Responses:
200 OKwith detach result;400/401/500 - Example:
curl -X POST https://your-host/api/cloud/volumes/detach \
-H "Authorization: Bearer $TOKEN" -H 'Content-Type: application/json' \
-d '{"attachment_id":"ATTACHMENT_ID","volume_id":"VOLUME_ID"}'