node-api/api.http
Adam Štrauch c714274a98
Support for Docker exec API calls
* Endpoint for SSH password
* Endpoint for authorized_keys
2020-08-07 00:36:40 +02:00

109 lines
2.3 KiB
HTTP

POST http://localhost:1323/v1/apps
Authorization: Token fee60059-f554-4c35-b44f-74b6be377095
Content-type: application/json
{
"name": "test_1235",
"ssh_port": 46502,
"http_port": 46503,
"image": "docker.io/rosti/runtime:2020.04-1",
"cpu": 100,
"memory": 128
}
###
PUT http://localhost:1323/v1/apps/test_1234
Content-type: application/json
{
"ssh_port": 46500,
"http_port": 46501,
"memory": 128
}
###
# Start
PUT http://localhost:1323/v1/apps/test_1234/start
Content-type: application/json
###
# Stop
PUT http://localhost:1323/v1/apps/test_1234/stop
Content-type: application/json
###
# Rebuild
PUT http://localhost:1323/v1/apps/test_1234/rebuild
Content-type: application/json
Authorization: Token fee60059-f554-4c35-b44f-74b6be377095
###
# Delete of app
DELETE http://localhost:1323/v1/apps/test_1234
Content-type: application/json
###
# Stats
GET http://localhost:1323/v1/apps/test_1234/stats
Content-type: application/json
###
# Get
GET http://localhost:1323/v1/apps/test_1234
Content-type: application/json
###
# List of all apps
GET http://localhost:1323/v1/apps
Content-type: application/json
Authorization: Token fee60059-f554-4c35-b44f-74b6be377095
###
POST http://localhost:1323/v1/apps/test_1234/labels
Content-type: application/json
{
"Value": "userid:cx"
}
###
DELETE http://localhost:1323/v1/apps/test_1234/labels
Content-type: application/json
{
"Value": "userid:cx"
}
###
# Set password
PUT http://localhost:1323/v1/apps/test_1235/keys
Content-type: application/json
ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDmgl6/h44nBJciIX2xTO2ABzDDIU0apHQz6p8uLG2o4DBOXj4iVP5/kwTjcwQAJQBeqEHtjetnnamWbrChh8vu9VeIC8UIUpcf/iFKfhXZq3tJDXDLfiGsN/L/LmbsjhW84QRms0pUp9qV+wGP5+L7Qyws8NKFaODmK/FUFhanFhF2JxzAeMu492HvmfWmpDb0MdD8MwV58NAyd1N+ygh+QiirFx/NzFPWtQZpvBZvxCgtdNi9X6ajmYcvLregtovXQh4vwSGrNqpA5yyyNcR/JdsH2nqmUfsFo9mGs5et2s+TiZweGObsJBHX1dl4bV3oMPvtwh1zjA903jmQ0Bab cx@bimbo
ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDmgl6/h44nBJciIX2xTO2ABzDDIU0apHQz6p8uLG2o4DBOXj4iVP5/kwTjcwQAJQBeqEHtjetnnamWbrChh8vu9VeIC8UIUpcf/iFKfhXZq3tJDXDLfiGsN/L/LmbsjhW84QRms0pUp9qV+wGP5+L7Qyws8NKFaODmK/FUFhanFhF2JxzAeMu492HvmfWmpDb0MdD8MwV58NAyd1N+ygh+QiirFx/NzFPWtQZpvBZvxCgtdNi9X6ajmYcvLregtovXQh4vwSGrNqpA5yyyNcR/JdsH2nqmUfsFo9mGs5et2s+TiZweGObsJBHX1dl4bV3oMPvtwh1zjA903jmQ0Bab cx@bimbo