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": ""
}
}