Skip to content

API Reference

Jacob Bowen edited this page Mar 8, 2026 · 1 revision

API Reference

The AzerothPanel backend exposes a versioned REST API and a WebSocket endpoint.

  • Base URL: http://<host>:8000
  • API prefix: /api/v1
  • Interactive docs (Swagger UI): http://<host>:8000/docs
  • Alternative docs (ReDoc): http://<host>:8000/redoc

Authentication

All endpoints except /api/v1/auth/login and /api/v1/auth/login/json require a JWT Bearer token.

Obtain a token

POST /api/v1/auth/login
Content-Type: application/x-www-form-urlencoded

username=admin&password=your_password

Or with JSON:

POST /api/v1/auth/login/json
Content-Type: application/json

{"username": "admin", "password": "your_password"}

Response:

{
  "access_token": "eyJ...",
  "token_type": "bearer"
}

Using the token

Include the token in the Authorization header on all subsequent requests:

Authorization: Bearer eyJ...

Endpoints Quick Reference

Group Prefix
Authentication /api/v1/auth
Server Control /api/v1/server
Player Management /api/v1/players
Logs /api/v1/logs
Database Manager /api/v1/database
Installation /api/v1/installation
Compilation /api/v1/compilation
Data Extraction /api/v1/data-extraction
Module Manager /api/v1/modules
Config Editor /api/v1/configs
Backup & Restore /api/v1/backup
Settings /api/v1/settings

Authentication — /api/v1/auth

Method Path Description
POST /login Login via form body, returns JWT
POST /login/json Login via JSON body, returns JWT
GET /me Returns current user info

Server Control — /api/v1/server

Method Path Description
GET /status Worldserver & authserver status, online player count
POST /worldserver/start Start the worldserver
POST /worldserver/stop Stop the worldserver
POST /worldserver/restart Restart the worldserver
POST /authserver/start Start the authserver
POST /authserver/stop Stop the authserver
POST /authserver/restart Restart the authserver
POST /command Execute a GM command via SOAP
GET /info Host system info (CPU, memory, uptime)
POST /announce Send a global in-game announcement

POST /api/v1/server/command

{ "command": "server info" }

Response:

{ "result": "AzerothCore rev. ...\nConnected players: 3\n..." }

Player Management — /api/v1/players

Method Path Description
GET /online List online players via SOAP
GET /accounts List accounts (search, pagination)
GET /characters List characters (search, pagination)
GET /characters/{guid} Get a character by GUID
POST /ban Ban an account
POST /unban/{account_id} Unban an account
POST /kick/{player_name} Kick an online player
POST /announce Send a message to all online players
POST /modify Modify a character's stats

GET /api/v1/players/accounts — Query parameters

Param Type Description
search string Filter by username
page int Page number (default 1)
per_page int Results per page (default 20)

POST /api/v1/players/ban

{
  "account_name": "badplayer",
  "duration": "30d",
  "reason": "Cheating"
}

Logs — /api/v1/logs

Method Path Description
GET /sources List available log sources
GET /{source} Get last N lines (query param: lines)
GET /{source}/size Get file size of a log source
GET /{source}/download Download log file as attachment

Database Manager — /api/v1/database

Method Path Description
GET /tables/{database} List tables in a database
POST /query Execute a read-only SQL query
GET /table/{database}/{table_name} Browse a table with pagination
POST /backup Trigger a database backup

POST /api/v1/database/query

{
  "database": "world",
  "query": "SELECT entry, name FROM creature_template LIMIT 10"
}

Writes (INSERT, UPDATE, DELETE, DROP, TRUNCATE) are rejected server-side.


Installation — /api/v1/installation

Method Path Description
GET /status Latest installation step status
POST /run Start the AzerothCore installer (SSE stream)
GET /config/worldserver Read worldserver.conf as key-value pairs
PUT /config/worldserver Write worldserver.conf key-value pairs
GET /config/authserver Read authserver.conf as key-value pairs
PUT /config/authserver Write authserver.conf key-value pairs

Compilation — /api/v1/compilation

Method Path Description
GET /status Current/last build status
POST /build Trigger a CMake build (SSE stream)

POST /api/v1/compilation/build

{
  "cmake_options": "-DCMAKE_BUILD_TYPE=RelWithDebInfo",
  "cores": 4
}

Data Extraction — /api/v1/data-extraction

Method Path Description
GET /status Extraction status and data presence
POST /download Download pre-extracted data (SSE stream)
POST /extract Extract from local WoW client (SSE stream)
POST /cancel Cancel running extraction

GET /api/v1/data-extraction/status response

{
  "in_progress": false,
  "current_step": null,
  "progress_percent": 0,
  "has_dbc": true,
  "has_maps": true,
  "has_vmaps": true,
  "has_mmaps": true,
  "data_present": true
}

Module Manager — /api/v1/modules

Method Path Description
GET /catalogue List available modules from the AzerothCore catalogue
GET /installed List locally installed modules
POST /install Install (clone) a module
DELETE /{module_name} Remove an installed module

Config Editor — /api/v1/configs

Method Path Description
GET /files List all editable config files
GET /files/{filename} Get config file contents
PUT /files/{filename} Save updated config file contents

Backup & Restore — /api/v1/backup

Full endpoint reference: see Backup-Restore.

Method Path Description
GET /destinations List destinations
POST /destinations Create a destination
GET/PUT/DELETE /destinations/{id} Get / update / delete a destination
POST /destinations/{id}/test Test connectivity
GET /destinations/{id}/files List archive files
GET /jobs List backup jobs
GET/DELETE /jobs/{id} Get / delete a job
POST /run Start backup (SSE stream)
POST /restore Restore from backup (SSE stream)

Settings — /api/v1/settings

Method Path Description
GET `` Get all current panel settings
PUT `` Update panel settings
POST /test-db Test a MySQL connection

WebSocket — Live Log Streaming

ws://<host>/ws/logs/{source}

Opens a persistent connection streaming new log lines in real time. Each WebSocket message is a plain-text log line.

Authentication: pass the JWT token as a query parameter (?token=<jwt>) or in the connection URL.

const ws = new WebSocket("ws://localhost/ws/logs/worldserver?token=" + jwtToken);
ws.onmessage = (event) => console.log(event.data);

Health Check

GET /health

Returns {"status": "ok"} — HTTP 200, no authentication required.


SSE (Server-Sent Events)

Several long-running operations stream progress as SSE:

  • POST /api/v1/compilation/build
  • POST /api/v1/installation/run
  • POST /api/v1/data-extraction/download
  • POST /api/v1/data-extraction/extract
  • POST /api/v1/backup/run
  • POST /api/v1/backup/restore

Each sends data: lines terminated by \n\n. A final data: DONE or data: ERROR: <message> signals completion.

Clone this wiki locally