Listing online players, sending broadcasts, kicking or banning players, saving and restarting — all of these can be done from your own programs using the game panel API. This page covers everything from creating an API key to reading the output of your commands.
What you can do
With the game panel API (client API) you can automate the following from your own programs and scripts:
- Get the list of players currently online
- Send a server-wide broadcast
- Kick or ban a player
- Trigger a manual save
- Start, stop or restart the server
- Read status and resource usage (CPU, memory, disk, network)
The API works with any game. For game-specific commands, please see the documentation for that game.
Creating an API key
- Log in to the game panel and open API Credentials from the account menu at the top right.
- Enter a description that makes the purpose clear, and create the key.
- Copy the key that is displayed.
You can create up to 25 keys per account. Create a separate key for each purpose, and delete keys you no longer need.
The basics
The base URL is:
https://gsv.bestnetllc.co.jp/api/clientSend the following headers with your requests:
Authorization: Bearer <your API key>
Accept: application/json
Content-Type: application/json ← for POST requestsThe server identifier is the last 8 characters of the URL you see when you open the server in the panel: https://gsv.bestnetllc.co.jp/server/xxxxxxxx.
Main endpoints
| List your servers | GET /api/client | |
| Send a command | POST /api/client/servers/{id}/command | Body {"command":"..."} / returns 204 on success |
| Start, stop, restart | POST /api/client/servers/{id}/power | Body {"signal":"start"} (stop / restart / kill) |
| Status and resources | GET /api/client/servers/{id}/resources | State, CPU, memory, disk, network, uptime |
| Console connection details | GET /api/client/servers/{id}/websocket | Needed to read output (see 05) |
Example of sending a command:
curl -X POST "https://gsv.bestnetllc.co.jp/api/client/servers/xxxxxxxx/command" \
-H "Authorization: Bearer ptlc_xxxxxxxxxxxxxxxxxxxxxxxxxxxx" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-d '{"command":"Info"}'Reading the output of a command
POST /command returns only 204 No Content; the output is not included in the response body. A command that does not exist also returns 204. 204 means the command reached the console — it is not proof that the command succeeded.To read the output, connect to the console over WebSocket:
- Call
GET /api/client/servers/{id}/websocket. It returns the connection URL (socket) and atoken. - Open a WebSocket connection to that
socket. - First send
{"event":"auth","args":["<token>"]}. You are authenticated once{"event":"auth success"}comes back. - Console output then arrives as
{"event":"console output","args":["..."]}. - You can also send
{"event":"send command","args":["..."]}over the same connection.
token is valid for 10 minutes. For long-running connections, request a new token from the websocket endpoint and send {"event":"auth","args":["<new token>"]} again.The connection goes to the hostname of the node your server runs on (port 8443), not to the panel domain. This is normal.
Limits and notes
- The rate limit is 256 requests per minute. It applies per account, so changing your source IP address does not raise it.
- Sending a command while the server is stopped returns an error (
Server must be online in order to send commands.). - An empty
commandreturns a validation error (422). - Commands you send are recorded in the panel activity log.
- Subusers need the console control permission to use the API this way.
Security
- Treat your API key like a password. Never include it in GitHub, Discord or screenshots.
- Set Allowed IPs.
- Use a separate key per purpose and delete keys you no longer need. If a key is ever exposed, deleting it disables it immediately.
- You cannot reach servers you do not have access to.