-
-
Notifications
You must be signed in to change notification settings - Fork 44
API
Sai Teja Madha edited this page Jan 19, 2021
·
9 revisions
GET api/client/find
Parameter | Method | Description | Type | Validation | Default |
---|---|---|---|---|---|
name | Query | Name of client to search for | String | Name or xuid required | -- |
xuid | Query | Xuid of client to search for | String | Name or xuid required | -- |
count | Query | Number of items to retrieve | Integer | Min — 1, Max — 100 | 100 |
offset | Query | Number of items to skip | Integer | Min — 0 | 0 |
direction | Query | Sort direction of results (by last connection) | String | ascending|descending | descending |
Name | Description | Type |
---|---|---|
totalFoundClients | Number of clients matching query | Integer |
clients | Collection of client info | Array |
Client Info
Name | Description | Type |
---|---|---|
clientId | IW4MAdmin client identifier | Integer |
xuid | Network identifier | String |
name | Client name | String |
Sample
{
"totalFoundClients":1,
"clients":[
{
"clientId":1,
"xuid":"FFFFFFFFFFFFFFFF",
"name":"/dev/../^7"
}
]
}
POST api/client/<clientId>/login
Parameter | Method | Description | Type | Validation | Default |
---|---|---|---|---|---|
clientId | URI/Route | Client identifier | Integer | Required | -- |
password | POST Body | Client password | String | Required | -- |
Adds cookie with key .AspNetCore.Cookies
to be used to authenticate subsequent requests
POST api/client/<clientId>/logout
Parameter | Method | Description | Type | Validation | Default |
---|---|---|---|---|---|
clientId | URI/Route | Client identifier | Integer | Required | -- |
Invalidates and removes cookie with key .AspNetCore.Cookies
GET api/server
Name | Description | Type |
---|---|---|
Id | Unique Identifier for the server | Long |
Hostname | Name of the server | String |
IP | IP Address of the server | String |
Port | Port of the server | Short |
[
{
"id": 12700128960,
"hostname": "IW4Host",
"ip": "127.0.0.1",
"port": 28960
}
]
GET api/server/<serverId>
Parameter | Method | Description | Type | Validation | Default |
---|---|---|---|---|---|
serverId | Route/URI | Server identifier | Long | Required, >0 | -- |
Name | Description | Type |
---|---|---|
Id | Unique Identifier for the server | Long |
Hostname | Name of the server | String |
IP | IP Address of the server | String |
Port | Port of the server | Short |
[
{
"id": 12700128960,
"hostname": "IW4Host",
"ip": "127.0.0.1",
"port": 28960
}
]
POST api/server/<serverId>/execute
Parameter | Method | Description | Type | Validation | Default |
---|---|---|---|---|---|
serverId | Route/URI | Server identifier | Long | Required, >0 | -- |
Command | Body | Command to execute for the given server | String | Required | -- |
Name | Description | Type |
---|---|---|
ExecutionTimeMs | Time in milliseconds to execute command | Integer |
Output | Messages generated by the execution of the command | Array(String) |
{
"executionTimeMs": 73,
"output": [
"IW4MAdmin has been online for 3 minutes, 4 seconds, 215 milliseconds"
]
}
GET api/stats/{clientId}
Parameter | Method | Description | Type | Validation | Default |
---|---|---|---|---|---|
clientid | Query | client identifier | Integer | Required, >0 | -- |
Name | Description | Type |
---|---|---|
name | Last used client name | Integer |
ranking | Client ranking on the server | Integer |
kills | Number of kills | Integer |
deaths | Number of kills | Integer |
performance | Performance level (elo rating + skill) / 2.0 | Double |
scorePerMinute | Score per minute | Double |
lastPlayed | When the client's rating was last calculated | DateTime |
totalSecondsPlayed | The number of seconds the client has played | Integer |
serverName | Name of the server | String |
serverGame | Game the server is running | String |
Sample
[
{
"name": "/dev/../",
"ranking":125,
"kills":8,
"deaths":21,
"performance":92.85,
"scorePerMinute":12.753,
"lastPlayed":"2018-10-04T08:15:11",
"totalSecondsPlayed":541,
"serverName":"IW4Host",
"serverGame":"IW4"
}
]