API REFERENCE

Backup, Health & Time

6 endpoints discovered from this archive’s backend.

Set these variables first
export ALPHIE_URL="https://YOUR-ALPHIE-HOST"
export ALPHIE_TOKEN="PASTE_YOUR_API_TOKEN_HERE"
# Requires a certificate trusted by your machine. For test-only self-signed certificates,
# use curl --cacert /path/to/alphie.crt (preferred) rather than disabling TLS verification.

Most authenticated endpoints accept Authorization: Bearer $ALPHIE_TOKEN. Endpoints can still require administrator permissions or particular roles. API tokens must be provisioned through an authorized Alphie account; don't put secrets in playbooks, logs, or browser-side forms.

POST/api/db/backup

Create a new DB backup using pg_dump.

curl --fail-with-body -sS -X POST "$ALPHIE_URL/api/db/backup" \
  -H "Authorization: Bearer $ALPHIE_TOKEN" \n  -H "Content-Type: application/json" \n  --data-binary @request.json

Body example: supply a request.json file matching this endpoint’s request model. Consult $ALPHIE_URL/openapi.json for required fields.

GET/api/db/backups

List available DB backup files (newest → oldest).

curl --fail-with-body -sS -X GET "$ALPHIE_URL/api/db/backups" \
  -H "Authorization: Bearer $ALPHIE_TOKEN"

GET/api/server/time

Return server *local* time (epoch ms) and a best-effort IANA tz key so clients

curl --fail-with-body -sS -X GET "$ALPHIE_URL/api/server/time" \
  -H "Authorization: Bearer $ALPHIE_TOKEN"

GET/server-health

Run default server health checks

curl --fail-with-body -sS -X GET "$ALPHIE_URL/server-health" \
  -H "Authorization: Bearer $ALPHIE_TOKEN"

POST/server-health

Run custom server health checks (override config)

curl --fail-with-body -sS -X POST "$ALPHIE_URL/server-health" \
  -H "Authorization: Bearer $ALPHIE_TOKEN" \n  -H "Content-Type: application/json" \n  --data-binary @request.json

Body example: supply a request.json file matching this endpoint’s request model. Consult $ALPHIE_URL/openapi.json for required fields.

GET/server-health/services

Check specific systemd services

curl --fail-with-body -sS -X GET "$ALPHIE_URL/server-health/services" \
  -H "Authorization: Bearer $ALPHIE_TOKEN"