67 lines
734 B
Markdown
67 lines
734 B
Markdown
# API
|
|
|
|
## OAuth2 token
|
|
|
|
```http
|
|
POST /oauth2/token HTTP/1.1
|
|
Content-Type: application/x-www-form-urlencoded
|
|
|
|
grant_type=client_credentals
|
|
client_id=...
|
|
client_secret=...
|
|
```
|
|
|
|
---
|
|
|
|
```http
|
|
HTTP/1.1 200 OK
|
|
Content-Type: application/json
|
|
|
|
```
|
|
|
|
## List servers
|
|
|
|
```http
|
|
GET /api/servers HTTP/1.1
|
|
Authorization: Bearer ...
|
|
```
|
|
|
|
---
|
|
|
|
```http
|
|
HTTP/1.1 200 OK
|
|
Content-Type: application/json
|
|
|
|
```
|
|
|
|
## List servers
|
|
|
|
```http
|
|
GET /api/servers/.../console?time=... HTTP/1.1
|
|
Authorization: Bearer ...
|
|
```
|
|
|
|
---
|
|
|
|
```http
|
|
HTTP/1.1 200 OK
|
|
Content-Type: application/json
|
|
|
|
```
|