postVerejné API v1

/api/v1/backup/install

Used by the command shown in the administration: curl -sSL https://api.bizkithub.com/api/v1/backup/install -d token=… -d host="$(hostname)" | sudo bash. Checks the one-time token (valid 24 h) without using it up and returns a bash installer. The installer first checks the machine (tools, database login, Docker daemon, path), then exchanges the token for a backup-only API key via /backup/install/claim, stores the key (root only), writes the backup job for the chosen profile, schedules it (systemd timer, cron fallback) and runs the first backup. Always answers with a shell script; an invalid token yields a script that prints the reason and exits non-zero. No API key needed.

backupbackupInstall

Telo požiadavky

application/json
tokenstringPovinné

One-time install token from "Connect a new machine" in the administration.

Dĺžka: 16–64
hoststringVoliteľné

Hostname of the machine, recorded with the created API key.

Dĺžka: 0–255

Ukážka požiadavky

curl -X POST "https://api.bizkithub.com/api/v1/backup/install?apiKey=YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "token": "example_token",
  "host": "example_host"
}'