Added README
This commit is contained in:
parent
a2a2bcb206
commit
d05ee58f85
1 changed files with 67 additions and 0 deletions
67
README.md
Normal file
67
README.md
Normal file
|
|
@ -0,0 +1,67 @@
|
|||
# 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
|
||||
|
||||
{
|
||||
"access_token": "...",
|
||||
"expires_in": ...
|
||||
}
|
||||
```
|
||||
|
||||
## List servers
|
||||
|
||||
```http
|
||||
GET /api/servers HTTP/1.1
|
||||
Authorization: Bearer ...
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
```http
|
||||
HTTP/1.1 200 OK
|
||||
Content-Type: application/json
|
||||
|
||||
{
|
||||
"servers": [
|
||||
{
|
||||
"id": "...",
|
||||
"name": "..."
|
||||
},
|
||||
...
|
||||
]
|
||||
}
|
||||
```
|
||||
|
||||
## List servers
|
||||
|
||||
```http
|
||||
GET /api/servers/.../console?time=... HTTP/1.1
|
||||
Authorization: Bearer ...
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
```http
|
||||
HTTP/1.1 200 OK
|
||||
Content-Type: application/json
|
||||
|
||||
{
|
||||
"epoch": ...,
|
||||
"logs": ... // base64
|
||||
}
|
||||
```
|
||||
Loading…
Add table
Add a link
Reference in a new issue