node-api/api.http

95 lines
1.4 KiB
HTTP

POST http://localhost:1323/v1/apps
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 333ff32b-6c9e-4794-adab-c289447e66b0
###
# 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 333ff32b-6c9e-4794-adab-c289447e66b0
###
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"
}