Updated API (markdown)
parent
8233a73928
commit
da11727ad5
50
API.md
50
API.md
@ -37,6 +37,22 @@ GET `api/client/find`
|
|||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
|
### Login Request
|
||||||
|
POST `api/client/<clientId>/login`
|
||||||
|
| Parameter | Method | Description | Type | Validation | Default |
|
||||||
|
|-----------|-----------|------------------------------------------------|---------|--------------------------------|------------|
|
||||||
|
| clientId | URI/Route | Client identifier | Integer | Required | -- |
|
||||||
|
|
||||||
|
**Adds cookie with key `.AspNetCore.Cookies` to be used to authenticate subsequent requests**
|
||||||
|
|
||||||
|
### Logout Request
|
||||||
|
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`**
|
||||||
|
|
||||||
## Server
|
## Server
|
||||||
### Get Servers
|
### Get Servers
|
||||||
GET `api/server`
|
GET `api/server`
|
||||||
@ -48,6 +64,18 @@ GET `api/server`
|
|||||||
| IP | IP Address of the server | String |
|
| IP | IP Address of the server | String |
|
||||||
| Port | Port of the server | Short |
|
| Port | Port of the server | Short |
|
||||||
|
|
||||||
|
### Sample
|
||||||
|
```json
|
||||||
|
[
|
||||||
|
{
|
||||||
|
"id": 12700128960,
|
||||||
|
"hostname": "IW4Host",
|
||||||
|
"ip": "127.0.0.1",
|
||||||
|
"port": 28960
|
||||||
|
}
|
||||||
|
]
|
||||||
|
```
|
||||||
|
|
||||||
### Get Server By ID
|
### Get Server By ID
|
||||||
GET `api/server/<serverId>`
|
GET `api/server/<serverId>`
|
||||||
### Request
|
### Request
|
||||||
@ -63,6 +91,18 @@ GET `api/server/<serverId>`
|
|||||||
| IP | IP Address of the server | String |
|
| IP | IP Address of the server | String |
|
||||||
| Port | Port of the server | Short |
|
| Port | Port of the server | Short |
|
||||||
|
|
||||||
|
### Sample
|
||||||
|
```json
|
||||||
|
[
|
||||||
|
{
|
||||||
|
"id": 12700128960,
|
||||||
|
"hostname": "IW4Host",
|
||||||
|
"ip": "127.0.0.1",
|
||||||
|
"port": 28960
|
||||||
|
}
|
||||||
|
]
|
||||||
|
```
|
||||||
|
|
||||||
### Execute Command For Server
|
### Execute Command For Server
|
||||||
POST `api/server/<serverId>/execute`
|
POST `api/server/<serverId>/execute`
|
||||||
### Request
|
### Request
|
||||||
@ -77,6 +117,16 @@ POST `api/server/<serverId>/execute`
|
|||||||
| ExecutionTimeMs | Time in milliseconds to execute command | Integer |
|
| ExecutionTimeMs | Time in milliseconds to execute command | Integer |
|
||||||
| Output | Messages generated by the execution of the command | Array(String) |
|
| Output | Messages generated by the execution of the command | Array(String) |
|
||||||
|
|
||||||
|
### Sample
|
||||||
|
```json
|
||||||
|
{
|
||||||
|
"executionTimeMs": 73,
|
||||||
|
"output": [
|
||||||
|
"IW4MAdmin has been online for 3 minutes, 4 seconds, 215 milliseconds"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
## Stats
|
## Stats
|
||||||
### Get Client Stats Request
|
### Get Client Stats Request
|
||||||
GET `api/stats/{clientId}`
|
GET `api/stats/{clientId}`
|
||||||
|
Loading…
x
Reference in New Issue
Block a user