API REFERENCE

Alphie Core API

Updated for the October 20, 2026 Alphie Core source archive. Paths below were traced to registered FastAPI route decorators. Examples use a configurable base URL and Bearer token. Replace path variables and create a request.json body when required.

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.

Creating a personal API token

Once logged in with an authorized token, you can generate a new personal API token. The returned token is sensitive; protect it and avoid putting it in shell history.

curl --fail-with-body -sS -X POST "$ALPHIE_URL/api/admin/tokens" \
  -H "Authorization: Bearer $ALPHIE_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"description":"Ansible integration"}'

Authentication

Alphie uses Bearer tokens for authenticated API calls. Request the proper API credential through Alphie's account/token administration; OAuth login may also be available as documented below.

curl --fail-with-body -sS "$ALPHIE_URL/api/admin/me" \
  -H "Authorization: Bearer $ALPHIE_TOKEN"

For the authoritative live parameter and response schemas on a running server, see $ALPHIE_URL/openapi.json or $ALPHIE_URL/docs (if enabled).

API categories

Authentication endpoints

POST/api/admin/regenerate-secret

Regenerate client secret

curl --fail-with-body -sS -X POST "$ALPHIE_URL/api/admin/regenerate-secret" \
  -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/admin/tokens

List tokens

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

Example request body shown; use only with an authorized token.

POST/api/admin/tokens

Generate token

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

Example request body shown; use only with an authorized token.

DELETE/api/admin/tokens/{token_id}

Delete token

curl --fail-with-body -sS -X DELETE "$ALPHIE_URL/api/admin/tokens/${TOKEN_ID}" \
  -H "Authorization: Bearer $ALPHIE_TOKEN"

POST/api/login

Login

curl --fail-with-body -sS -X POST "$ALPHIE_URL/api/login" \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.

POST/api/oauth/refresh

Refresh token

curl --fail-with-body -sS -X POST "$ALPHIE_URL/api/oauth/refresh" \
  -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.

POST/api/oauth/token

Token endpoint

curl --fail-with-body -sS -X POST "$ALPHIE_URL/api/oauth/token" \n  -H "Content-Type: application/x-www-form-urlencoded" \n  --data-urlencode "grant_type=password" \n  --data-urlencode "username=$ALPHIE_USER" \n  --data-urlencode "password=$ALPHIE_PASSWORD"