ReferenceAPI
Backups
On-demand and scheduled backups.
GET
header
AuthorizationBearer <token>Org or project-scoped API key, format capy_live_...; Clerk session tokens also accepted.
projectID*stringProject id.
Scheduled backups.
application/json- response
scheduled_backups*array<>curl -X GET 'https://capydb.dev/api/capydb/v1/projects/string/scheduled-backups'{ "scheduled_backups": [ { "created_at": "2019-08-24T14:15:22Z", "cron_hour": 0, "cron_minute": 0, "id": "string", "is_active": true, "label": "string", "last_job_id": "string", "last_run_at": "2019-08-24T14:15:22Z", "organization_id": "string", "project_id": "string", "retention_days": 0, "updated_at": "2019-08-24T14:15:22Z" } ]}PUT
header
AuthorizationBearer <token>Org or project-scoped API key, format capy_live_...; Clerk session tokens also accepted.
projectID*stringProject id.
application/json- body
cron_hour*integerUTC hour to run the backup at (0-23).
cron_minute*integerUTC minute to run the backup at (0-59).
is_active*booleanlabel?stringretention_days?integerSchedule upserted.
application/json- response
scheduled_backup*curl -X PUT 'https://capydb.dev/api/capydb/v1/projects/string/scheduled-backups/default' \ -H 'Content-Type: application/json' \ -d '{ "cron_hour": 0, "cron_minute": 0, "is_active": true}'{ "scheduled_backup": { "created_at": "2019-08-24T14:15:22Z", "cron_hour": 0, "cron_minute": 0, "id": "string", "is_active": true, "label": "string", "last_job_id": "string", "last_run_at": "2019-08-24T14:15:22Z", "organization_id": "string", "project_id": "string", "retention_days": 0, "updated_at": "2019-08-24T14:15:22Z" }}GET
header
AuthorizationBearer <token>Org or project-scoped API key, format capy_live_...; Clerk session tokens also accepted.
projectID*stringProject id.
Backups.
application/json- response
backups*array<>curl -X GET 'https://capydb.dev/api/capydb/v1/projects/string/backups'{ "backups": [ { "backup_key": "string", "created_at": "2019-08-24T14:15:22Z", "database_name": "string", "id": "string", "label": "string", "project_id": "string", "size_bytes": 0, "state": "string", "verification_error": "string", "verification_state": "pending", "verified_at": "2019-08-24T14:15:22Z" } ]}POST
header
AuthorizationBearer <token>Org or project-scoped API key, format capy_live_...; Clerk session tokens also accepted.
projectID*stringProject id.
application/json- body
label?stringOptional label recorded on the backup.
Backup job enqueued.
application/json- response
job*curl -X POST 'https://capydb.dev/api/capydb/v1/projects/string/backups' \ -H 'Content-Type: application/json' \ -d '{}'{ "job": { "attempts": 0, "claimed_at": "2019-08-24T14:15:22Z", "claimed_by": "string", "host_id": "string", "instance_id": "string", "completed_at": "2019-08-24T14:15:22Z", "created_at": "2019-08-24T14:15:22Z", "error": "string", "id": "string", "last_exit_code": 0, "last_stderr": "string", "last_stdout": "string", "locked_resource": "string", "max_attempts": 0, "organization_id": "string", "preview_database_id": "string", "project_id": "string", "result": null, "retry_classification": "string", "started_at": "2019-08-24T14:15:22Z", "state": "pending", "type": "project.apply_plan", "updated_at": "2019-08-24T14:15:22Z" }}