{% extends "base.jinja2" %} {% block title %}API - DarkflameServer{% endblock %} {% block css %} {% endblock %} {% block content %}
Every endpoint your account may use. Open one and press Try it out to call it as yourself, right here.
The same description is at /api/openapi.json (OpenAPI 3) for other tools.
Make an API key on your account page and send it with every request:
curl -H "Authorization: Bearer $KEY" http://localhost:2006/api/status
A key can do what you picked for it (some of your permissions, or all of them), and never more than your account can do right
now: each request needs the permission for the page it matches, both on your account's current GM level and in the key.
Changing the account's level or banning it takes effect straight away. Keys can be read-only, limited to some addresses or paths, and
have a rate limit (answered with 429 and Retry-After; X-RateLimit-Remaining says what is left)
and a daily quota. Using the API at all needs the api_access permission.
Live updates: open a WebSocket to /ws (with the same Authorization header, or your sign-in cookie) and send
{"event": "subscribe", "subscription": "chat_message"} (or table_changed, dashboard_update, ...).
Tables take DataTables-style bodies: {"start": 0, "length": 25, "search": "text"}. Calls that act on
online players answer {requestId}; GET /api/actions/{id} gives the result.