dockbare

API reference

Dockbare 3.3.0. Send requests to your Dockbare instance, for example http://127.0.0.1:5000.

View the 3.3.0 API source

Connect to your instance

Sign in with POST /api/auth/login and reuse the dockbare_session cookie. Include totp in the login JSON if two-factor authentication is enabled.

For authenticated POST, PUT, and DELETE requests, send X-Requested-With: Dockbare. JSON bodies use Content-Type: application/json. Uploads and downloads are indicated below.

Use the id in a returned task or tasks entry with GET /api/tasks/{tid}. A queued operation finishes with success, failure, or cancelled.

Sign in and list backups
base=http://127.0.0.1:5000
jar=$(mktemp)
trap 'rm -f "$jar"' EXIT

curl -fsS -c "$jar" -H 'Content-Type: application/json' \
  --data '{"username":"admin","password":"YOUR_PASSWORD"}' \
  "$base/api/auth/login"

curl -fsS -b "$jar" "$base/api/backups"

curl -fsS -b "$jar" -X POST \
  -H 'X-Requested-With: Dockbare' "$base/api/auth/logout"

Health and authentication

GET /api/health
Return the app name, version, and build fingerprint. No session required.
POST /api/auth/login
Create a session. Send username, password, and totp if two-factor authentication is enabled.
POST /api/auth/logout
End the current session and clear its cookie.
GET /api/auth/session
Check whether the cookie is authenticated, and read the app version and authentication flags. No session required.

Volumes and overview

GET /api/overview
Read dashboard totals, backup storage projections, and recent activity.
GET /api/volumes
List Docker volumes with their containers, schedules, and backup status.
GET /api/volumes/estimate
Estimate backup sizes. Pass up to 25 comma-separated names in volumes. Set measure=0 to skip measuring.

Backups

GET /api/backups
List archives. Optionally filter by volume.
POST /api/backups
Queue a backup for each name in volumes, or pass a single volume. Optional keys include remotes, encrypt, and stop_containers. Returns tasks.
POST /api/backups/restore
Queue a local restore from path into volume. Restoring replaces the target volume’s contents.
POST /api/backups/verify
Queue an archive integrity check. Send path.
POST /api/backups/push
Queue an upload of path. Send remotes as a nonempty list of remote IDs.
DELETE /api/backups
Delete the archive identified by path. Set delete_remote to true to also delete remote copies.
GET /api/backups/download
Download the archive at path. Use decrypt=1 to decrypt it during download if the key is configured.
POST /api/backups/upload
Register an archive using multipart form fields volume and file.
GET /api/backups/events
Read recent events for the archive at path.
POST /api/prune
Apply retention to volume with keep_seconds or keep_max. Use dry_run=true to preview and delete_remote=true to include remote copies.

Schedules

GET /api/schedules
List backup schedules.
POST /api/schedules
Save a schedule for an existing volume. Include the volume name in the JSON body.
PUT /api/schedules/{volume}
Update the existing schedule for a volume.
DELETE /api/schedules/{volume}
Delete the volume’s schedule.
POST /api/schedules/{volume}/toggle
Enable or pause a schedule. Send an enabled boolean.
POST /api/schedules/{volume}/run
Trigger an immediate run of an existing schedule.

Remotes

GET /api/remotes
List configured FTP, FTPS, and SFTP destinations.
POST /api/remotes
Add a backup destination.
PUT /api/remotes/{rid}
Update the destination identified by its remote ID.
DELETE /api/remotes/{rid}
Remove the remote from Dockbare’s configuration.
POST /api/remotes/test
Test a saved remote by ID or submit candidate connection settings. Check the response’s ok field.
POST /api/remotes/{rid}/check
Check the health of a saved remote.
POST /api/remotes/sync
Queue a sync. Send a list of remote IDs in remotes to limit the scope.

Recovery and configuration snapshots

GET /api/recovery/last
Read the latest remote scan results. Returns null before a successful scan is available.
POST /api/recovery/scan
Queue a scan of a remote by ID. After the task succeeds, fetch the latest scan results.
POST /api/recovery/restore
Queue restore or download of remote archives. Send remote and items. Verification is enabled by default.
GET /api/config/export
Download a configuration snapshot. Export is encrypted when a key is available, unless plain=1 is set. Treat exports as sensitive.
POST /api/config/import
Import a snapshot from multipart file or raw request bytes. Multipart requests can repeat sections to import selected sections.
POST /api/config/push
Push a configuration snapshot to configured remotes.
GET /api/config/status
Read the snapshot summary and last push status.
POST /api/recovery/config/import
Import a snapshot from a remote. Send remote and optionally instance and sections. An omitted instance uses the current instance name.

Background tasks

GET /api/tasks
List tasks. Use active=1 to show only queued and running tasks.
GET /api/tasks/{tid}
Read one task by ID, including its status and log.
POST /api/tasks/{tid}/cancel
Request cancellation of a task by ID.

Activity and logs

GET /api/events
List events. Filters include level, kind, volume, q, since, and before. Use before with an event ID to page backward.
GET /api/logs/download
Download Dockbare’s application log, if available.
GET /api/logs/{name}
Read container logs. Use tail to limit lines and since for a Unix timestamp in seconds. Set download=1 for a text file.

Reports

GET /api/reports
Read report settings, next runs, and delivery history.
GET /api/reports/{rid}
Read a previously generated report by numeric ID.
GET /api/reports/preview
Build a preview for period, defaulting to daily.
POST /api/reports/send
Send a report. Optionally specify period and a list of channels.
PUT /api/reports/settings
Update report settings.

Settings and security

GET /api/settings
Read general, notification, and report settings, plus Docker, encryption, and environment status.
PUT /api/settings/general
Update general settings. The instance_name key can change the instance name.
PUT /api/settings/notifications
Save notification channel settings.
POST /api/settings/notifications/test
Test a notification channel. Send channel and optionally an override object. Check the response’s ok field.
GET /api/security
Read sessions, login attempts, lockout state, and two-factor authentication status.
DELETE /api/security/sessions
Revoke other sessions while preserving the current session.
DELETE /api/security/sessions/{sid}
Revoke one session by ID.
GET /api/security/totp-qr
Return the active TOTP setup QR code as SVG. Treat it as sensitive.
POST /api/security/totp/setup
Start TOTP setup. Returns the secret, provisioning URI, and QR code.
POST /api/security/totp/enable
Confirm pending TOTP setup with code. Returns recovery codes.
POST /api/security/totp/disable
Disable TOTP using password and code.
POST /api/security/totp/recovery
Regenerate TOTP recovery codes using code.

Peers

GET /api/peer/status
Read status for another Dockbare instance using its peer bearer token. No session cookie is used.
GET /api/peers
List peers and read this instance’s status and token information.
POST /api/peers
Add a monitored Dockbare instance.
PUT /api/peers/{pid}
Update a peer by ID.
DELETE /api/peers/{pid}
Remove a peer by ID.
POST /api/peers/test
Test a peer connection. Check the response’s ok field.
POST /api/peers/{pid}/check
Check a saved peer immediately.
POST /api/peers/token/regenerate
Rotate this instance’s peer token.

Metrics and alerts

GET /api/metrics
Read host and container metrics. Optionally pass range, such as 1h, 24h, or 7d.
GET /api/metrics/containers/{name}
Read metrics for one container. Accepts the same range filter.
PUT /api/metrics/settings
Update metrics collection settings.
GET /api/alerts
List alert rules and metric definitions.
POST /api/alerts
Create an alert rule.
PUT /api/alerts/{rid}
Update an alert rule by ID.
DELETE /api/alerts/{rid}
Delete an alert rule by ID.

Uptime and status

GET /api/uptime/public
Read the public status snapshot. No session required. Returns 404 when public status is disabled.
GET /api/uptime
Read container states, incidents, checks, services, and status settings.
POST /api/uptime/poll
Refresh container uptime state immediately.
PUT /api/uptime/settings
Update uptime and public status settings.
PUT /api/uptime/monitors/{name}
Save monitoring rules for a container by name.
DELETE /api/uptime/monitors/{name}
Delete the saved monitoring rules for a container.
POST /api/uptime/checks
Create an external uptime check.
PUT /api/uptime/checks/{cid}
Update an external check by ID.
DELETE /api/uptime/checks/{cid}
Delete an external check by ID.
POST /api/uptime/checks/{cid}/run
Run one external check immediately.
POST /api/uptime/services
Create a service for the status page.
PUT /api/uptime/services/{sid}
Update a status-page service by ID.
DELETE /api/uptime/services/{sid}
Delete a status-page service by ID.
POST /api/uptime/containers/{name}/restart
Request an immediate container restart through uptime monitoring.
GET /api/uptime/announcements
List status-page announcements.
POST /api/uptime/announcements
Create an announcement.
PUT /api/uptime/announcements/{aid}
Update an announcement by numeric ID.
DELETE /api/uptime/announcements/{aid}
Delete an announcement by numeric ID.
POST /api/uptime/announcements/{aid}/updates
Add an update to an announcement. Send message and optionally status.
DELETE /api/uptime/announcements/{aid}/updates/{uid}
Delete an announcement update by numeric ID.
PUT /api/uptime/announcements/{aid}/updates/{uid}
Edit an announcement update. Send message or status.

Docker utilities

GET /api/cleanup
List cleanup candidates without deleting anything. Use sizes=0 to skip size calculations.
POST /api/cleanup/run
Queue deletion of selected images, volumes, or stopped containers. build_cache includes unused build cache. Volumes are backed up first by default.
GET /api/utilities/engine
Read Docker engine details, log settings, and configuration warnings.
GET /api/utilities/updates
Read the last image-update check.
POST /api/utilities/updates
Queue a registry check for newer images.
GET /api/utilities/settings
Read utility and reporting settings.
PUT /api/utilities/settings
Update utility and reporting settings.
POST /api/utilities/report
Send the cleanup and image-update report immediately.
POST /api/containers/{name}/{action}
Start, stop, or restart a container. Use start, stop, or restart for action.
GET /api/browse/volume/{name}
List entries in a live volume. Pass path to browse a subdirectory.
GET /api/browse/volume/{name}/download
Download a file or directory from a live volume. Specify path.
GET /api/browse/backup
List entries in a backup archive. Pass backup and optionally path.
GET /api/browse/backup/download
Download a file or directory from a backup. Pass backup and path.
POST /api/volumes/copy
Queue a volume copy using source and target. The target must be a new volume.