Files
JesebelGPT/scripts/admin-demo.sh
2026-01-27 02:01:40 +01:00

22 lines
484 B
Bash
Executable File

#!/usr/bin/env bash
set -euo pipefail
if [[ -z "${ADMIN_TOKEN:-}" ]]; then
echo "ADMIN_TOKEN env var required" >&2
exit 1
fi
BASE="${BASE_URL:-http://localhost:8787}"
echo "== health"
curl -sS "$BASE/api/health" | head -c 300 || true
echo
echo "== latest logs"
curl -sS -H "x-admin-token: $ADMIN_TOKEN" "$BASE/api/logs?limit=5" | head -c 2000 || true
echo
echo "== stats summary"
curl -sS -H "x-admin-token: $ADMIN_TOKEN" "$BASE/api/stats/summary" | head -c 500 || true
echo