Skip to main content
Remote Control

REST API

JSON over HTTP on 127.0.0.1:27021. Enable it with bApiEnabled=True. Every request except health needs a token.

curl -H "Authorization: Bearer <token>" http://127.0.0.1:27021/api/v1/players
MethodPathPermissionDescription
GET/api/v1/healthnoneReturns {"status":"ok"}.
GET/api/v1/statusserveradmincore.playersOnline player count and the token's name and group.
GET/api/v1/playersserveradmincore.playersPlayers that are online.
GET/api/v1/bansserveradmincore.banAll bans.
GET/api/v1/logs?count=100serveradmincore.logsRecent admin log entries. count is limited to a maximum.
POST/api/v1/commanddepends on the commandRuns a command.

Run a command​

Body: a JSON object of at most 16 KB.

{ "command": "kick Bob Spamming" }

Response:

{
"result": "Success",
"success": true,
"output": ["Kicked Bob."]
}

The command runs as the token's group, so it needs the permission of that command.

Status codes​

CodeMeaning
200OK
400Missing or invalid body
401Missing or invalid token
403The token's group lacks the required permission
429Too many failed requests from this address
503ServerAdminCore is not ready