Instances
Last updated
Was this helpful?
Last updated
Was this helpful?
01ab89ef
Pattern: ^[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"
}
]
}
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"
}
["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"
]
01ab89ef
Pattern: ^[0-9a-f]{8}$
GET /v2/instances/{instance_id}/editor/{port} HTTP/1.1
Host: localhost
Accept: */*
No content
01ab89ef
Pattern: ^[0-9a-f]{8}$
PATCH /v2/instances/{instance_id} HTTP/1.1
Host: localhost
Content-Type: application/json
Accept: */*
Content-Length: 13
{
"to": "text"
}
{
"jobId": 17
}
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"
}
{
"jobId": 17
}
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
}
]
}
}
{
"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"
]
No content
["8001:8001","5000","5001-5008:6001-6008","6001-6008"]
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"
]
No content