Dashboard API Cookbook

The nfltr.xyz/dashboard admin views (agents, settings) sit behind an authenticated session, the same as any other admin console. This cookbook scripts that session with curl so CI jobs and internal tooling can read the same data the dashboard renders — no browser required.


Mint a session from an admin API key

Generate an admin-role key from Account → API keys on the dashboard, then trade it for a session cookie:

COOKIE_JAR=/tmp/nfltr-session-cookies.txt

curl -sS -c "$COOKIE_JAR" -H "Content-Type: application/json" \
  -d '{"api_key":"'"$NFLTR_ADMIN_API_KEY"'"}' \
  https://nfltr.xyz/session

Confirm the session is authenticated before scripting further:

curl -sS -b "$COOKIE_JAR" https://nfltr.xyz/session

List connected agents

curl -sS -b "$COOKIE_JAR" https://nfltr.xyz/api/v1/dashboard/agents

Mirrors Home's agents and its Details view: agent id, flavor, capacity, readiness, and last heartbeat.

Read account and global settings

curl -sS -b "$COOKIE_JAR" https://nfltr.xyz/api/v1/dashboard/settings
curl -sS -b "$COOKIE_JAR" https://nfltr.xyz/api/v1/dashboard/global-settings

Enrol machines

New machines join without hand-copying an API key: the Fleet view's Add machine card mints a single-use enrol code or a group enrolment token (POST /api/v1/dashboard/machines/codes, POST /api/v1/dashboard/machines/tokens, signed-in dashboard session), and the machine runs nfltr machine enrol --code <code> or nfltr machine enrol --token <file> --name <machine name>. See Dashboard Walkthrough.

Related docs