Dxcufgb's Workshop

Admin API

WIPWork in progress: may be very buggy and can change a lot between versions.

The admin page's JSON API lives under /_admin/api/... and can be used from scripts.

Rules

  • Every call but POST /_admin/api/login needs the session cookie (401 without a login).
  • Every change also needs the X-CSRF-Token header (from the login or state answer) and Content-Type: application/json.
  • A request with an unknown Host/Origin is refused (403, DNS rebinding).
  • Five failed logins lock the address out for five minutes, and more than 50 failed logins within 15 minutes from anywhere pause wrong passwords (the right password still gets in).

Routes

Relative to /_admin/api/:

  • GET state
  • POST worlds/rescan
  • PUT worlds/<id>
  • POST worlds/<id>/backup: 202; 409 while queued, turned off or unreadable
  • DELETE worlds/<id>
  • PUT settings: schedule, github, whenActive, foundry
  • POST foundry-test: url optional: without it the address in use
  • PUT token
  • POST setup-test
  • PUT notify
  • POST notify/test
  • PUT password
  • GET/POST update
  • POST logout

This page mirrors the World Backup to Git wiki on GitHub.