Core Server Internal API Specification
The internal API should not be used outside the server.
JWT token(cookie) and admin account(user.username) information will be delivered when server networking.
| API Version |
Root URL |
Description |
| v1 |
/api/v1/init |
Init Configuration APIs |
| v1 |
/api/v1/auth |
JWT Auth APIs |
| v1 |
/api/v1/room |
Control Room APIs |
| v1 |
/api/v1/system |
Server Information APIs |
| v1 |
/api/v1/playerlist |
Player List APIs |
| v1 |
/api/v1/superadmin |
Super Admin APIs |
| v1 |
/api/v1/banlist |
Ban List APIs |
| v1 |
/api/v1/ruidlist |
RUID List APIs |
đą Init Configuration APIs
These APIs are used for initial configuration when the Core Server first runs.
đą Check if initialised
Request
| Method |
Request URL |
Description |
| GET |
/ |
Check if initialised |
Response
| Status |
Body |
Description |
| 204 |
|
initialised already |
| 404 |
|
not initialised yet (need for) |
Result
404 status code will be returned if initial configuration is need.
đą Initial configuration
Request
| Method |
Request URL |
Description |
| POST |
/ |
Init the server |
Request Body
| Type |
Description |
Required |
| username: string |
Plain account name |
Yes |
| password: string |
Plain account password with 3-20 alphanum characters (not encrypted yet) |
Yes |
Response
| Status |
Body |
Description |
| 201 |
|
Configuration succeeded |
| 400 |
|
Configuration schema is unfulfilled |
| 405 |
|
Already done |
Result
After configuration succeeded, new admin account will be created.
đ JWT Auth APIs
These APIs are used to authenticate internal APIs. These manage and validate JWT token.
đ Login
Request
| Method |
Request URL |
Description |
| POST |
/ |
Login to admin account |
Request Body
| Type |
Description |
Required |
| username: string |
Plain account name |
Yes |
| password: string |
Plain account password with 3-20 alphanum characters (not encrypted yet) |
Yes |
Response
| Status |
Body |
Description |
| 201 |
|
Login succeeded |
| 401 |
|
Login failed |
| 501 |
|
Server errors |
Result
After login succeeded, JWT token will be insterted into cookie. (maxAge: 7d)
đ Logout
Request
| Method |
Request URL |
Description |
| DELETE |
/ |
Logout from admin account |
Response
| Status |
Body |
Description |
| 204 |
|
Logout succeeded |
Result
After logout succeeded, the cookie will be reset.
đ Check if authorized
Request
| Method |
Request URL |
Description |
| GET |
/ |
Check if loginned |
Response
| Status |
Body |
Description |
| 200 |
user.username |
accepted |
| 401 |
|
rejected |
Result
After verified, username field in the user object from JWT token will be returned.
đĻ Control Room APIs
These APIs are used to manage and control the game rooms. Login is required.
đĻ Create new game room
Request
| Method |
Request URL |
Description |
| POST |
/ |
Create new game room |
Request Body
| Type |
Description |
Required |
| ruid |
ruid of new game room |
Yes |
| _config |
configuration of game room |
Yes |
| settings |
game room settings |
Yes |
| rules |
game operating rules |
Yes |
| helo |
rating and tier system configuration |
Yes |
| commands |
game commands configuration |
Yes |
More information for each types are available in here.
Response
| Status |
Body |
Description |
| 201 |
|
The game room is created successfully |
| 400 |
|
Configuration schema is unfulfilled |
| 401 |
|
rejected |
| 409 |
|
Same game room ruid exists |
Result
New room will be created if same ruid doesn't exist.
đĻ Close the game room
Request
| Method |
Request URL |
Description |
| DELETE |
/:ruid |
Close the game room |
Request Parameter
| Name |
Description |
| ruid |
Target room's ruid |
Response
| Status |
Body |
Description |
| 204 |
|
Closed the game room |
| 401 |
|
rejected |
| 404 |
|
No game room exists |
đĻ Get a list of exist game rooms
Request
| Method |
Request URL |
Description |
| GET |
/ |
Get all list of exist game rooms |
Response
| Status |
Body |
Description |
| 200 |
ruid: string[] |
List of exist game rooms |
| 401 |
|
rejected |
| 404 |
|
No game rooms exist |
đĻ Get information of the game room
Request
| Method |
Request URL |
Description |
| GET |
/:ruid |
Get information of the game room ruid |
Response
| Status |
Body |
Description |
| 200 |
{ roomName: string, onlinePlayers: number } |
Information of the game room |
| 401 |
|
rejected |
| 404 |
|
No game room exists |
đĻ Get detail information of the game room
Request
| Method |
Request URL |
Description |
| GET |
/:ruid/info |
Get detail information of the game room ruid |
Response
| Status |
Body |
Description |
| 200 |
DetailRoomInfo object |
Detail information of the game room |
| 401 |
|
rejected |
| 404 |
|
No game room exists |
See more information about DetailRoomInfo object in here.
đĻ Get all list of online players
Request
| Method |
Request URL |
Description |
| GET |
/:ruid/player |
Get all list of online players in the game room :ruid |
Request Parameter
| Name |
Description |
| ruid |
Target room's ruid |
Response
| Status |
Body |
Description |
| 200 |
id: number[] |
List of online players |
| 401 |
|
rejected |
| 404 |
|
No game rooms exist |
đĻ Get player's info
Request
| Method |
Request URL |
Description |
| GET |
/:ruid/player/:id |
Get info of the player in the game room :ruid |
Request Parameter
| Name |
Description |
| ruid |
Target room's ruid |
| id |
Target player's id |
Response
| Status |
Body |
Description |
| 200 |
Player object |
Player information |
| 401 |
|
rejected |
| 404 |
|
No exists |
See more information about Player object in here.
đĻ Check Player Muted
Request
| Method |
Request URL |
Description |
| GET |
/:ruid/player/:id/permission/mute |
Get mute status of the player in the game room :ruid |
Request Parameter
| Name |
Description |
| ruid |
Target room's ruid |
| id |
Target player's id |
Response
| Status |
Body |
Description |
| 200 |
mute: Boolean, muteExpire: Number |
Mute status |
| 401 |
|
rejected |
| 404 |
|
No exists |
đĻ Mute the Player
Request
| Method |
Request URL |
Description |
| POST |
/:ruid/player/:id/permission/mute |
Mute the player in the game room :ruid |
Request Parameter
| Name |
Description |
| ruid |
Target room's ruid |
| id |
Target player's id |
Request Body
| Type |
Description |
Required |
muteExpire: Number |
Expiration time as Unix Timestamp |
Yes |
Response
| Status |
Body |
Description |
| 204 |
|
Success |
| 400 |
|
Request body is unfulfilled |
| 401 |
|
rejected |
| 404 |
|
No exists |
đĻ Unmute the Player
Request
| Method |
Request URL |
Description |
| DELETE |
/:ruid/player/:id/permission/mute |
Unmute the player in the game room :ruid |
Request Parameter
| Name |
Description |
| ruid |
Target room's ruid |
| id |
Target player's id |
Response
| Status |
Body |
Description |
| 204 |
|
Success |
| 401 |
|
rejected |
| 404 |
|
No exists |
đĻ Fixed-term Ban the Player
Request
| Method |
Request URL |
Description |
| DELETE |
/:ruid/player/:id |
Fixed-term Ban the player in the game room :ruid |
Request Parameter
| Name |
Description |
| ruid |
Target room's ruid |
| id |
Target player's id |
Request Body
| Type |
Description |
Required |
ban: Boolean |
Ban or Kick (Kick is recommended) |
Yes |
seconds: Number |
Duration |
Yes |
message: String |
Ban Reason |
Yes |
Response
| Status |
Body |
Description |
| 204 |
|
Success |
| 401 |
|
rejected |
| 404 |
|
No exists |
đĻ Check Chat Freezed
Request
| Method |
Request URL |
Description |
| GET |
/:ruid/info/freeze |
Get freeze status of the game room :ruid |
Request Parameter
| Name |
Description |
| ruid |
Target room's ruid |
Response
| Status |
Body |
Description |
| 200 |
freezed: Boolean |
Freeze status |
| 401 |
|
rejected |
| 404 |
|
No exists game room |
đĻ Freeze Chat
Request
| Method |
Request URL |
Description |
| POST |
/:ruid/info/freeze |
Freeze whole chat in the game room :ruid |
Request Parameter
| Name |
Description |
| ruid |
Target room's ruid |
Response
| Status |
Body |
Description |
| 204 |
|
Success |
| 401 |
|
rejected |
| 404 |
|
No exists game room |
đĻ Unfreeze Chat
Request
| Method |
Request URL |
Description |
| DELETE |
/:ruid/info/freeze |
Unfreeze whole chat in the game room :ruid |
Request Parameter
| Name |
Description |
| ruid |
Target room's ruid |
Response
| Status |
Body |
Description |
| 204 |
|
Success |
| 401 |
|
rejected |
| 404 |
|
No exists game room |
đĻ Broadcast (Send Message)
Request
| Method |
Request URL |
Description |
| POST |
/:ruid/chat |
Send chat message to the game room |
Request Parameter
| Name |
Description |
| ruid |
Target room's ruid |
Request Body
| Type |
Description |
Required |
| message |
Text message |
Yes |
Response
| Status |
Body |
Description |
| 201 |
|
Broadcast completed |
| 400 |
|
Request body is unfulfilled |
| 401 |
|
Rejected |
| 404 |
|
No exists game room |
đĻ Whisper (Send Message)
Request
| Method |
Request URL |
Description |
| POST |
/:ruid/chat/:id |
Send chat message to the specific player |
Request Parameter
| Name |
Description |
| ruid |
Target room's ruid |
| id |
Target player's id |
Request Body
| Type |
Description |
Required |
| message |
Text message |
Yes |
Response
| Status |
Body |
Description |
| 201 |
|
Message is sent |
| 400 |
|
Request body is unfulfilled |
| 401 |
|
Rejected |
| 404 |
|
No exists game room or player |
đĻ Get Discord Webhook Configuration
Request
| Method |
Request URL |
Description |
| GET |
/:ruid/social/discord/webhook |
Get Discord webhook configuration from the game room :ruid |
Request Parameter
| Name |
Description |
| ruid |
Target room's ruid |
Response
| Status |
Body |
Description |
| 200 |
config |
configuration data |
| 401 |
|
rejected |
| 404 |
|
No exists |
See more information about config part in here.
đĻ Set Discord Webhook Configuration
Request
| Method |
Request URL |
Description |
| POST |
/:ruid/social/discord/webhook |
Get Discord webhook configuration from the game room :ruid |
Request Parameter
| Name |
Description |
| ruid |
Target room's ruid |
Request Body
| Type |
Description |
Required |
config |
configuration data |
Yes |
Response
| Status |
Body |
Description |
| 201 |
|
Set completed |
| 400 |
|
Request body is unfulfilled |
| 401 |
|
Rejected |
| 404 |
|
No exists game room |
See more information about config part in here.
đĻ Get Notice
Request
| Method |
Request URL |
Description |
| GET |
/:ruid/social/notice |
Get notice message from the game room :ruid |
Request Parameter
| Name |
Description |
| ruid |
Target room's ruid |
Response
| Status |
Body |
Description |
| 200 |
message: string |
Text message |
| 401 |
|
rejected |
| 404 |
|
No exists |
đĻ Set Notice
Request
| Method |
Request URL |
Description |
| POST |
/:ruid/social/notice |
Set notice message to the game room |
Request Parameter
| Name |
Description |
| ruid |
Target room's ruid |
Request Body
| Type |
Description |
Required |
| message |
Text message |
Yes |
Response
| Status |
Body |
Description |
| 201 |
|
Set completed |
| 400 |
|
Request body is unfulfilled |
| 401 |
|
Rejected |
| 404 |
|
No exists game room |
đĻ Delete Notice
Request
| Method |
Request URL |
Description |
| DELETE |
/:ruid/social/notice |
Delete notice message from the game room |
Request Parameter
| Name |
Description |
| ruid |
Target room's ruid |
Response
| Status |
Body |
Description |
| 204 |
|
Delete completed |
| 401 |
|
Rejected |
| 404 |
|
No exists game room |
đĻ Set Password
Request
| Method |
Request URL |
Description |
| POST |
/:ruid/info/password |
Set password for the game room |
Request Parameter
| Name |
Description |
| ruid |
Target room's ruid |
Request Body
| Type |
Description |
Required |
| password |
Plain Password |
Yes |
Response
| Status |
Body |
Description |
| 201 |
|
Set completed |
| 400 |
|
Request body is unfulfilled |
| 401 |
|
Rejected |
| 404 |
|
No exists game room |
đĻ Delete Password
Request
| Method |
Request URL |
Description |
| DELETE |
/:ruid/info/password |
Clear password from the game room |
Request Parameter
| Name |
Description |
| ruid |
Target room's ruid |
Response
| Status |
Body |
Description |
| 204 |
|
Clear completed |
| 401 |
|
Rejected |
| 404 |
|
No exists game room |
đĻ Get Nickname Filtering Pool
Request
| Method |
Request URL |
Description |
| GET |
/:ruid/filter/nickname |
Get nickname filtering pool for the game room |
Request Parameter
| Name |
Description |
| ruid |
Target room's ruid |
Response
| Status |
Body |
Description |
| 200 |
pool: string |
Banned words seperated by |,| |
| 401 |
|
rejected |
| 404 |
|
No exists game room |
đĻ Get Chat Filtering Pool
Request
| Method |
Request URL |
Description |
| GET |
/:ruid/filter/chat |
Get chat filtering pool for the game room |
Request Parameter
| Name |
Description |
| ruid |
Target room's ruid |
Response
| Status |
Body |
Description |
| 200 |
pool: string |
Banned words seperated by |,| |
| 401 |
|
rejected |
| 404 |
|
No exists game room |
đĻ Set Nickname Filter
Request
| Method |
Request URL |
Description |
| POST |
/:ruid/filter/nickname |
Set Nickname filter for the game room |
Request Parameter
| Name |
Description |
| ruid |
Target room's ruid |
Request Body
| Type |
Description |
Required |
| pool |
Plain Text includes banned words sperated by |,| |
Yes |
Response
| Status |
Body |
Description |
| 201 |
|
Set completed |
| 400 |
|
Request body is unfulfilled |
| 401 |
|
Rejected |
| 404 |
|
No exists game room |
đĻ Set Chat Filter
Request
| Method |
Request URL |
Description |
| POST |
/:ruid/filter/chat |
Set Chat filter for the game room |
Request Parameter
| Name |
Description |
| ruid |
Target room's ruid |
Request Body
| Type |
Description |
Required |
| pool |
Plain Text includes banned words sperated by |,| |
Yes |
Response
| Status |
Body |
Description |
| 201 |
|
Set completed |
| 400 |
|
Request body is unfulfilled |
| 401 |
|
Rejected |
| 404 |
|
No exists game room |
đĻ Delete Nickname Filter
Request
| Method |
Request URL |
Description |
| DELETE |
/:ruid/filter/nickname |
Delete Nickname filter from the game room |
Request Parameter
| Name |
Description |
| ruid |
Target room's ruid |
Response
| Status |
Body |
Description |
| 204 |
|
Delete completed |
| 401 |
|
Rejected |
| 404 |
|
No exists game room |
đĻ Delete Chat Filter
Request
| Method |
Request URL |
Description |
| DELETE |
/:ruid/filter/chat |
Delete Chat filter from the game room |
Request Parameter
| Name |
Description |
| ruid |
Target room's ruid |
Response
| Status |
Body |
Description |
| 204 |
|
Delete completed |
| 401 |
|
Rejected |
| 404 |
|
No exists game room |
đĻ Get Team Colours
Request
| Method |
Request URL |
Description |
| GET |
/:ruid/asset/team/colour |
Get team colours from the game room |
Request Parameter
| Name |
Description |
| ruid |
Target room's ruid |
Response
| Status |
Body |
Description |
| 200 |
red: TeamColours, blue: TeamColours |
Team colours data |
| 401 |
|
rejected |
| 404 |
|
No exists game room |
See more information about TeamColours object in here.
đĻ Set Team Colours
Request
| Method |
Request URL |
Description |
| POST |
/:ruid/asset/team/colour |
Set team colours for the game room |
Request Parameter
| Name |
Description |
| ruid |
Target room's ruid |
Request Body
| Type |
Description |
Required |
| team: number |
1 for Red or 2 for Blue |
Yes |
| angle: number |
angle for the team color stripes (in degrees) |
Yes |
| textColour: number |
color of the player avatars |
Yes |
| teamColour1: number |
first color for the team |
Yes |
| teamColour2: number |
second color for the team |
Yes |
| teamColour3: number |
third color for the team |
Yes |
Response
| Status |
Body |
Description |
| 201 |
|
Set completed |
| 400 |
|
Request body is unfulfilled |
| 401 |
|
Rejected |
| 404 |
|
No exists game room or wrong team ID |
đĨī¸ Server Information APIs
These APIs are used for investigate server and system information. Login is required.
đĨī¸ Get server information
Request
| Method |
Request URL |
Description |
| GET |
/ |
Get server and system information. |
Response
| Status |
Body |
Description |
| 200 |
ServerInfo Object |
Server Information |
| 401 |
|
rejected |
See more information about ServerInfo object in here.
âšī¸ Player List APIs
These APIs are for CRUD Player Account List. Login is required.
âšī¸ Get all player accounts
Request
| Method |
Request URL |
Description |
| GET |
/:ruid |
Get all player accounts in the game room :ruid |
Request Parameter
| Name |
Description |
| ruid |
Target room's ruid |
Request Query
| Name |
Description |
| start |
starting index for pagination |
| count |
items count for pagination |
Response
| Status |
Body |
Description |
| 200 |
PlayerStorage[] object |
Player accounts with information |
| 401 |
|
rejected |
| 404 |
|
No game rooms exist |
See more information about PlayerStorage object in here.
âšī¸ Get player's info
Request
| Method |
Request URL |
Description |
| GET |
/:ruid/:auth |
Find the player in the game room :ruid with :auth and get the account information |
Request Parameter
| Name |
Description |
| ruid |
Target room's ruid |
| auth |
Target player account's auth |
Response
| Status |
Body |
Description |
| 200 |
PlayerStorage object |
Player information |
| 401 |
|
rejected |
| 404 |
|
No exists |
See more information about PlayerStorage object in here.
đ Super Admin APIs
These APIs are for CRUD Superadmin key. Login is required.
đ Get all superadmin data
Request
| Method |
Request URL |
Description |
| GET |
/:ruid |
Get all superadmin data from game room :ruid |
Request Query
| Name |
Description |
| start |
starting index for pagination |
| count |
items count for pagination |
Response
| Status |
Body |
Description |
| 200 |
{ key: String, description: String }[] |
|
| 404 |
|
no data |
đ Register superadmin key
Request
| Method |
Request URL |
Description |
| POST |
/:ruid |
Register superadmin key to game room `:ruid |
Request Body
| Type |
Description |
Required |
key: string |
|
Yes |
description: string |
|
Yes |
Response
| Status |
Body |
Description |
| 204 |
|
created |
| 400 |
|
failed |
đ Delete superadmin key
Request
| Method |
Request URL |
Description |
| DELETE |
/:ruid/:key |
Delete superadmin key :key from game room `:ruid |
Response
| Status |
Body |
Description |
| 204 |
|
deleted |
| 400 |
|
failed |
đĢ Ban List APIs
These APIs are for CRUD Ban List. Login is required.
đĢ Get all BanList
Request
| Method |
Request URL |
Description |
| GET |
/:ruid |
Get all ban list from game room :ruid |
Request Parameter
| Name |
Description |
| ruid |
Target room's ruid |
Request Query
| Name |
Description |
| start |
starting index for pagination |
| count |
items count for pagination |
Response
| Status |
Body |
Description |
| 200 |
{ conn: String, reason: String, register: Number, expire: Number }[] |
|
| 404 |
|
no data |
đĢ Get ban information
Request
| Method |
Request URL |
Description |
| GET |
/:ruid/:conn |
Get ban information in the game room :ruid |
Request Parameter
| Name |
Description |
| ruid |
Target room's ruid |
| conn |
Target player's conn |
Response
| Status |
Body |
Description |
| 200 |
{ conn: String, reason: String, register: Number, expire: Number } |
Player information |
| 401 |
|
rejected |
| 404 |
|
No exists |
đĢ Add Ban List
Request
| Method |
Request URL |
Description |
| POST |
/:ruid |
Ban from game room `:ruid |
Request Parameter
| Name |
Description |
| ruid |
Target room's ruid |
Request Body
| Type |
Description |
Required |
conn: string |
|
Yes |
reason: string |
|
Yes |
seconds: number |
|
Yes |
Response
| Status |
Body |
Description |
| 204 |
|
registered |
| 400 |
|
failed |
đĢ Delete from Ban List
Request
| Method |
Request URL |
Description |
| DELETE |
/:ruid/:conn |
Unban :conn from game room `:ruid |
Request Parameter
| Name |
Description |
| ruid |
Target room's ruid |
| conn |
Target player's conn |
Response
| Status |
Body |
Description |
| 204 |
|
deleted |
| 400 |
|
failed |
đ RUID List APIs
These APIs are for get RUIDs list saved on DB server. Login is required.
đ Get all RUIDs list
This API will return all RUIDs list, not only online rooms' RUIDs.
So it also returns all RUIDs that were previously used.
In order for a RUID to be saved, at least one player must have accessed that game room.
Request
| Method |
Request URL |
Description |
| GET |
/ |
Get all RUID list saved on DB server |
Response
| Status |
Body |
Description |
| 200 |
{ ruid: String }[] |
Exist RUIDs on DB server |
| 404 |
|
no data |