Repository navigation
API: add GET endpoints for volume backup schedules and executions #12489
dementiev27
started this conversation in
Improvement Requests
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Volume backups (#10946) can be created, replaced, run and deleted through the API, but not read. Database backups can. This makes it impossible to check from the API whether a volume is backed up, or whether its last run reached S3.
Current state (v4.6.0, same on
main)routes/api.phpandopenapi.jsondefine these routes for applications, databases and services:PUT /{type}/{uuid}/storages/{storage_uuid}/backupsPOST /{type}/{uuid}/storages/{storage_uuid}/backups/runDELETE /{type}/{uuid}/storages/{storage_uuid}/backupsThere is no
GET. AGETon the same path returns:404 {"message":"Not found.","docs":"[https://coolify.io/docs](https://coolify.io/docs)"}This is the same response as for a missing resource, so a client reads it as "this volume has no backup schedule". I hit this on a volume that does have a schedule (visible in the UI under the application's Backups page).
For comparison, database dump backups have:
GET /databases/{uuid}/backupsGET /databases/{uuid}/backups/{scheduled_backup_uuid}/executionsProposal
Mirror the database backup read endpoints for volumes:
GET /{type}/{uuid}/storages/{storage_uuid}/backupsReturns the existing
VolumeBackupScheduleResponse(the same bodyPUTalready returns).404only when the storage has no schedule.GET /{type}/{uuid}/storages/{storage_uuid}/backups/executionsReturns recent runs from
scheduled_volume_backup_executions:uuid,status,message,size,filename,s3_uploaded,created_at,finished_at.All reactions