node-api/api.http

67 lines
1.0 KiB
Plaintext
Raw Normal View History

2020-07-11 11:04:37 +00:00
POST http://localhost:1323/v1/apps
Content-type: application/json
{
"name": "test_1234",
2020-07-11 21:14:45 +00:00
"ssh_port": 46500,
"http_port": 46501,
2020-07-11 11:04:37 +00:00
"image": "docker.io/rosti/runtime:2020.04-1",
"cpu": 100,
"memory": 128000
}
###
PUT http://localhost:1323/v1/apps/test_1234
Content-type: application/json
{
2020-07-11 21:14:45 +00:00
"ssh_port": 46500,
"http_port": 46501
2020-07-11 11:04:37 +00:00
}
###
2020-07-13 22:01:42 +00:00
# Start
2020-07-11 11:04:37 +00:00
PUT http://localhost:1323/v1/apps/test_1234/start
Content-type: application/json
2020-07-11 21:14:45 +00:00
###
PUT http://localhost:1323/v1/apps/test_1234/stop
Content-type: application/json
###
2020-07-13 22:01:42 +00:00
# Rebuild
PUT http://localhost:1323/v1/apps/test_1234/rebuild
Content-type: application/json
Authorization: Token 333ff32b-6c9e-4794-adab-c289447e66b0
###
# Delete of app
2020-07-11 21:14:45 +00:00
DELETE http://localhost:1323/v1/apps/test_1234
Content-type: application/json
###
2020-07-13 22:01:42 +00:00
# Stats
2020-07-11 21:14:45 +00:00
GET http://localhost:1323/v1/apps/test_1234/stats
Content-type: application/json
###
2020-07-13 22:01:42 +00:00
# List of all apps
2020-07-11 21:14:45 +00:00
GET http://localhost:1323/v1/apps
Content-type: application/json
2020-07-13 22:01:42 +00:00
Authorization: Token 333ff32b-6c9e-4794-adab-c289447e66b0