Backup API
5 endpoints. Request and response schemas are described on the schemas page; the other tags are listed in the API index.
Endpoints
GET /api/v1/admin/backup
List backups
List all backups (admin only)
Responses
| Status | Description | Body |
|---|---|---|
200 | List of backups | application/json: object |
403 | Admin access required | - |
Fields of the 200 response (application/json):
| Field | Type | Required | Description |
|---|---|---|---|
backups | array of Backup | no | - |
POST /api/v1/admin/backup
Create backup
Trigger a new backup (admin only)
Request body (required)
application/json: object
| Field | Type | Required | Description |
|---|---|---|---|
type | string | yes | One of: full, metadata-only. |
Responses
| Status | Description | Body |
|---|---|---|
202 | Backup started | application/json: object |
400 | Invalid request | application/json: Error |
403 | Admin access required | - |
Fields of the 202 response (application/json):
| Field | Type | Required | Description |
|---|---|---|---|
created_at | string (date-time) | no | - |
id | string (uuid) | no | - |
status | string | no | One of: pending, in_progress, completed, failed. |
type | string | no | One of: full, metadata-only. |
GET /api/v1/admin/backup/{id}
Get backup
Get details of a specific backup (admin only)
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
id | path | string (uuid) | yes | - |
Responses
| Status | Description | Body |
|---|---|---|
200 | Backup details | application/json: Backup |
400 | Invalid request, including a NUL byte in the URL or the body | application/json: Error |
403 | Forbidden | application/json: Error |
404 | Backup not found | - |
GET /api/v1/admin/backup/{id}/download
Download backup
Download a backup file (admin only)
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
id | path | string (uuid) | yes | - |
Responses
| Status | Description | Body |
|---|---|---|
200 | Backup file | application/octet-stream: string (binary) |
400 | Invalid request | application/json: Error |
403 | Forbidden | application/json: Error |
404 | Backup not found | - |
POST /api/v1/admin/restore
Restore backup
Restore from a backup file (admin only) - multipart form upload
Request body (required)
multipart/form-data: object
| Field | Type | Required | Description |
|---|---|---|---|
file | string (binary) | yes | Backup file to restore |
Responses
| Status | Description | Body |
|---|---|---|
200 | Restore started | - |
400 | Invalid backup file | - |
409 | A restore is already in progress | - |