Server Routes

Add a new Server

POST /server/newServer

This will create a new server for the project to use

Headers

Name
Value

Content-Type

application/json

Authorization

<key>

Body

Name
Type
Description

serverName

string

Name of the server

serverIp

string

IP Address of the server

serverPort

number

Port number for the server

Response

{
    "created": boolean
}

Get Servers Data

GET /server

This will return the servers that the API has in its stored list

Response

Get server online players

GET /server/getOnlinePlayers

This will return a list of the online players from the servers in the servers data list

Response

Create a new data day

POST /server/newDay/[ Server Identifier ]

This will create a new days record for the database.

Headers

Name
Value

Content-Type

application/json

Authorization

<key>

Request

Name
Type
Description

Server Identifier

string

The identifier value for the server it is linked to

Response

Increment the new users column

POST /server/newDay/incrementNewUsers/[ Server Identifier ]

This will create a new days record for the database.

Headers

Name
Value

Content-Type

application/json

Authorization

<key>

Request

Name
Type
Description

Server Identifier

string

The identifier value for the server it is linked to

Response

Increment the new users column

POST /server/newDay/incrementReturningUsers/[ Server Identifier ]

This will create a new days record for the database.

Headers

Name
Value

Content-Type

application/json

Authorization

<key>

Request

Name
Type
Description

Server Identifier

string

The identifier value for the server it is linked to

Response

Get Server Data

GET /server/getData/[ Server Identifier ]

This will return the server data for the day given a servers identifier

Request

Name
Type
Description

Server Identifier

string

The identifier value for the server it is linked to

Response

Get Server Data For a number of days

GET /server/getData/[ Server Identifier ]/[ Number Days ]

This will return the server data for the day given a servers identifier and a number of days

Request

Name
Type
Description

Server Identifier

string

The identifier value for the server it is linked to

Number Days

number

The number of days to query for

Response

Last updated