From d05ee58f85d82f8f3921af2e1ed79908c1d3d7ad Mon Sep 17 00:00:00 2001 From: AMUNTENCI SILVIO MARIAN <20638@EDU.MARCONI> Date: Mon, 16 Mar 2026 09:24:11 +0100 Subject: [PATCH] Added README --- README.md | 67 +++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 67 insertions(+) create mode 100644 README.md diff --git a/README.md b/README.md new file mode 100644 index 0000000..10fef88 --- /dev/null +++ b/README.md @@ -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 +} +```