Instances
Path parameters
instance_idstringRequiredExample:
01ab89ef
Pattern: ^[0-9a-f]{8}$
Responses
200
Success
application/json
404
No instance with this instance_id found
500
Internal server error
application/json
get
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"
}
]
}
Path parameters
instance_idstringRequiredExample:
01ab89ef
Pattern: ^[0-9a-f]{8}$
Body
tostringRequired
Responses
202
Accepted
application/json
404
No instance with this instance_id found
patch
PATCH /v2/instances/{instance_id} HTTP/1.1
Host: localhost
Content-Type: application/json
Accept: */*
Content-Length: 13
{
"to": "text"
}
{
"jobId": 17
}
Body
instanceNamestringOptionalExample:
Instance name
Smart home
Responses
202
Accepted
application/json
400
Malformed request
application/json
post
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
}
Path parameters
instance_idstringRequired
Responses
200
Success
application/json
404
No instance with this instance_id found
get
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
}
]
}
}
Path parameters
instance_idstringRequired
Body
Responses
200
Success
application/json
404
No instance with this instance_id found
post
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
}
]
}
}
Path parameters
instance_idstringRequired
Responses
200
Success
application/json
404
No instance with this instance_id found
500
Internal server error
application/json
get
GET /v2/instances/{instance_id}/logs HTTP/1.1
Host: localhost
Accept: */*
{
"stdout": "text",
"stderr": "text"
}
Path parameters
instance_idstringRequired
Body
string[]Optional
Responses
200
Environment for instance with this instance id is set
201
Environment for instance with this instance id was created
400
Malformed request
application/json
404
No instance with this instance_id found
put
PUT /v2/instances/{instance_id}/config/environment HTTP/1.1
Host: localhost
Content-Type: application/json
Accept: */*
Content-Length: 8
[
"text"
]
No content
Path parameters
instance_idstringRequired
Responses
200
Success
application/json
Responsestring[]Example:
["8001:8001","5000","5001-5008:6001-6008","6001-6008"]
404
No instance with this instance_id found
get
GET /v2/instances/{instance_id}/config/ports HTTP/1.1
Host: localhost
Accept: */*
[
"8001:8001",
"5000",
"5001-5008:6001-6008",
"6001-6008"
]
Path parameters
instance_idstringRequiredExample:
01ab89ef
Pattern: ^[0-9a-f]{8}$
portinteger · min: 1 · max: 65535Required
Responses
302
Found
400
Malformed request
application/json
404
Instance id or port not found
application/json
500
Internal server error
application/json
get
GET /v2/instances/{instance_id}/editor/{port} HTTP/1.1
Host: localhost
Accept: */*
No content
Path parameters
instance_idstringRequired
Body
string[]OptionalExample:
["8001:8001","5000","5001-5008:6001-6008","6001-6008"]
Responses
200
Exposed ports for instance with this instance id is set
201
Exposed ports for instance with this instance id was created
400
Malformed request
application/json
404
No instance with this instance_id found
put
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
Last updated
Was this helpful?