Updated API (markdown)

RaidMax 2021-01-18 10:15:55 -06:00
parent 59a9bd56fc
commit 8233a73928

40
API.md

@ -37,6 +37,46 @@ GET `api/client/find`
} }
``` ```
## Server
### Get Servers
GET `api/server`
### Get Servers Response (Array)
| 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 |
### Get Server By ID
GET `api/server/<serverId>`
### Request
| Parameter | Method | Description | Type | Validation | Default |
|-----------|-----------|------------------------------------------------|---------|--------------------------------|------------|
| serverId | Route/URI | Server identifier | Long | Required, >0 | -- |
### Response
| 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 |
### Execute Command For Server
POST `api/server/<serverId>/execute`
### Request
| 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 | -- |
### Response
| Name | Description | Type |
|--------------------|----------------------------------------------------|---------------|
| ExecutionTimeMs | Time in milliseconds to execute command | Integer |
| Output | Messages generated by the execution of the command | Array(String) |
## Stats ## Stats
### Get Client Stats Request ### Get Client Stats Request
GET `api/stats/{clientId}` GET `api/stats/{clientId}`