Last updated 2 months ago
Was this helpful?
App to query instances for
App version to query instances for
Instance of an App
GET /v2/instances HTTP/1.1 Host: localhost Accept: */*
Success
[]
01ab89ef
^[0-9a-f]{8}$
GET /v2/instances/{instance_id} HTTP/1.1 Host: localhost Accept: */*
{ "instanceId": "01ab89ef", "instanceName": "Smart home", "appKey": { "name": "tech.flecs.app-1", "version": "1.2.3.4-f1" }, "status": "not created", "desired": "not created", "configFiles": [ { "container": "/etc/conf.d/configuration.cfg", "host": "/var/lib/flecs/instances/01ab89ef/conf/configuration.cfg" } ], "hostname": "flecs-01ab89ef", "ipAddress": "172.21.0.3", "ports": [ { "container": "8080", "host": "18080" } ], "volumes": [ { "name": "var", "path": "/var/app" } ], "editors": [ { "name": "Example app user settings", "url": "/api/v2/instances/abcd1234/editor/8080" } ] }
Job metadata for accepted requests
DELETE /v2/instances/{instance_id} HTTP/1.1 Host: localhost Accept: */*
Accepted
{ "jobId": 17 }
POST /v2/instances/{instance_id}/start HTTP/1.1 Host: localhost Accept: */*
Instance id to delete
POST /v2/instances/{instance_id}/stop HTTP/1.1 Host: localhost Accept: */*
GET /v2/instances/{instance_id}/config HTTP/1.1 Host: localhost Accept: */*
{ "networkAdapters": [ { "name": "text", "active": true, "connected": true, "ipAddress": "0.0.0.0", "subnetMask": "0.0.0.0", "gateway": "0.0.0.0" } ], "devices": { "usb": [ { "device": "text", "pid": 1, "port": "text", "vendor": "text", "vid": 1, "active": true, "connected": true } ] } }
GET /v2/instances/{instance_id}/logs HTTP/1.1 Host: localhost Accept: */*
{ "stdout": "text", "stderr": "text" }
GET /v2/instances/{instance_id}/config/environment HTTP/1.1 Host: localhost Accept: */*
[ "text" ]
DELETE /v2/instances/{instance_id}/config/environment HTTP/1.1 Host: localhost Accept: */*
Environment of instance with this instance_id was deleted
No content
["8001:8001","5000","5001-5008:6001-6008","6001-6008"]
GET /v2/instances/{instance_id}/config/ports HTTP/1.1 Host: localhost Accept: */*
[ "8001:8001", "5000", "5001-5008:6001-6008", "6001-6008" ]
DELETE /v2/instances/{instance_id}/config/ports HTTP/1.1 Host: localhost Accept: */*
Exposed ports of instance with this instance_id was deleted
GET /v2/instances/{instance_id}/editor/{port} HTTP/1.1 Host: localhost Accept: */*
Found
PATCH /v2/instances/{instance_id} HTTP/1.1 Host: localhost Content-Type: application/json Accept: */* Content-Length: 13 { "to": "text" }
Instance name
Smart home
POST /v2/instances/create HTTP/1.1 Host: localhost Content-Type: application/json Accept: */* Content-Length: 89 { "appKey": { "name": "tech.flecs.app-1", "version": "1.2.3.4-f1" }, "instanceName": "Smart home" }
POST /v2/instances/{instance_id}/config HTTP/1.1 Host: localhost Content-Type: application/json Accept: */* Content-Length: 248 { "networkAdapters": [ { "name": "text", "active": true, "connected": true, "ipAddress": "0.0.0.0", "subnetMask": "0.0.0.0", "gateway": "0.0.0.0" } ], "devices": { "usb": [ { "device": "text", "pid": 1, "port": "text", "vendor": "text", "vid": 1, "active": true, "connected": true } ] } }
PUT /v2/instances/{instance_id}/config/environment HTTP/1.1 Host: localhost Content-Type: application/json Accept: */* Content-Length: 8 [ "text" ]
Environment for instance with this instance id is set
PUT /v2/instances/{instance_id}/config/ports HTTP/1.1 Host: localhost Content-Type: application/json Accept: */* Content-Length: 54 [ "8001:8001", "5000", "5001-5008:6001-6008", "6001-6008" ]
Exposed ports for instance with this instance id is set