REST APIs
All Platform Portal functionality is built on REST APIs that developers can call directly to access resources and control their devices programmatically.
Authentication
GET /auth/ping
Ping the server to see if it is still alive.
-
Response
200 OK-
Body
pong
-
GET /auth/agentinfo
Get the agent information. (since v1.8.1)
-
Response
200 OKRequest Successfully
-
Body
{
"version": "v1.8.1"
}
-
GET /auth/version
Get the API version. (since v1.7.1)
-
Response
200 OKRequest Successfully
-
Body
{
"version":1.2
}
-
GET /auth/token{?m}
Get with the OS or the admin account and return the JWT token if the user is valid.
A request contains a header field in the form of Authorization: Basic , where credentials are the Base64 encoding of username and password joined by a single colon :
username:password => (base64) => dXNlcm5hbWU6cGFzc3dvcmQ=
(since v1.7.1, API version 1.1)
-
URI Parameters
m
number(optional) - User account type. (since v1.8.1, API version 1.2)0: OS account (default)2:adminaccount (default password:p@ssw0rd, must be changed after login)
-
Request Header
Authorization: Basic -
Response
200 OKLogin Successfully
-
Body
{
"code": 200
"expire":"20XX-XX-XXT14:08:33+08:00"
"token": ""
} -
Cookie (if available)
Secure and HttpOnly cookies
Key: jwt
Value:
-
-
Response
401 UnauthorizedLogin Failed
{
"Code": 401,
"Message": ""
}
POST /auth/login{?m}
Log in with the OS or admin account and return the JWT token if the user is valid.
-
URI Parameters
m
number(optional) - User account type. (since 1.8.1, API version 1.2)0: OS account (default)2:adminaccount (default password:p@ssw0rd, must be changed after login)
-
Request body
{
"username": "your_username",
"password": "your_password"
} -
Response
200 OKLogin Successfully
-
Body
{
"code": 200
"expire":"20XX-XX-XXT14:08:33+08:00"
"token": ""
} -
Cookie (if available)
Secure and HttpOnly cookies
Key: jwt
Value:
-
-
Response
401 UnauthorizedLogin Failed
{
"Code": 401,
"Message": ""
}
POST /auth/logout
Log out and clear the cookie.
-
Response
200 OK{
"code": 200
}
GET /auth/certificate
Download the JWT certificate file in the PEM format.
-
Response
200 OKHeaders
Content-Type: application/octet-stream
Content-Description: File Transfer
Content-Transfer-Encoding: Binary
Content-Disposition: attachment; filename=cert.pem.crt
PUT /auth/user/admin/password
Change the admin’s password. (since 1.8.1, API version 1.2)
-
Request Headers
Log in with the
adminaccount to get the JWT token (tokenfield from the response body).Authorization: Bearer -
Request Body
{
"old": "",
"new": "",
} -
Response
200 OK -
Response
400 Bad Request{
"code": 400, // optional
"message": ""
} -
Response
401 Unauthorized{
"code": 401,
"message": ""
} -
Response
422 Unprocessable EntityThe request has been applied, but the request body is invalid.
{
"errors": {
"validator": ""
}
}
DELETE /auth/user/admin/password
Reset the admin’s password to the default value (p@ssw0rd). (since 1.8.1, API version 1.2)
-
Request Headers
Log in with the
adminaccount to get the JWT token (tokenfield from the response body).Authorization: Bearer -
Response
200 OK -
Response
400 Bad Request{
"code": 400, // optional
"message": ""
} -
Response
401 Unauthorized{
"code": 401,
"message": ""
}
H/W Monitor
GET /platform/api/hwmon
Get all H/W Monitor data, including Temperature, Voltage, Current, and Fan Speed.
-
Request Headers
Log in with your OS account or the
adminaccount to get the JWT token (tokenfield from the response body).Authorization: Bearer -
Response
200 OK{
"temperature": [
{
"name": "CPU",
"value": "50.1",
"unit": "Celsius"
}
],
"voltage": [
{
"name": "VCore",
"value": "0.92",
"unit": "Volt"
},
{
"name": "12V",
"value": "11.86",
"unit": "Volt"
}
],
"current": [
{
"name": "OEM0",
"value": "0.54",
"unit": "A"
}
],
"fanspeed": [
{
"name": "FAN0",
"value": "1234",
"unit": "RPM"
}
]
} -
Response
401 Unauthorized{
"Code": 401,
"Message": ""
} -
Response
404Not supported or no available data.
GET /platform/api/hwmon (SSE)
Get all H/W Monitor data, including Temperature, Voltage, Current, and Fan Speed via Server-Sent Events (SSE).
-
EventStream
event: message
data: {"current":[{"name":"OEM0","value":0.34, "unit":"A"}],"temperature":[{"name":"CPU","value":41, "unit":"Celsius"}],"voltage":[{"name":"Vcore", "value":0.92,"unit":"Volt"},{"name":"12V","value":11. 86,"unit":"Volt"},{"name":"5V Standby","value":4.95, "unit":"Volt"},{"name":"CMOS Battery","value":3.05, "unit":"Volt"}]}
GET /platform/api/hwmon/temperatures
Get H/W Monitor temperature data.
-
Request Headers
Log in with your OS account or the
adminaccount to get the JWT token (tokenfield from the response body).Authorization: Bearer -
Response
200 OK```json
[ { "name": "CPU", "value": 40, "unit": "Celsius" }, ... ]
-
Response
401 Unauthorized{
"Code": 401,
"Message": ""
} -
Response
404Not supported or no available data.
GET /platform/api/hwmon/voltages
Get H/W Monitor voltage data.
-
Request Headers
Log in with your OS account or the
adminaccount to get the JWT token (tokenfield from the response body).Authorization: Bearer -
Response
200 OK```json
[ { "name": "Vcore", "value": 0.92, "unit": "Volt" }, ... ]
-
Response
401 Unauthorized{
"Code": 401,
"Message": ""
} -
Response
404Not supported or no available data.
GET /platform/api/hwmon/currents
Get H/W Monitor current data.
-
Request Headers
Log in with your OS account or the
adminaccount to get the JWT token (tokenfield from the response body).Authorization: Bearer -
Response
200 OK```json
[ { "name": "OEM0", "value": 0.54, "unit": "A" }, ... ]
-
Response
401 Unauthorized{
"Code": 401,
"Message": ""
} -
Response
404 Not FoundNot supported or no available data.
GET /platform/api/hwmon/fanspeeds
Get H/W Monitor fan speed data.
-
Request Headers
Log in with your OS account or the
adminaccount to get the JWT token (tokenfield from the response body).Authorization: Bearer -
Response
200 OK```json
[ { "name": "FAN0", "value": 1234, "unit": "RPM" }, ... ]
-
Response
401 Unauthorized{
"Code": 401,
"Message": ""
} -
Response
404 Not FoundNot supported or no available data.
Platform
GET /platform/api/ping
Ping the server to see if it is still alive.
-
Response
200 OK-
Body
pong
-
GET /platform/api/agentinfo
Get the agent information. (since v0.14.1)
-
Response
200 OKRequest Successfully
-
Body
{
"version": "v0.14.1"
}
-
Portal
GET /api/ping
Ping the portal-service server to see if it is still alive.
-
Response
200 OK-
Body
pong
-
GET /api/agentinfo
Get the portal-service agent information. (since v0.14.1)
-
Response
200 OKRequest Successfully
-
Body
{
"version": "v0.14.1"
}
-
GET /api/irtm/ping
Ping the iFactory RTM server to see if it is still alive.
-
Response
200 OK-
Body
pong
-
System Information
Host Information
GET /platform/api/host/info
Get host information, including BIOS information, Boot Count, Boot Time, Device Name (BIOS Name), OS Information, and Image Information (if available).
-
Request Headers
Log in with your OS account or the
adminaccount to get the JWT token (tokenfield from the response body).Authorization: Bearer -
Response
200 OK{
"biosSerialNumber": "Default string",
"biosUUID": "03000200-0400-0500-0006-000700080009",
"biosVersion": "N/A",
"bootCount": 22862,
"bootTime": 1619413851,
"deviceName": "UNO-2484G-673xAE",
"dockerVersion": "Docker version 19.03.13, build 4484c46d9d",
"ecVersion": "0.5",
"hostid": "d6d6752c-a6d4-4d02-96b1-96e2d3a8d2b2",
"hostname": "UNO-2484G-673xA",
"imageVersion": "6.04 Build 005",
"kernelArch": "x86_64",
"os": "windows",
"platform": "Microsoft Windows 10 Enterprise LTSC 2019",
"releaseDate": "01/23/2019",
"upTime": 851779
} -
Response
401 Unauthorized{
"Code": 401,
"Message": ""
}
GET /platform/api/host/display/count
Get available display count.
-
Prerequisite
- rest-server 0.12.1.0 and later
-
Request Headers
Log in with your OS account or the
adminaccount to get the JWT token (tokenfield from the response body).Authorization: Bearer -
Response
200 OK1 -
Response
401 Unauthorized{
"Code": 401,
"Message": ""
}
GET /platform/api/host/screenshot/:index
Get the specified display screenshot by index
-
Prerequisite
- rest-server 0.12.1.0 and later
-
Request Headers
Log in with your OS account or the
adminaccount to get the JWT token (tokenfield from the response body).Authorization: Bearer -
Response
200 OK{
"data": "",
"mediaType": "image/png"
}You can use Data URLs to render the response base64 encoded image.
data:[][;base64], -
Response
401 Unauthorized{
"Code": 401,
"Message": ""
} -
Response
422 Unprocessable EntityThe request has been applied but got errors.
{
"errors": {
"Host": ""
}
}
GET /platform/api/host/screenshot/:index/file
Get the specified display screenshot file by index
-
Prerequisite
- rest-server 0.12.1.0 and later
-
Request Headers
Log in with your OS account or the
adminaccount to get the JWT token (tokenfield from the response body).Authorization: Bearer -
Response
200 OKReturns the screenshot image file directly
-
Response
401 Unauthorized{
"Code": 401,
"Message": ""
} -
Response
422 Unprocessable EntityThe request has been applied but got errors.
{
"errors": {
"Host": ""
}
}
System Performance
GET /platform/api/systemperf
Get CPU, Memory information, and usage.
-
Request Headers
Log in with your OS account or the
adminaccount to get the JWT token (tokenfield from the response body).Authorization: Bearer -
Response
200 OK{
"cpu": {
"info": {
"cpu": 0,
"vendorId": "GenuineIntel",
"family": "6",
"model": "78",
"stepping": 3,
"physicalId": "0",
"coreId": "0",
"cores": 1,
"modelName": "Intel(R) Core(TM) i7-6600U CPU @ 2.60GHz",
"mhz": 2600,
"cacheSize": 4096,
"flags": [
"sse",
"sse2",
"..."
],
"microcode": "0xc6"
},
"usage": [
0,
0,
0.9999999999990905,
0
]
},
"memory": {
"total": 8265986048,
"available": 7532920832,
"used": 415899648,
"usedPercent": 5.031458383608441,
"free": 6488629248,
"...": ...
}
} -
Response
401 Unauthorized{
"Code": 401,
"Message": ""
}
GET /platform/api/systemperf/cpu
Get CPU information and usage.
-
Request Headers
Log in with your OS account or the
adminaccount to get the JWT token (tokenfield from the response body).Authorization: Bearer -
Response
200 OK{
"info": {
"cpu": 0,
"vendorId": "GenuineIntel",
"family": "6",
"model": "78",
"stepping": 3,
"physicalId": "0",
"coreId": "0",
"cores": 1,
"modelName": "Intel(R) Core(TM) i7-6600U CPU @ 2.60GHz",
"mhz": 2600,
"cacheSize": 4096,
"flags": [
"sse",
"sse2",
"..."
],
"microcode": "0xc6"
},
"usage": [
1.5625,
0,
1.5625,
0
]
} -
Response
401 Unauthorized{
"Code": 401,
"Message": ""
}
GET /platform/api/systemperf/memory
Get memory information and usage.
-
Request Headers
Log in with your OS account or the
adminaccount to get the JWT token (tokenfield from the response body).Authorization: Bearer -
Response
200 OK{
"total": 8265986048,
"available": 7532576768,
"used": 417800192,
"usedPercent": 5.05445072824783,
"free": 6486446080,
"...": ...
} -
Response
401 Unauthorized{
"Code": 401,
"Message": ""
}
System Devices
GET /platform/api/devmgr
Get a list of the hardware attached to the computer.
-
Request Headers
Log in with your OS account or the
adminaccount to get the JWT token (tokenfield from the response body).Authorization: Bearer -
Response
200 OK```json
[ { "class": "ACPI", "instancePath": "ACPI\PNP0000\4&15FBC11C&0", "name": "Programmable interrupt controller", "status": "stopped" }, { "class": "STORAGE", "instancePath": "STORAGE\VOLUME\{7963B29A-147B-11EB-92A9-806E6F6E6963}#000000002F900000", "name": "Volume", "status": "running" }, { "class": "STORAGE", "instancePath": "STORAGE\VOLUME\{7963B29A-147B-11EB-92A9-806E6F6E6963}#000000001F500000", "name": "Volume", "status": "running" }, { "class": "PCI", "instancePath": "PCI\VEN_8086&DEV_9D15&SUBSYS_72708086&REV_F1\3&11583659&0&E0", "name": "PCI-to-PCI Bridge", "vendorID": "8086", "deviceID": "9D15", "status": "running" }, { "class": "USB", "instancePath": "USB\VID_05E3&PID_0612\5&2C705BFE&0&15", "name": "Generic SuperSpeed USB Hub", "vendorID": "05E3", "deviceID": "0612", "status": "running" } ]
-
Response
401 Unauthorized{
"Code": 401,
"Message": ""
} -
Response
422 Unprocessable EntityThe request has been applied but got errors.
{
"errors": {
"DevMgr": ""
}
}
Service
(since rest-server 1.0.1)
GET /platform/api/service/list
Get the service list
-
Request Headers
Log in with your OS account or the
adminaccount to get the JWT token (tokenfield from the response body).Authorization: Bearer -
Response
200 OK```json
[ { "name": "AppHubEdgeService", "displayName": "AppHub-Edge Service", "description": "", "status": "running" }, { "name": "ALG", "displayName": "Application Layer Gateway Service", "description": "Provides support for 3rd party protocol plug-ins for Internet Connection Sharing", "status": "stopped" }, .. ]
-
Response
401 Unauthorized{
"Code": 401,
"Message": ""
} -
Response
422 Unprocessable EntityThe request has been applied but got errors.
{
"errors": {
"Service": ""
}
}
GET /platform/api/service/:name
Get the service status by name.
-
Request Headers
Log in with your OS account or the
adminaccount to get the JWT token (tokenfield from the response body).Authorization: Bearer -
Response
200 OKThe available status will be "running", "stopped", "disabled", or "unknown".
{
"status": "running"
} -
Response
401 Unauthorized{
"Code": 401,
"Message": ""
} -
Response
422 Unprocessable EntityThe request has been applied but got errors.
{
"errors": {
"Service": ""
}
}
PUT /platform/api/service/:name
Control the service status by name.
-
Request Headers
Log in with your OS account or the
adminaccount to get the JWT token (tokenfield from the response body).Authorization: Bearer -
Request Body
{
"action": "start" | "stop" | "restart"
} -
Response
204 No ContentThe requested operation is successful.
-
Response
401 Unauthorized{
"Code": 401,
"Message": ""
} -
Response
422 Unprocessable EntityThe request has been applied but got errors.
{
"errors": {
"Service": ""
}
}
Terminal
(since rest-server 1.0.1)
GET /platform/api/term/ws
Get the web terminal basic information.
-
Request Headers
Log in with your OS account or the
adminaccount to get the JWT token (tokenfield from the response body).Authorization: Bearer -
Response
200 OK{
"os": "windows" | "linux",
} -
Response
401 Unauthorized{
"Code": 401,
"Message": ""
}
GET wss://(URL)/platform/api/term/ws
Open a local shell, making it communicate to WebSocket using stdin/stdout.
-
Request Headers
Log in with your OS account or the
adminaccount to get the JWT token (tokenfield from the response body).Authorization: Bearer -
Message Description

- Message Format
-
Outbound Message ↑
Cmd Data Description 1 base64-encoded terminal output terminal output 2 Pong message (heartbeat) 3 The New Title Set window title 4 {"font-size":12,"font-family":"serif"} Set Preferences 5 false Set auto reconnect 6 1024 Set Buffer Size -
Inbound Message ↓
Cmd Data Description 1 base64-encoded terminal input terminal input data 2 Ping message 3 {"columns":128,"rows":21} Resize Terminal
-
- Message Format
Peripheral
LED
GET /platform/api/perif/led
Get an LED list with high-low values.
-
Request Headers
Log in with your OS account or the
adminaccount to get the JWT token (tokenfield from the response body).Authorization: Bearer -
Response
200 OKtrue -> logical high, false -> logical low
```json
[ true, false, true, false, true, false, true, true ]
-
Response
401 Unauthorized{
"Code": 401,
"Message": ""
} -
Response
404 Not FoundNot supported or no available data.
GET /platform/api/perif/led/:id
Get the specified LED value by index (id)
-
Request Headers
Log in with your OS account or the
adminaccount to get the JWT token (tokenfield from the response body).Authorization: Bearer -
Response
200 OKtrue -> logical high, false -> logical low
true | false -
Response
400 Bad Request{
"errors": {
"LED": ""
}
} -
Response
401 Unauthorized{
"Code": 401,
"Message": ""
} -
Response
404 Not FoundNot supported or no available data.
PUT /platform/api/perif/led/:id
Set the value of the specified LED by index (id)
-
Request Headers
Log in with your OS account or the
adminaccount to get the JWT token (tokenfield from the response body).Authorization: Bearer -
Request Body
true -> logical high, false -> logical low
{
"status": true | false
} -
Response
200 OK -
Response
400 Bad RequestInvalid Parameters Error
{
"errors": {
"LED": ""
}
} -
Response
401 Unauthorized{
"Code": 401,
"Message": ""
} -
Response
404 Not FoundNot supported or no available data.
-
Response
422 Unprocessable EntityThe request body has missing parameters.
{
"errors": {
"validator": ""
}
}The request has been applied but got errors.
{
"errors": {
"LED": ""
}
}
Watchdog
GET /platform/api/perif/wdt
Get hardware watchdog information.
-
Request Headers
Log in with your OS account or the
adminaccount to get the JWT token (tokenfield from the response body).Authorization: Bearer -
Response
200 OK{
"enabled": ,
"type": "EC Watchdog",
"timeoutInSeconds": 15,
"timeoutMaxInSeconds": 255,
"timeoutMinInSeconds": 10
} -
Response
401 Unauthorized{
"Code": 401,
"Message": ""
} -
Response
404 Not FoundNot supported or no available data.
-
Response
422 Unprocessable EntityThe request has been applied but got errors.
{
"errors": {
"WDT": ""
}
}
PUT /platform/api/perif/wdt
Set hardware watchdog enabled or disabled with provided timeout value (optional).
-
Request Headers
Log in with your OS account or the
adminaccount to get the JWT token (tokenfield from the response body).Authorization: Bearer -
Request Body
The
secondsvalue range is [timeoutMinInSeconds, timeoutMaxInSeconds]{
"enabled": , // required
"seconds": [timeoutMinInSeconds, timeoutMaxInSeconds], // optional
} -
Response
200 OK{
"enabled": ,
"seconds":
} -
Response
401 Unauthorized{
"Code": 401,
"Message": ""
} -
Response
404 Not FoundNot supported or no available data.
-
Response
422 Unprocessable EntityThe request has been applied but got errors.
{
"errors": {
"WDT": ""
}
}
PUT /platform/api/perif/wdt/timeout
Set hardware watchdog timeout value (in seconds).
-
Request Headers
Log in with your OS account or the
adminaccount to get the JWT token (tokenfield from the response body).Authorization: Bearer -
Request Body
The
secondsvalue range is [timeoutMinInSeconds, timeoutMaxInSeconds]{
"seconds": [timeoutMinInSeconds, timeoutMaxInSeconds]
} -
Response
200 OK{
"seconds":
} -
Response
401 Unauthorized{
"Code": 401,
"Message": ""
} -
Response
404 Not FoundNot supported or no available data.
-
Response
422 Unprocessable EntityThe request has been applied but got errors.
{
"errors": {
"WDT": ""
}
}
Disk
GET /platform/api/perif/disk
Get installed harddisk information, including model name, size, partition list, usage, and S.M.A.R.T. information (if available).
-
Request Headers
Log in with your OS account or the
adminaccount to get the JWT token (tokenfield from the response body).Authorization: Bearer -
Response
200 OK```json
[ { "name": "\\.\PHYSICALDRIVE0", "sizeBytes": 64017354240, "physicalBlockSizeBytes": 0, "removable": false, "vendor": "(Standard disk drives)", "model": "SQF-S25M4-64G-S9C", "serialNumber": "XXXXXXXXXXXXX", "firmwareRevision": "XXXXX8", "mediaType": "Fixed hard disk media", "partitions": [ { "mountPoint": "C:", "sizeBytes": 63208157184, "freeBytes": 47287078912, "usedBytes": 15921078272, "usedPercent": 25.188328502685938, "readOnly": false } ], "smartAttributes": [ { "id": 1, "name": "Read Error Rate", "statusFlags": 10, "value": 100, "worst": 100, "threshold": 50, "rawData": [ 0, 0, 0, 0, 0, 0 ]
},
...
]
}
]
-
Response
401 Unauthorized{
"Code": 401,
"Message": ""
} -
Response
404 Not FoundNot supported or no available data.
GET /platform/api/perif/disk (SSE)
Get installed hard disk information via Server-Sent Events (SSE), including model name, size, partition list, usage, and S.M.A.R.T. information (if available).
-
EventStream
event: message
data: [{"name":"\\\\.\\PHYSICALDRIVE0","sizeBytes":64017354240,"physicalBlockSizeBytes":0,"removable":false,"vendor":"(Standard disk drives)","model":"SQF-S25M4-64G-S9C","serialNumber":"FF73076C030806395366","firmwareRevision":"S9FMA028","mediaType":"Fixed hard disk media","partitions":[{"mountPoint":"C:","sizeBytes":63208157184,"freeBytes":27825188864,"usedBytes":35382968320,"usedPercent":55.97848425955465,"readOnly":false}],"smartAttributes":[{"id":1,"name":"Read Error Rate","statusFlags":10,"value":100,"worst":100,"threshold":50,"rawData":[0,0,0,0,0,0]},{"id":9,"name":"Power-On Hours (POH)","statusFlags":18,"value":100,"worst":100,"threshold":0,"rawData":[118,38,0,0,0,0]},{"id":12,"name":"Power Cycle Count","statusFlags":18,"value":100,"worst":100,"threshold":0,"rawData":[219,0,0,0,0,0]},{"id":168,"name":"Vendor Specific","statusFlags":18,"value":100,"worst":100,"threshold":0,"rawData":[0,0,0,0,0,0]},{"id":170,"name":"Vendor Specific","statusFlags":3,"value":86,"worst":86,"threshold":10,"rawData":[52,0,0,0,0,0]},{"id":173,"name":"Vendor Specific","statusFlags":18,"value":100,"worst":100,"threshold":0,"rawData":[203,11,158,0,0,0]},{"id":192,"name":"Power-off Retract Count","statusFlags":18,"value":100,"worst":100,"threshold":0,"rawData":[21,0,0,0,0,0]},{"id":194,"name":"Temperature","statusFlags":35,"value":70,"worst":70,"threshold":0,"rawData":[30,0,0,0,0,0]},{"id":218,"name":"Vendor Specific","statusFlags":11,"value":100,"worst":100,"threshold":50,"rawData":[0,0,0,0,0,0]}]}]
GET /platform/api/perif/disk/partition
Get the partition list of installed disks.
-
Request Headers
Log in with your OS account or the
adminaccount to get the JWT token (tokenfield from the response body).Authorization: Bearer -
Response
200 OK```json
[ { "mountPoint": "C:", "sizeBytes": 63208157184, "freeBytes": 27825188864, "usedBytes": 35382968320, "usedPercent": 55.97848425955465, "readOnly": false } ]
-
Response
401 Unauthorized{
"Code": 401,
"Message": ""
} -
Response
404 Not FoundNot supported or no available data.
Redundant Power
GET /platform/api/perif/redundant_power
Get redundant power status.
-
Request Headers
Log in with your OS account or the
adminaccount to get the JWT token (tokenfield from the response body).Authorization: Bearer -
Response
200 OK1: online 0: offline
{
"vin1State": 0 | 1,
"vin2State": 0 | 1
} -
Response
401 Unauthorized{
"Code": 401,
"Message": ""
} -
Response
404 Not FoundNot supported or no available data.
GET /platform/api/perif/redundant_power (SSE)
Get redundant power status via Server-Sent Events (SSE).
-
EventStream
event: message
data: {
"vin1State": 0 | 1,
"vin2State": 0 | 1
}
GPIO
(since rest-server v0.15.1)
GET /platform/api/perif/gpio/count
Get available GPIO count.
-
Request Headers
Log in with your OS account or the
adminaccount to get the JWT token (tokenfield from the response body).Authorization: Bearer -
Response
200 OK{
"count": 8,
} -
Response
401 Unauthorized{
"Code": 401,
"Message": ""
}
GET /platform/api/perif/gpio/all
Get all the available GPIO pins configuration.
-
Request Headers
Log in with your OS account or the
adminaccount to get the JWT token (tokenfield from the response body).Authorization: Bearer -
Response
200 OK```json
[ { "pin": 0, // 0-based pin index (:id) "dir": 0, // direction. 0: output, 1: input "level": 0 // level. 0: low, 1: high }, { "pin": 1, "dir": 1, "level": 1 }, ... { "pin": 7, "dir": 1, "level": 1 } ]
-
Response
401 Unauthorized{
"Code": 401,
"Message": ""
} -
Response
404 Not FoundNot supported or no available data.
-
Response
422 Unprocessable EntityThe request has been applied but got errors.
{
"errors": {
"GPIO": ""
}
}
GET /platform/api/perif/gpio/:id
Get the specified GPIO pin (by index :id) direction and level.
-
Request Headers
Log in with your OS account or the
adminaccount to get the JWT token (tokenfield from the response body).Authorization: Bearer -
Response
200 OK{
"pin": 0, // 0-based pin index (:id)
"dir": 0, // dir. 0: output, 1: input
"level": 0, // level. 0: low, 1: high
}, -
Response
400 Bad RequestInvalid parameter (incorrect
:id){
"errors": {
"GPIO": "invalid parameter"
}
} -
Response
401 Unauthorized{
"Code": 401,
"Message": ""
} -
Response
404 Not FoundNot supported or no available data.
-
Response
422 Unprocessable EntityThe request has been applied but got errors.
{
"errors": {
"GPIO": ""
}
}
GET /platform/api/perif/gpio/:id/dir
Get the specified GPIO pin (by index :id) direction.
0: output, 1: input
-
Request Headers
Log in with your OS account or the
adminaccount to get the JWT token (tokenfield from the response body).Authorization: Bearer -
Response
200 OK{
"dir": 0, // direction. 0: output, 1: input
}, -
Response
400 Bad RequestInvalid parameter (incorrect
:id){
"errors": {
"GPIO": "invalid parameter"
}
} -
Response
401 Unauthorized{
"Code": 401,
"Message": ""
} -
Response
404 Not FoundNot supported or no available data.
-
Response
422 Unprocessable EntityThe request has been applied but got errors.
{
"errors": {
"GPIO": ""
}
}
PUT /platform/api/perif/gpio/:id/dir
Set the specified GPIO pin (by index :id) direction.
-
Request Headers
Log in with your OS account or the
adminaccount to get the JWT token (tokenfield from the response body).Authorization: Bearer -
Request Body
0: output,1: input{
"dir": 0 | 1
} -
Response
200 OK -
Response
400 Bad RequestInvalid parameter (incorrect
:id){
"errors": {
"GPIO": "invalid parameter"
}
} -
Response
401 Unauthorized{
"Code": 401,
"Message": ""
} -
Response
404 Not FoundNot supported or no available data.
-
Response
422 Unprocessable EntityThe request body has missing parameters.
{
"errors": {
"validator": ""
}
} -
Response
422 Unprocessable EntityThe request has been applied but got errors.
{
"errors": {
"GPIO": ""
}
}
GET /platform/api/perif/gpio/:id/level
Get the specified GPIO pin (by index :id) level.
0: low, 1: high
-
Request Headers
Log in with your OS account or the
adminaccount to get the JWT token (tokenfield from the response body).Authorization: Bearer -
Response
200 OK{
"level": 0, // level. 0: low, 1: high
}, -
Response
400 Bad RequestInvalid parameter (incorrect
:id){
"errors": {
"GPIO": "invalid parameter"
}
} -
Response
401 Unauthorized{
"Code": 401,
"Message": ""
} -
Response
404 Not FoundNot supported or no available data.
-
Response
422 Unprocessable EntityThe request has been applied but got errors.
{
"errors": {
"GPIO": ""
}
}
PUT /platform/api/perif/gpio/:id/level
Set the specified GPO pin (by index :id) level.
-
Request Headers
Log in with your OS account or the
adminaccount to get the JWT token (tokenfield from the response body).Authorization: Bearer -
Request Body
0: low,1: high{
"level": 0 | 1
} -
Response
200 OK -
Response
400 Bad RequestInvalid parameter (incorrect
:id){
"errors": {
"GPIO": "invalid parameter"
}
} -
Response
401 Unauthorized{
"Code": 401,
"Message": ""
} -
Response
404 Not FoundNot supported or no available data.
-
Response
422 Unprocessable EntityThe request body has missing parameters.
{
"errors": {
"validator": ""
}
} -
Response
422 Unprocessable EntityThe request has been applied but got errors.
{
"errors": {
"GPIO": ""
}
}
Brightness
(since rest-server v0.16.1)
GET /platform/api/perif/brightness
Get the brightness information, including brightness minimum, maximum, and value.
-
Request Headers
Log in with your OS account or the
adminaccount to get the JWT token (tokenfield from the response body).Authorization: Bearer -
Response
200 OK{
"min": 0, // the supported minimum brightness value
"max": 9, // the supported maximum brightness value
"value": 5, // the current brightness value
}, -
Response
401 Unauthorized{
"Code": 401,
"Message": ""
} -
Response
422 Unprocessable EntityThe request has been applied but got errors.
{
"errors": {
"Brightness": ""
}
}
PUT /platform/api/perif/brightness
Set the brightness value.
-
Request Headers
Log in with your OS account or the
adminaccount to get the JWT token (tokenfield from the response body).Authorization: Bearer -
Request Body
{
"value": 1
} -
Response
200 OK -
Response
401 Unauthorized{
"Code": 401,
"Message": ""
} -
Response
422 Unprocessable EntityThe request has been applied but got errors.
{
"errors": {
"Brightness": ""
}
}
Networking
GET /platform/api/networking/interfaces
Get network adapters' information and the current IP configuration.
-
Request Headers
Log in with your OS account or the
adminaccount to get the JWT token (tokenfield from the response body).Authorization: Bearer -
Response
200 OKEmpty if there is no network adapter found.
```json
[ { "ifIndex": 2, "uuid": "enp0s31f6", "name": "enp0s31f6", "description": "", "type": "Ethernet", "typeId": 1, "mtu": 1500, "connected": true, "isDefault": false, "hardwareAddress": "xx:xx:xx:xx:xx:xx", "speed": "1 Gbps", "sendSpeed": 1000000000, "recvSpeed": 1000000000, "addresses": [ "172.16.12.91/23", "fe80::6543:2799:56b0:78b/64" ], "gateway": [ "192.168.6.1" ], "dns": [ "192.168.6.1" ], "iocounters": { "ifindex": 2, "bytesSent": 518832090, "bytesRecv": 5103663236, "packetsSent": 593021, "packetsRecv": 58711134, "errin": 0, "errout": 0, "dropin": 0, "dropout": 0, "fifoin": 0, "fifoout": 0 } }, { "ifIndex": 3, "uuid": "enp1s0", "name": "enp1s0", "description": "", "type": "Wi-Fi", "typeId": 71, "mtu": 1500, "connected": false, "isDefault": false, "hardwareAddress": "xx:xx:xx:xx:xx:xx" },
]
-
Response
401 Unauthorized{
"Code": 401,
"Message": ""
}
GET /platform/api/networking/interfaces (SSE)
Get network adapters' information and the current IP configuration via Server-Sent Events (SSE).
-
EventStream
event: message
data: [{"ifIndex":17,"uuid":"{B30C1205-A9C3-4155-9E01-0AB4D5A36DB4}","name":"Ethernet 4","description":"Intel(R) Ethernet Connection I219-LM","type":"Ethernet","typeId":6,"mtu":1500,"connected":true,"isDefault":false,"dhcpEnabled":true,"hardwareAddress":"74:FE:48:05:0A:EE","sendSpeed":1000000000,"recvSpeed":1000000000,"addresses":["172.16.12.60/23","fe80::4013:3d5e:69a7:460a/64"],"gateway":["172.16.13.254"],"dns":["172.20.1.99","8.8.8.8"],"dnssuffix":"ADVANTECH.CORP","ipv4Metric":1,"ipv6Metric":25,"iocounters":{"ifindex":17,"bytesSent":2721740020,"bytesRecv":6232829747,"packetsSent":4159260,"packetsRecv":3706395,"errin":0,"errout":0,"dropin":0,"dropout":0,"fifoin":0,"fifoout":0}},...]
POST /platform/api/networking/interfaces/route
Change the sequence of the network interface route (metric).
-
Request Headers
Log in with your OS account or the
adminaccount to get the JWT token (tokenfield from the response body).Authorization: Bearer -
Request Body
The
sortedGUIDListis an interface uuid list by order of priority.{
"ipv6": false,
"sortedGUIDList": [
"{B30C1205-A9C3-4155-9E01-0AB4D5A36DB4}",
"{53E59828-224E-4416-9A05-DE95EB7F4C4A}",
"{EFCDC03D-30CA-434D-B284-DB517179D7FD}",
"{D1A142DB-C5F9-40D4-9F1B-A1FE2BE89C33}",
"{5A0E29AC-4767-4EAB-A2F5-F718F343B198}",
"{D09F45AC-3A17-4012-B278-45B923978278}",
"{94CDC116-21A5-4419-90AF-F0626B643566}",
"{1BB8C682-3B29-47A6-9504-44542CAF918E}"
]
} -
Response
201 Created -
Response
400 Bad RequestThe request has been applied but got errors.
{
"errors": {
"networking": ""
}
} -
Response
401 Unauthorized{
"Code": 401,
"Message": ""
} -
Response
422 Unprocessable EntityThe request body has missing parameters.
{
"errors": {
"validator": ""
}
}The
sortedGUIDListis empty or not provided.{
"errors": {
"networking": "empty list"
}
}
PUT /platform/api/networking/ipv4config/:ifIndex
Sets the IPv4 configuration with static IP and DNS. You can call GET /platform/api/networking/interfaces to get the ifIndex.
-
Request Headers
Log in with your OS account or the
adminaccount to get the JWT token (tokenfield from the response body).Authorization: Bearer -
Request Body
{
"ipAddress": "xxx.xxx.xxx.xxx",
"subnetMask": "xxx.xxx.xxx.xxx",
"defaultGateway": "xxx.xxx.xxx.xxx",
"primaryDNS": "xxx.xxx.xxx.xxx",
"secondaryDNS": null // optional
}
- Response
200 OK
{
"ipAddress": "",
"subnetMask": "",
"defaultGateway": "",
"primaryDNS": "",
"secondaryDNS": ""
}
-
Response
422 Unprocessable EntityThe request body has missing parameters.
{
"errors": {
"validator": ""
}
}The request has been applied but got errors.
{
"errors": {
"Net": ""
}
}
DELETE /platform/api/networking/ipv4config/:ifIndex
Enable DHCP for the specified interface. You can call GET /platform/api/networking/interfaces to get the ifIndex.
-
Request Headers
Log in with your OS account or the
adminaccount to get the JWT token (tokenfield from the response body).Authorization: Bearer -
Response
200 OK -
Response
422 Unprocessable EntityThere are missing parameters.
{
"errors": {
"Net": ""
}
}The request has been applied but got errors.
{
"errors": {
"Net": ""
}
}
GET /platform/api/networking/wifi/interfaces
Get Wi-Fi adapters information.
-
Request Headers
Log in with your OS account or the
adminaccount to get the JWT token (tokenfield from the response body).Authorization: Bearer -
Response
200 OKEmpty if there is no network adapter found.
```json
[ { "ifIndex": 14, "uuid": "{94CDC116-21A5-4419-90AF-F0626B643566}", "description": "802.11n USB Wireless LAN Card", "profiles": [ { "name": "SQA_2.4G", "allUserProfile": true, "groupPolicyProfile": false, "perUserProfile": false } ]
}
]
-
Response
401 Unauthorized{
"Code": 401,
"Message": ""
}
GET /platform/api/networking/wifi/networks/:uuid
Get a list of all available networks of the specified Wi-Fi adapter selected by uuid.
-
Request Headers
Log in with your OS account or the
adminaccount to get the JWT token (tokenfield from the response body).Authorization: Bearer -
Response
200 OKEmpty if there is no available network found.
```json
[ { "alreadyConnected": true, "authenticationAlgorithm": "WPA2-Personal", "channel": 7, "cipherAlgorithm": "AES", "connectable": true, "infrastructureType": "Infrastructure", "profileAvailable": true, "profileName": "SQA_2.4G", "ssid": "SQA_2.4G", "securityEnabled": true, "signalQuality": 100, "signalStrength": -50, "bssid": "E0:3F:49:00:04:30", "physicalTypes": [ "802.11n" ]
},
{
"alreadyConnected": false,
"authenticationAlgorithm": "WPA2-Personal",
"cipherAlgorithm": "AES",
"connectable": true,
"infrastructureType": "Infrastructure",
"profileAvailable": false,
"profileName": "",
"ssid": "FIVEGGGGGHZ",
"securityEnabled": true,
"signalQuality": 30,
"signalStrength": -85,
"physicalTypes": [
"802.11ac"
]
},
...
]
-
Response
401 Unauthorized{
"Code": 401,
"Message": ""
} -
Response
422 Unprocessable EntityThe request has been applied but got errors.
{
"errors": {
"WiFi": ""
}
}
DELETE /platform/api/networking/wifi/interface/:uuid/profile/:name
Delete the connected network profile (selected by profile name) of the specified Wi-Fi interface (selected by uuid)
-
Request Headers
Log in with your OS account or the
adminaccount to get the JWT token (tokenfield from the response body).Authorization: Bearer -
Response
200 OKProfile deleted.
-
Response
400 Bad RequestThe profile name is empty.
{
"errors": {
"WiFi": "invalid profile name"
}
} -
Response
401 Unauthorized{
"Code": 401,
"Message": ""
} -
Response
422 Unprocessable EntityThe request has been applied but got errors.
{
"errors": {
"WiFi": ""
}
}
Process Manager
GET /platform/api/processes
Get running processes list.
-
Request Headers
Log in with your OS account or the
adminaccount to get the JWT token (tokenfield from the response body).Authorization: Bearer -
Response
200 OKEmpty if there is no running process found.
```json
[ { "pid": 1, "name": "systemd", "numThreads": 1, "memUsage": 9187328, "cpuPercent": 0.0010817868420981225, "username": "root", "elapsedTime": 1191547, "path": "/lib/systemd/systemd", "cmdline": "/sbin/init splash" }, { "pid": 2, "name": "kthreadd", "numThreads": 1, "memUsage": 0, "cpuPercent": 0.000013427920447930759, "username": "root", "elapsedTime": 1191547 }, ... ]
-
Response
401 Unauthorized{
"Code": 401,
"Message": ""
} -
Response
404 Not FoundNot supported or no available data.
GET /platform/api/processes (SSE)
Get running processes list via Server-Sent Events (SSE)
-
EventStream
event: message
data: [{"pid":4,"name":"System","numThreads":169,"memUsage":20480,"cpuPercent":6,"username":"NT AUTHORITY\\SYSTEM","elapsedTime":876611},{"pid":56,"ppid":4,"name":"Secure System","memUsage":23273472,"cpuPercent":0,"username":"NT AUTHORITY\\SYSTEM","elapsedTime":876613},{"pid":100,"ppid":4,"name":"Registry","numThreads":4,"memUsage":208896,"cpuPercent":0,"username":"NT AUTHORITY\\SYSTEM","elapsedTime":876612},{"pid":416,"ppid":4,"name":"smss.exe","numThreads":2,"memUsage":98304,"cpuPercent":0,"username":"NT AUTHORITY\\SYSTEM","elapsedTime":876611},{"pid":604,"ppid":572,"name":"csrss.exe","numThreads":12,"memUsage":671744,"cpuPercent":0,"username":"NT AUTHORITY\\SYSTEM","elapsedTime":876609}, ...]
DELETE /platform/api/processes/:pid
Kill the selected process (selected by pid)
-
Request Headers
Log in with your OS account or the
adminaccount to get the JWT token (tokenfield from the response body).Authorization: Bearer -
Response
200 OKProfile deleted.
-
Response
400 Bad RequestThe :pid is not a valid value.
{
"errors": {
"Processes": "Invalid PID"
}
} -
Response
401 Unauthorized{
"Code": 401,
"Message": ""
} -
Response
422 Unprocessable EntityThe request has been applied but got errors.
{
"errors": {
"Processes": ""
}
}
Remote Control
POST /platform/api/control/reboot
Restart the target computer. It requires Admin permission.
-
Request Headers
Log in with your OS account or the
adminaccount to get the JWT token (tokenfield from the response body).Authorization: Bearer -
Response
200 OK -
Response
401 Unauthorized{
"Code": 401,
"Message": ""
} -
Response
403 ForbiddenThe login user has no permission to reboot the target computer.
-
Response
422 Unprocessable EntityThe request has been applied but got errors.
{
"errors": {
"Control": ""
}
}
POST /platform/api/control/shutdown
Shut down the target computer. It requires Admin permission.
-
Request Headers
Log in with your OS account or the
adminaccount to get the JWT token (tokenfield from the response body).Authorization: Bearer -
Response
200 OK -
Response
401 Unauthorized{
"Code": 401,
"Message": ""
} -
Response
403 ForbiddenThe login user has no permission to shut down the target computer.
-
Response
422 Unprocessable EntityThe request has been applied but got errors.
{
"errors": {
"Control": ""
}
}
GET /platform/api/control/display
Check whether the target computer supports the display on/off feature. (since rest-server 1.0.1)
-
Request Headers
Log in with your OS account or the
adminaccount to get the JWT token (tokenfield from the response body).Authorization: Bearer -
Response
204 No ContentThe target computer supports the display on/off feature.
-
Response
401 Unauthorized{
"Code": 401,
"Message": ""
} -
Response
404 Not FoundThe target computer does not support the display on/off feature.
PUT /platform/api/control/display
Turn the display of the target computer on or off. (since rest-server 1.0.1)
-
Request Headers
Log in with your OS account or the
adminaccount to get the JWT token (tokenfield from the response body).Authorization: Bearer -
Request Body
{
"status": "on" | "off"
} -
Response
200 OK -
Response
401 Unauthorized{
"Code": 401,
"Message": ""
} -
Response
422 Unprocessable EntityThe request has been applied but got errors.
{
"errors": {
"Control": ""
}
}
Remote Desktop
POST /platform/api/rdesk/config
Gets the remote desktop connection information via WebSocket.
-
Request Headers
- Include a valid JWT token obtained by logging in with the OS or "admin" account.
Authorization: Bearer -
Response Codes
-
200 OK(Success)- Response body contains:
id(string): The unique identifier (UUID) for the remote desktop connection.os(string, optional): Operating system of the remote desktop (e.g., "windows", "linux").password(string): The password for the remote desktop connection.
{
"id": "5b306b78-d720-4dac-984e-a1f1ca9cd963",
"os": "windows",
"password": "EmzE4lo0"
} - Response body contains:
-
401 Unauthorized(Authentication failure){
"Code": 401,
"Message": ""
} -
422 Unprocessable Entity(Invalid request){
"message": ""
}
-
GET wss://[host:port]/platform/api/rdesk/:id
Opens a WebSocket connection to communicate with the VNC server for the specified remote desktop.
-
Request Parameters
:id(string): The unique identifier (UUID) obtained from the response body of thePOST /platform/api/rdesk/configendpoint. This ID identifies the specific remote desktop connection.
-
Request Headers
- Include a valid JWT token obtained by logging in with the OS or "admin" account.
Authorization: Bearer -
Message Description
The WebSocket connection uses a binary message format to proxy data between the client and the VNC server. The specific format of these messages depends on the VNC protocol version used by the server.
- Consult the VNC protocol specifications (https://tools.ietf.org/html/rfc6143) for detailed information about message structure and data types.
Client-Side Considerations
- Utilize the noVNC client-side library (https://github.com/novnc) to establish the WebSocket connection and handle binary VNC message communication.
- Refer to the noVNC documentation for specific integration and usage instructions.
Events
GET /platform/api/events (SSE)
Get all available Server-Sent Events (SSE), including the following events (event type).
- diskdrives
- hwmon
- netifaces
- processes
- pwrstatus
- snmptrap
- systemperf
EventStream
event:
data:
Example
-
Login with your OS account to get the JWT token (
tokenfield from the response body). -
addEventListener
const eventSource = new EventSource(`/platform/api/ events?token=`, { withCredentials: true });
eventSource.addEventListener(, (event) => {
const data = JSON.parse(event.data);
// process your data
});
ETP
GET /platform/api/etp/devicedata
Get ETP device data.
-
Request Headers
Log in with your OS account or the
adminaccount to get the JWT token (tokenfield from the response body).Authorization: Bearer -
Response
200 OK{
"modelName": "XXXXX",
"serialNumber": "Default string",
"boardVersion": "Default string",
"uuid": "00020003-0004-0005-0006-000700080009",
"version": ""
} -
Response
401 Unauthorized{
"Code": 401,
"Message": ""
} -
Response
204 No ContentNot supported or no available data.
GET /platform/api/etp/userdata
Get ETP user's data.
-
Request Headers
Log in with your OS account or the
adminaccount to get the JWT token (tokenfield from the response body).Authorization: Bearer -
Response
200 OK{
"data": {
"userSpace1": "",
"userSpace2": ""
},
"locked": true | false
} -
Response
400 Bad RequestThe request has been applied but got errors.
{
"errors": {
"ETP": ""
}
} -
Response
401 Unauthorized{
"Code": 401,
"Message": ""
} -
Response
404 Not FoundNot supported or no available data.
{
"errors": {
"ETP": ""
}
}
GET /platform/api/etp/userdata/lockstatus
Get ETP user data area lockstatus.
-
Request Headers
Log in with your OS account or the
adminaccount to get the JWT token (tokenfield from the response body).Authorization: Bearer -
Response
200 OK{
"locked": true | false
} -
Response
400 Bad RequestThe request has been applied but got errors.
{
"errors": {
"ETP": ""
}
} -
Response
401 Unauthorized{
"Code": 401,
"Message": ""
} -
Response
404 Not FoundNot supported or no available data.
{
"errors": {
"ETP": ""
}
}
PUT /platform/api/etp/userdata
Set ETP user's data.
-
Request Headers
Log in with your OS account or the
adminaccount to get the JWT token (tokenfield from the response body).Authorization: Bearer -
Request Body
The maximum length of userSpace1 and userSpace2 is 128 bytes. (RAW data)
{
"userSpace1": "",
"userSpace2": ""
} -
Response
200 OK{
"userSpace1": "",
"userSpace2": ""
} -
Response
400 Bad RequestThe request has been applied but got errors.
{
"errors": {
"ETP": ""
}
} -
Response
401 Unauthorized{
"Code": 401,
"Message": ""
} -
Response
404 Not FoundNot supported.
{
"errors": {
"ETP": ""
}
} -
Response
422 Unprocessable EntityThe request body has missing parameters.
{
"errors": {
"validator": ""
}
}The
userSpace1oruserSpace2raw data length is out of range (128 bytes).{
"errors": {
"ETP": "The maximum length of UserSpace1 is 128"
}
}
PUT /platform/api/etp/userdata/lockstatus
Lock or unlock the ETP user's data area.
-
Request Headers
Log in with your OS account or the
adminaccount to get the JWT token (tokenfield from the response body).Authorization: Bearer -
Request Body
The maximum length of password is 8 byre.
{
"locked": true | false,
"password": ""
} -
Response
200 OK{
"locked": true | false, // same as request body
} -
Response
400 Bad RequestThe request has been applied but got errors.
{
"errors": {
"ETP": ""
}
} -
Response
401 Unauthorized{
"Code": 401,
"Message": ""
} -
Response
404 Not FoundNot supported.
{
"errors": {
"ETP": ""
}
} -
Response
422 Unprocessable EntityThe request body has missing parameters.
{
"errors": {
"validator": ""
}
}The
passwordlength is out of range (1~8 bytes).{
"errors": {
"ETP": ""
}
}
EdgeHub
GET /edgehub/api/ping
Ping the server to see if it is still alive.
-
Response
200 OK-
Body
pong
-
GET /edgehub/api/agentinfo
Get the agent information. (since v0.15.1)
-
Response
200 OKRequest Successfully
-
Body
{
"version":"v0.15.1"
}
-
GET /edgehub/api/macaddr
Get MAC address for device registration.
-
Request Headers
Log in with your OS account or the
adminaccount to get the JWT token (tokenfield from the response body).Authorization: Bearer -
Response
200 OK"XX:XX:XX:XX:XX:XX" -
Response
401 Unauthorized{
"Code": 401,
"Message": ""
} -
Response
404 Not FoundNo available data.
-
Response
422 Unprocessable EntityThe request has been applied but got errors.
{
"message": ""
}
GET /edgehub/api/connection
Get connection status.
-
Request Headers
Log in with your OS account or the
adminaccount to get the JWT token (tokenfield from the response body).Authorization: Bearer -
Response
200 OK{
"enabled": true | false,
"status": "connected | disconnected",
"certRevoked": true | false, // since 1.2.0
"stormDetected": true | false // since 1.3.1
}certRevoked: indicates whether the certificates are revoked or notstormDetected: indicates whether there is a connection storm -
Response
401 Unauthorized{
"Code": 401,
"Message": ""
}
POST /edgehub/api/connection
Enable or Disable to the device connection.
-
Request Headers
Log in with your OS account or the
adminaccount to get the JWT token (tokenfield from the response body).Authorization: Bearer -
Request Body
conncfgis optional.If the
opis "connect" and theconncfghas been provided, it will set the connection setting first, then enable the connection to the cloud; if theconncfgis not provided, it will enable the connection only.If the
opis "disconnect", it will disable the cloud connection.conncfgwill be ignored.{
"op": "connect | disconnect",
"conncfg": {
"username": "",
"password": "",
"mqttHost": "",
"mqttPort": 1883,
"enableTLS": true | false,
"overWebSocket": true | false,
"connectionString": "", // optional
"mac": "AABBCCDDEEFF", // optional,
"uuid": "123e4567-e89b-12d3-a456-426614174000", // optional
"deviceon": { // optional (since edgehub-agent 1.0.1)
"dccsUrl": "",
"iotKey": ""
}
}
}or
{
"op": "connect | disconnect",
"conncfg": {
// (since edgehub-agent 1.1.0)
"deviceTokenCredential": "",
"skipCertVerify": true | false,
"deviceon": { // optional (since edgehub-agent 1.0.1)
"dccsUrl": "",
"iotKey": ""
}
}
} -
Response
200 OK -
Response
401 Unauthorized{
"Code": 401,
"Message": ""
} -
Response
404 Not FoundNo available data.
-
Response
422 Unprocessable EntityThe request has been applied but got errors.
{
"message": ""
}
GET /edgehub/api/conncfg
Get the current device connection setting.
-
Request Headers
Log in with your OS account or the
adminaccount to get the JWT token (tokenfield from the response body).Authorization: Bearer -
Response
200 OK{
"username": "",
"password": "",
"mqttHost": "",
"mqttPort": 1883,
"enableTLS": true | false,
"overWebSocket": true | false,
"connectionString": "", // optional
"mac": "AABBCCDDEEFF", // optional,
"uuid": "123e4567-e89b-12d3-a456-426614174000", // optional,
"skipCertVerify": true | false,
// (since edgehub-agent 1.1.0)
"deviceTokenCredential": "",
"caCerts": ["", ...],
"iothubKey": "",
"iothubCert": "",
"mqttKey": "",
"mqttCert": ""
} -
Response
401 Unauthorized{
"Code": 401,
"Message": ""
} -
Response
404 Not FoundNo available data.
-
Response
422 Unprocessable EntityThe request has been applied but got errors.
{
"message": ""
}
POST /edgehub/api/conncfg
Set the connection setting.
-
Request Headers
Log in with your OS account or the
adminaccount to get the JWT token (tokenfield from the response body).Authorization: Bearer -
Request Body
{
"username": "",
"password": "",
"mqttHost": "",
"mqttPort": 1883,
"enableTLS": true | false,
"overWebSocket": true | false,
"connectionString": "", // optional
"mac": "AABBCCDDEEFF", // optional
"uuid": "123e4567-e89b-12d3-a456-426614174000", // optional
"deviceon": { // optional (since edgehub-agent 1.0.1)
"dccsUrl": "",
"iotKey": ""
}
}or
{
// (since edgehub-agent 1.1.0)
"deviceTokenCredential": "",
"deviceon": { // optional (since edgehub-agent 1.0.1)
"dccsUrl": "",
"iotKey": ""
},
"skipCertVerify": true | false,
"caCerts": ["", ...], // optional
} -
Response
200 OK{
// same as request body
} -
Response
401 Unauthorized{
"Code": 401,
"Message": ""
} -
Response
404 Not FoundNo available data.
-
Response
422 Unprocessable EntityThe request has been applied but got errors.
{
"message": ""
}
DELETE /edgehub/api/conncfg
Clear the current device connection setting.
-
Request Headers
Log in with your OS account or the
adminaccount to get the JWT token (tokenfield from the response body).Authorization: Bearer -
Response
200 OK -
Response
401 Unauthorized{
"Code": 401,
"Message": ""
} -
Response
422 Unprocessable EntityThe request has been applied but got errors.
{
"message": ""
}
GET /edgehub/api/profile
Get the EdgeHub function profile which contains the agent versions and function support status. It's will be sent to the cloud via MQTT topic Advantech//update/platform/profile (since edgehub-agent 1.0.1)
-
Request Headers
Log in with your OS account or the
adminaccount to get the JWT token (tokenfield from the response body).Authorization: Bearer -
Response
200 OK{
"agent:version:auth-server": "v1.9.1",
"agent:version:edgehub-agent": "v1.0.2",
"agent:version:edgex-helper": "v0.6.1",
"agent:version:portal-service": "v1.0.1",
"agent:version:rest-server": "v1.0.1",
"apphub": 2,
"host:display:count": 1,
"host:info": 1,
"hwmon": 1,
"ibmc": 0,
"model:name": "UNO-2484G-673xAE",
"networking:interfaces": 5,
"os": "windows",
"os:arch": "x86_64",
"os:description": "Microsoft Windows 10 Enterprise LTSC 2019",
"perif:brightness": 0,
"perif:disk": 1,
"perif:gpio:all": 0,
"perif:gpio:count": 0,
"perif:led": 0,
"perif:wdt": 1,
"perif:wdt:enabled": false,
"perif:wdt:timeoutInSeconds": 60,
"perif:wdt:timeoutMaxInSeconds": 255,
"perif:wdt:timeoutMinInSeconds": 10,
"perif:wdt:type": "EC",
"processes": 194,
"service:list": 1,
"system:ip": "172.16.12.123",
"system:mac": "00:0b:ab:12:34:56",
"systemperf": 1
} -
Response
401 Unauthorized{
"Code": 401,
"Message": ""
}
POST /edgehub/api/data
Send tag data to the cloud. (since edgehub-agent 1.0.1)
-
Request Headers
Log in with your OS account or the
adminaccount to get the JWT token (tokenfield from the response body).Authorization: Bearer -
Request Body
{
"string_data": "abcdefg...",
"number_data": 12345,
"bool_data": true,
} -
Response
201 CreatedThe data has been sent successfully.
-
Response
401 Unauthorized{
"Code": 401,
"Message": ""
} -
Response
400 Bad RequsetThe request data is empty, invalid format, or incorrect value.
{
"message": ""
} -
Response
422 Unprocessable EntityThe request has been applied but got errors.
{
"message": ""
}
GET /edgehub/api/apphub/status
Get the AppHub service running status. (since edgehub-agent 1.0.1)
-
Request Headers
Log in with your OS account or the
adminaccount to get the JWT token (tokenfield from the response body).Authorization: Bearer -
Response
200 OK{
"status": "running",
}Note: The possible
statusvalues are "unknown or not available", "running", "stopped", "**unknown status: **" -
Response
404 Not FoundIt indicates there is no AppHub service installed.
-
Response
401 Unauthorized{
"Code": 401,
"Message": ""
}
PUT /edgehub/api/apphub/service
Control the AppHub service status. (since edgehub-agent 1.0.1)
-
Request Headers
Log in with your OS account or the
adminaccount to get the JWT token (tokenfield from the response body).Authorization: Bearer -
Request Body
{
"action": "start" | "stop" | "restart"
} -
Response
204 No ContentThe requested operation is successful.
-
Response
401 Unauthorized{
"Code": 401,
"Message": ""
} -
Response
422 Unprocessable EntityThe request has been applied but got errors.
{
"message": ""
}
PUT /edgehub/api/apphub/log/config
Set up the AppHub log configuration. (since edgehub-agent 1.0.1)
-
Request Headers
Log in with your OS account or the
adminaccount to get the JWT token (tokenfield from the response body).Authorization: Bearer -
Request Body
-
Setup
logFileandlogLevelsimultaneously.{
"logFile": true | false,
"logLevel": "error" | "info"
} -
Setup
logFileonly.{
"logFile": true | false
} -
Setup
logLevelonly.{
"logLevel": "error" | "info"
}
-
-
Response
204 No ContentThe requested operation is successful.
-
Response
401 Unauthorized{
"Code": 401,
"Message": ""
} -
Response
400 Bad RequsetThe request data is empty, invalid format, or incorrect value.
{
"message": ""
} -
Response
422 Unprocessable EntityThe request has been applied but got errors.
{
"message": ""
}
GET /edgehub/api/edgebus/status
Get the EdgeBus (Embedded Broker) running status. (since edgehub-agent 1.0.1)
-
Request Headers
Log in with your OS account or the
adminaccount to get the JWT token (tokenfield from the response body).Authorization: Bearer -
Response
200 OK{
"enabled": true,
"mqttBrokerStatus": {
"version": "2.2.8",
"started": 1683597812,
"time": 1683786741,
"uptime": 188929,
"bytes_received": 1107413,
"bytes_sent": 1090102,
"clients_connected": 2,
"clients_disconnected": 0,
"clients_maximum": 2,
"clients_total": 2,
"messages_received": 10437,
"messages_sent": 10489,
"retained": 0,
"inflight": 0,
"inflight_dropped": 0,
"subscriptions": 3,
"packets_received": 23949,
"packets_sent": 24001,
"memory_alloc": 7553024,
"threads": 75
},
"clientStatus": "connected"
} -
Response
404 Not FoundIt indicates there is no EdgeBus service support.
-
Response
401 Unauthorized{
"Code": 401,
"Message": ""
}
PUT /edgehub/api/edgebus/config
Set up the EdgeBus (Embedded Broker) configuration. (since edgehub-agent 1.0.1)
-
Request Headers
Log in with your OS account or the
adminaccount to get the JWT token (tokenfield from the response body).Authorization: Bearer -
Request Body
Enable or Disable the EdgeBus (Embedded Broker).
{
"enabled": false
} -
Response
200 OKSame as the request body.
{
"enabled": false
} -
Response
401 Unauthorized{
"Code": 401,
"Message": ""
} -
Response
422 Unprocessable EntityThe request has been applied but got errors.
{
"message": ""
}
POST /edgehub/api/pem/temp
Upload a PEM file and encode it to a base64 string if the file is valid. (since edgehub-agent 1.1.0)
-
Request Headers
Log in with your OS account or the
adminaccount to get the JWT token (tokenfield from the response body).Authorization: Bearer -
Request Body
The request body must be multipart/form-data with a field name
fileand the value is the File containing the PEM data to upload. -
Response
200 OKThe
typeis the PEM file type, such asCERTIFICATE,PRIVATE KEY. Thedatais the base64-encoded PEM file content.{
"type": "CERTIFICATE",
"data": ""
} -
Response
401 Unauthorized{
"Code": 401,
"Message": ""
} -
Response
422 Unprocessable EntityThe request has been applied but got errors.
{
"message": ""
}
PUT /edgehub/api/bootstrap/config
Set up the EdgeHub Mass Deployment configuration. (since edgehub-agent 1.5.1, edgehub-suite 1.4.0)
-
Request Headers
Log in with the OS or the "admin" account to get a JWT token (
tokenfield from the response body).Authorization: Bearer -
Request Body
The request body should contain the tenant access token obtained from the EdgeHub Mass Deployment tab.
{
"tenantToken": "eyJ0eXA..."
}tenantToken: The access token for the specific tenant you want to configure for mass deployment.
-
Response
201 CreatedThe configuration has been successfully applied.
-
Response
401 Unauthorized{
"Code": 401,
"Message": ""
} -
Response
422 Unprocessable EntityThe request could not be processed due to invalid configuration data. The response will include a JSON object with:
message: A specific error message detailing the configuration error.
{
"message": ""
}