WEB API
API allows you to get information from servers, as well as send signals from outside.
Make sure that the web server is enabled in the Skcrew settings of your proxy server.
web-server-enabled: true
web-server-port: 1338
web-server-user: admin
web-server-password: admin
Here you can also configure the web server port and authorization data to access the API.
Authorization is performed by passing the username and password to base64 in the request header:
Authorization: Basic base64_encode("login:password")
Available routes for requests.
GET /players
Allows you to get a list of all players with the name of the server they are on.
Possible parameters:
server
:string
- allows you to get players from certain servers
GET /players/{UUID/NICKNAME}
Allows you to get a player, if he is online, by his nickname or UUID. As well as the entire server on which it is located.
GET
POST /players/{UUID/NICKNAME}/kick
Allows you to kick a player from a proxy server, by his nickname or UUID.
When using a POST request, you can specify the reason for the kick. The reason can be specified either in plain text or by the AdventureAPI component (
Velocity ) or ChatComponentAPI (
Bungeecord ) in JSON format.
GET /players/{UUID/NICKNAME}/connect/{SERVER}
Allows you to move a player to another server, by his nickname or UUID.
GET /servers
Get a list of all servers and players on them.
Possible parameters:
online
:boolean
- allows you to get only those servers that are enabled
POST /servers/{SERVER}/signal
Allows you to send a signal to the connected server.
The signal itself is transmitted in the request body.
POST /signal
Allows you to send a signal to the connected servers.
The signal itself and the list of servers are transmitted in the request body.
You can see an example of implementing API access in Python at this link