Download OpenAPI specification:Download
| acceptEULA | boolean |
| name required | string [ 1 .. 64 ] characters ^[a-zA-Z0-9]+[a-zA-Z0-9+=,.@_-]{0,63}$ |
| password required | string <password> [ 8 .. 256 ] characters ^[\S]{8,256}$ |
{- "acceptEULA": true,
- "name": "admin",
- "password": "moxa1234"
}{- "data": {
- "token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6MSwicm9sZSI6InRlc3QiLCJpYXQiOjE1NjM0MjA5MTQsImV4cCI6NDcxNzAyMDkxNH0.7oGA1VHBingnzeG7hHgWEiZ4JmoserFguyeb7_GUK6E",
- "user": {
- "createdAt": "2019-09-24T05:52:28.912234779Z",
- "description": null,
- "email": null,
- "id": 1,
- "isActive": true,
- "loginAt": "0001-01-01T00:00:00Z",
- "name": "admin",
- "passwordChangedAt": null,
- "permissions": [
- "SYS_MAINTENANCE_RW",
- "SYS_ACCOUNT_RW"
], - "roles": [
- {
- "id": 1,
- "name": "Administrator"
}
]
}
}
}Get system general configuration.
{- "data": {
- "biosVersion": "1.0.0S01",
- "cpu": "ARMv7 Processor rev 2 (v7l)",
- "description": "This is My Thingspro Edge.",
- "disk": [
- {
- "device": "/dev/root",
- "free": 1905097752,
- "mount": "/",
- "name": "System",
- "percent": 35.5,
- "tags": {
- "free": "systemDiskFree",
- "percent": "systemDiskPercent",
- "used": "systemDiskUsed"
}, - "total": 3206059008,
- "used": 1138657820
}
], - "firmwareVersion": "1.0.0",
- "hostName": "Moxa",
- "lastBootTime": "2019-06-27T10:10:16+08:00",
- "memorySize": 1056120832,
- "modelName": "UC-8112A-ME-T-LX-EU",
- "serialNumber": "IMOXA1234567",
- "softwareVersion": "1.0.0"
}
}Update system general configuration.
| description | string <= 512 This is My Thingspro Edge. |
| hostName | string [ 1 .. 64 ] ^[a-zA-Z]([a-zA-Z0-9-]*[a-zA-Z0-9])?(\.[a-zA-... device hostname. |
{- "description": "This is My Thingspro Edge."
}{- "data": {
- "biosVersion": "1.0.0S01",
- "cpu": "ARMv7 Processor rev 2 (v7l)",
- "description": "This is My Thingspro Edge.",
- "disk": [
- {
- "device": "/dev/root",
- "free": 1905097752,
- "mount": "/",
- "name": "System",
- "percent": 35.5,
- "tags": {
- "free": "systemDiskFree",
- "percent": "systemDiskPercent",
- "used": "systemDiskUsed"
}, - "total": 3206059008,
- "used": 1138657820
}
], - "firmwareVersion": "1.0.0",
- "hostName": "MyHost",
- "lastBootTime": "2019-06-27T10:10:16+08:00",
- "memorySize": 1056120832,
- "modelName": "UC-8112A-ME-T-LX-EU",
- "serialNumber": "IMOXA1234567",
- "softwareVersion": "1.0.0"
}
}Get system time configuration.
{- "data": {
- "lastUpdateTime": "-",
- "ntp": {
- "enable": false,
- "interval": 86400,
- "server": "time.cloudflare.co",
- "source": "sntp"
}, - "time": "2015-03-26T16:27:48+08:00",
- "timezone": "Asia/Taipei"
}
}Update system time configuration.
object | |
| time | string [ 20 .. 35 ] characters Current system time (format: RFC3339). |
| timezone | string [ 1 .. 64 ] characters device timezone. |
{- "ntp": {
- "enable": true,
- "gpsLongJump": true,
- "interval": 6000,
- "server": "",
- "source": "gps"
}
}{- "data": {
- "lastUpdateTime": "-",
- "ntp": {
- "enable": true,
- "gpsLongJump": true,
- "interval": 6000,
- "server": "",
- "source": "gps"
}, - "time": "2015-03-26T16:27:48+08:00",
- "timezone": "Asia/Taipei"
}
}Get current timezone information
{- "data": {
- "iso3166": [
- {
- "cca2": "AD",
- "name": "Andorra"
}, - {
- "cca2": "AE",
- "name": "United Arab Emirates"
}, - {
- "cca2": "AF",
- "name": "Afghanistan"
}
], - "zone": [
- {
- "cca2": "AD",
- "name": "Europe/Andorra",
- "offset": "+0100"
}, - {
- "cca2": "AE",
- "name": "Asia/Dubai",
- "offset": "+0400"
}, - {
- "cca2": "AF",
- "name": "Asia/Kabul",
- "offset": "+0430"
}
]
}
}Patch gps configuration.
object (ThingsPro Ethernet API_GpsLocation) Location information, with | |
| mode required | string Enum: "manual" "auto" gps mode. |
{- "mode": "auto"
}{- "data": {
- "location": {
- "lat": 0,
- "lng": 0
}, - "mode": "auto",
- "supportAuto": true
}
}Get serial interfaces configuration.
{- "count": 2,
- "data": [
- {
- "baudRate": 9600,
- "capabilities": {
- "baudRate": {
- "range": [
- 300,
- 600,
- 1200,
- 1800,
- 2400,
- 4800,
- 9600,
- 19200,
- 38400,
- 57600,
- 115200,
- 230400,
- 460800,
- 921600
], - "special": false
}, - "dataBits": [
- 5,
- 6,
- 7,
- 8
], - "flowControl": [
- "none",
- "hardware",
- "software"
], - "mode": [
- "rs232",
- "rs422",
- "rs4852w",
- "rs4854w"
], - "parities": [
- "none",
- "odd",
- "even",
- "space",
- "mark"
], - "stopBits": [
- 1,
- 2,
- 1.5
]
}, - "dataBits": 8,
- "device": "/dev/ttyM0",
- "displayName": "P1",
- "flowControl": "hardware",
- "id": 1,
- "mode": "rs232",
- "parity": "none",
- "stopBits": 1,
- "type": "serials"
}, - {
- "baudRate": 115200,
- "capabilities": {
- "baudRate": {
- "range": [
- 300,
- 600,
- 1200,
- 1800,
- 2400,
- 4800,
- 9600,
- 19200,
- 38400,
- 57600,
- 115200,
- 230400,
- 460800,
- 921600
], - "special": false
}, - "dataBits": [
- 5,
- 6,
- 7,
- 8
], - "flowControl": [
- "none",
- "hardware",
- "software"
], - "mode": [
- "rs232",
- "rs422",
- "rs4852w",
- "rs4854w"
], - "parities": [
- "none",
- "odd",
- "even",
- "space",
- "mark"
], - "stopBits": [
- 1,
- 2,
- 1.5
]
}, - "dataBits": 8,
- "device": "/dev/ttyM1",
- "displayName": "P2",
- "flowControl": "software",
- "id": 2,
- "mode": "rs422",
- "parity": "none",
- "stopBits": 1,
- "type": "serials"
}
]
}Update serial interfaces configuration.
| baudRate | integer baud rate |
| dataBits | integer data bits |
| flowControl | string flow control |
| id | integer Interface id. |
| mode | string Enum: "rs232" "rs422" "rs4852w" "rs4854w" Serial interface mode. |
| parity | string parity |
| stopBits | number stop bits |
[- {
- "id": 1,
- "mode": "rs232"
}, - {
- "baudRate": 19200,
- "dataBits": 8,
- "flowControl": "none",
- "id": 2,
- "mode": "rs4852w",
- "parity": "none",
- "stopBits": 1
}
]{- "count": 2,
- "data": [
- {
- "baudRate": 9600,
- "dataBits": 8,
- "device": "/dev/ttyM0",
- "displayName": "P1",
- "flowControl": "hardware",
- "id": 1,
- "mode": "rs232",
- "parity": "none",
- "stopBits": 1,
- "type": "serials"
}, - {
- "baudRate": 19200,
- "dataBits": 8,
- "device": "/dev/ttyM1",
- "displayName": "P2",
- "flowControl": "none",
- "id": 2,
- "mode": "rs4852w",
- "parity": "none",
- "stopBits": 1,
- "type": "serials"
}
]
}Get serial interface configuration.
| id required | integer Example: 1 Serial interface id. |
{- "data": {
- "baudRate": 9600,
- "capabilities": {
- "baudRate": {
- "range": [
- 300,
- 600,
- 1200,
- 1800,
- 2400,
- 4800,
- 9600,
- 19200,
- 38400,
- 57600,
- 115200,
- 230400,
- 460800,
- 921600
], - "special": false
}, - "dataBits": [
- 5,
- 6,
- 7,
- 8
], - "flowControl": [
- "none",
- "hardware",
- "software"
], - "mode": [
- "rs232",
- "rs422",
- "rs4852w",
- "rs4854w"
], - "parities": [
- "none",
- "odd",
- "even",
- "space",
- "mark"
], - "stopBits": [
- 1,
- 2,
- 1.5
]
}, - "dataBits": 8,
- "device": "/dev/ttyM0",
- "displayName": "P1",
- "flowControl": "hardware",
- "id": 1,
- "mode": "rs232",
- "parity": "none",
- "stopBits": 1,
- "type": "serials"
}
}Update serial interface configuration.
| id required | integer Example: 1 Serial interface id. |
| baudRate | integer baud rate |
| dataBits | integer data bits |
| flowControl | string flow control |
| id | integer Interface id. |
| mode | string Enum: "rs232" "rs422" "rs4852w" "rs4854w" Serial interface mode. |
| parity | string parity |
| stopBits | number stop bits |
{- "flowControl": "software",
- "mode": "rs422"
}{- "data": {
- "baudRate": 115200,
- "dataBits": 8,
- "device": "/dev/ttyM0",
- "displayName": "P1",
- "flowControl": "software",
- "id": 1,
- "mode": "rs422",
- "parity": "none",
- "stopBits": 1,
- "type": "serial"
}
}Get information of all managed DIs
{- "count": 2,
- "data": [
- {
- "autoSampling": false,
- "channel": 1,
- "id": 1,
- "mode": "DI",
- "pollingIntervalSec": 10,
- "status": "OFF"
}, - {
- "autoSampling": false,
- "channel": 2,
- "id": 2,
- "mode": "DI",
- "pollingIntervalSec": 10,
- "status": "OFF"
}
]
}Patch to set DI by channel
| channel required | integer Example: 1 managed DI of IO channel start from 1, and mode can't be modified |
| autoSampling | boolean |
| mode | string |
| pollingIntervalSec | integer [ 5 .. 3600 ] Default: 10 |
{- "autoSampling": true
}{- "data": {
- "autoSampling": false,
- "channel": 1,
- "id": 1,
- "mode": "DI",
- "pollingIntervalSec": 10,
- "status": "OFF"
}
}Get information of all managed DOs
{- "count": 2,
- "data": [
- {
- "channel": 1,
- "id": 1,
- "initStatus": "OFF",
- "mode": "DO",
- "status": "OFF"
}, - {
- "channel": 2,
- "id": 2,
- "initStatus": "OFF",
- "mode": "DO",
- "status": "OFF"
}
]
}Patch to set DO by channel
| channel required | integer Example: 1 managed DO of IO channel start from 1, and mode can't be modified |
| initStatus | string Enum: "ON" "OFF" |
| mode | string |
| status | string Enum: "ON" "OFF" |
{- "initStatus": "OFF",
- "status": "OFF"
}{- "data": {
- "channel": 1,
- "id": 1,
- "initStatus": "OFF",
- "mode": "DO",
- "status": "OFF"
}
}Get device route configuration of wan.
{- "data": {
- "displayName": "LAN1",
- "dns": [
- "192.168.3.1"
], - "gateway": "192.168.3.254",
- "ip": "192.168.3.127",
- "name": "enp0s31f6",
- "netmask": "255.255.255.0"
}
}Update device route configuration. Even if the device does not have a cellular or WiFi module, it is still necessary to input and configure the settings as fixed value.
| priorityList | Array of strings[ items [ 2 .. 15 ] characters [A-Za-z0-9_-]+ ] |
{- "priorityList": [
- "Cellular",
- "WiFi",
- "LAN1"
]
}{- "data": {
- "priorityList": [
- "Cellular",
- "WiFi",
- "LAN1"
]
}
}Get ethernet interfaces configuration.
{- "count": 1,
- "data": [
- {
- "dhcpServer": {
- "enable": false,
- "endIp": "",
- "leaseTime": {
- "hours": 0,
- "infinite": false
}, - "startIp": "",
- "status": false
}, - "displayName": "LAN1",
- "dns": [
- "8.8.8.8",
- "4.4.4.4"
], - "enable": true,
- "enableDhcp": false,
- "gateway": "192.168.3.254",
- "id": 1,
- "ip": "192.168.3.100",
- "linkSpeed": 1000,
- "mac": "00:90:e8:12:34:56",
- "name": "eth0",
- "netmask": "255.255.255.0",
- "status": "connected",
- "wan": true
}
]
}Update ethernet interface configuration.
Array of objects |
[- {
- "enable": true,
- "enableDhcp": true,
- "id": 1,
- "wan": true
}
]{- "data": {
- "dhcpServer": {
- "enable": false,
- "endIp": "",
- "leaseTime": {
- "hours": 0,
- "infinite": false
}, - "startIp": "",
- "status": false
}, - "displayName": "LAN1",
- "dns": [
- "8.8.8.8",
- "4.4.4.4"
], - "enable": true,
- "enableDhcp": true,
- "gateway": "192.168.3.254",
- "id": 1,
- "ip": "192.168.3.100",
- "mac": "00:90:e8:12:34:56",
- "name": "eth0",
- "netmask": "255.255.255.0",
- "status": "connected",
- "wan": true
}
}Get ethernet interface configuration.
| id required | integer Example: 1 Ethernet interface id. |
{- "data": {
- "dhcpServer": {
- "enable": false,
- "endIp": "",
- "leaseTime": {
- "hours": 0,
- "infinite": false
}, - "startIp": "",
- "status": false
}, - "displayName": "LAN1",
- "dns": [
- "8.8.8.8",
- "4.4.4.4"
], - "enable": true,
- "enableDhcp": false,
- "gateway": "192.168.3.254",
- "id": 1,
- "ip": "192.168.3.100",
- "linkSpeed": 1000,
- "mac": "00:90:e8:12:34:56",
- "name": "eth0",
- "netmask": "255.255.255.0",
- "status": "connected",
- "wan": true
}
}Update ethernet interface configuration.
| id required | integer Example: 1 Ethernet interface id. |
| enable required | boolean Set interface UP. |
| enableDhcp required | boolean Enable ( |
| id | integer >= 1 Identifier of an Ethernet interface. |
| wan required | boolean Define the interface type is WAN ( |
{- "enable": true,
- "enableDhcp": true,
- "wan": true
}{- "data": {
- "dhcpServer": {
- "enable": false,
- "endIp": "",
- "leaseTime": {
- "hours": 0,
- "infinite": false
}, - "startIp": "",
- "status": false
}, - "displayName": "LAN1",
- "dns": [
- "8.8.8.8",
- "4.4.4.4"
], - "enable": true,
- "enableDhcp": true,
- "gateway": "192.168.3.254",
- "id": 1,
- "ip": "192.168.3.100",
- "linkSpeed": 1000,
- "mac": "00:90:e8:12:34:56",
- "name": "eth0",
- "netmask": "255.255.255.0",
- "status": "connected",
- "wan": true
}
}Get cellular interfaces configuration.
{- "count": 1,
- "data": [
- {
- "capabilities": {
- "sim": 1
}, - "cellId": "6326",
- "checkalive": {
- "enable": true,
- "intervalSec": 60,
- "targetHost": "8.8.8.8"
}, - "currentProfileName": "Profile-1",
- "displayName": "Cellular1",
- "dns": [ ],
- "enable": false,
- "gateway": "",
- "iccId": "89886971410730170000",
- "id": 1,
- "imei": "359841080332053",
- "imsi": "466977300046885",
- "ip": "",
- "lac": "11114",
- "mac": "00:00:11:12:13:14",
- "mode": "lte",
- "name": "wwan0",
- "netmask": "",
- "operatorName": "",
- "pinRetryRemain": -1,
- "profileTimeout": 120,
- "profiles": [
- {
- "name": "SIM1",
- "pdpContext": {
- "apn": "internet",
- "auth": {
- "password": "",
- "username": ""
}, - "type": "ipv4"
}, - "pinCode": "0000",
- "simSlot": 1
}
], - "signal": {
- "rsrp": 0,
- "rssi": -67
}, - "signalStrength": 4,
- "status": "ready",
- "tac": "",
- "type": "cellular"
}
]
}Update cellular interfaces configuration.
required | object (Checkalive Settings) |
| enable required | boolean Enable Cellular Networking. |
| id | integer Interface id. |
| profileTimeout required | integer [ 60 .. 3600 ] Retry timeout in seconds for switch profiles. |
required | Array of objects (Cellular Profile) Profiles for redundancy |
[- {
- "checkalive": {
- "enable": true,
- "intervalSec": 60,
- "targetHost": "8.8.8.8"
}, - "enable": true,
- "id": 1,
- "profileTimeout": 120,
- "profiles": [
- {
- "name": "SIM1",
- "pdpContext": {
- "apn": "internet",
- "auth": {
- "password": "",
- "username": ""
}, - "type": "ipv4"
}, - "pinCode": "0000",
- "simSlot": 1
}
]
}
][- {
- "checkalive": {
- "enable": true,
- "intervalSec": 60,
- "targetHost": "8.8.8.8"
}, - "displayName": "Cellular1",
- "enable": true,
- "id": 1,
- "profileTimeout": 120,
- "profiles": [
- {
- "name": "SIM1",
- "pdpContext": {
- "apn": "internet",
- "auth": {
- "password": "",
- "username": ""
}, - "type": "ipv4"
}, - "pinCode": "0000",
- "simSlot": 1
}
]
}
]Get cellular interface configuration.
| id required | integer Cellular interface id. |
{- "capabilities": {
- "sim": 1
}, - "cellId": "6326",
- "checkalive": {
- "enable": true,
- "intervalSec": 60,
- "targetHost": "8.8.8.8"
}, - "currentProfileName": "Profile-1",
- "displayName": "Cellular1",
- "dns": [ ],
- "enable": false,
- "gateway": "",
- "iccId": "89886971410730170000",
- "id": 1,
- "imei": "359841080332053",
- "imsi": "466977300046885",
- "ip": "",
- "lac": "11114",
- "mac": "00:00:11:12:13:14",
- "mode": "lte",
- "name": "wwan0",
- "netmask": "",
- "operatorName": "",
- "pinRetryRemain": -1,
- "profileTimeout": 120,
- "profiles": [
- {
- "name": "SIM1",
- "pdpContext": {
- "apn": "internet",
- "auth": {
- "password": "",
- "username": ""
}, - "type": "ipv4"
}, - "pinCode": "0000",
- "simSlot": 1
}
], - "signal": {
- "rsrp": 0,
- "rssi": -67
}, - "signalStrength": 4,
- "status": "ready",
- "tac": "",
- "type": "cellular"
}Update cellular configuration.
| id required | integer Cellular interface id. |
required | object (Checkalive Settings) |
| enable required | boolean Enable Cellular Networking. |
| id | integer Interface id. |
| profileTimeout required | integer [ 60 .. 3600 ] Retry timeout in seconds for switch profiles. |
required | Array of objects (Cellular Profile) Profiles for redundancy |
{- "checkalive": {
- "enable": true,
- "intervalSec": 60,
- "targetHost": "8.8.8.8"
}, - "enable": true,
- "profileTimeout": 120,
- "profiles": [
- {
- "name": "SIM1",
- "pdpContext": {
- "apn": "internet",
- "auth": {
- "password": "",
- "username": ""
}, - "type": "ipv4"
}, - "pinCode": "0000",
- "simSlot": 1
}
]
}{- "checkalive": {
- "enable": true,
- "intervalSec": 60,
- "targetHost": "8.8.8.8"
}, - "displayName": "Cellular1",
- "enable": true,
- "id": 1,
- "profileTimeout": 120,
- "profiles": [
- {
- "name": "SIM1",
- "pdpContext": {
- "apn": "internet",
- "auth": {
- "password": "",
- "username": ""
}, - "type": "ipv4"
}, - "pinCode": "0000",
- "simSlot": 1
}
]
}Get Wi-Fi interfaces configuration.
| event | boolean Get runtime status, ex: [{id: 1 ,client: {currentAp: "bzLJpU7MR", connectState: "connected", networks: [...]}}, {id:2,...}] |
{- "data": [
- {
- "capabilities": {
- "mode": [
- "client"
]
}, - "client": {
- "checkalive": {
- "enable": true,
- "intervalSec": 60,
- "targetHost": "8.8.8.8"
}, - "connectState": "connected",
- "currentAp": "bzLJpU7MR",
- "ipSetting": {
- "enableDhcp": true
}, - "networks": [
- {
- "band": "band50",
- "bssid": "10:c3:7b:c6:47:f8",
- "security": {
- "mode": "wpa2-personal",
- "password": "!2345678"
}, - "signal": -17,
- "ssid": "moxa-test-ap-1",
- "uuid": "bzLJpU7MR"
}, - {
- "band": "band24",
- "bssid": "",
- "security": {
- "mode": "wpa2-personal",
- "password": "!2345678"
}, - "signal": null,
- "ssid": "moxa-ap-2",
- "uuid": "kcpJpUnMR"
}
], - "priority": [
- "bzLJpU7MR, kcpJpUnMR"
]
}, - "displayName": "WiFi2",
- "enable": true,
- "id": 1,
- "mode": "client",
- "name": "wlan0"
}
]
}Get Wi-Fi interface configuration.
| id required | integer Interface id. |
{- "data": {
- "capabilities": {
- "mode": [
- "client"
]
}, - "client": {
- "connectState": "connected",
- "currentAp": "bzLJpU7MR",
- "networks": [
- {
- "band": "band50",
- "bssid": "10:c3:7b:c6:47:f8",
- "security": {
- "mode": "wpa2",
- "password": "!2345678"
}, - "signal": -17,
- "ssid": "moxa-test-ap-1",
- "uuid": "bzLJpU7MR"
}, - {
- "band": "band24",
- "bssid": "",
- "security": {
- "mode": "wpa2-personal",
- "password": "!2345678"
}, - "signal": null,
- "ssid": "moxa-ap-2",
- "uuid": "kcpJpUnMR"
}
], - "priority": [
- "bzLJpU7MR"
]
}, - "displayName": "WiFi2",
- "enable": true,
- "id": 1,
- "mode": "client",
- "name": "wlan0"
}
}Update Wi-Fi interface configuration.
| id required | integer Interface id. |
object Configuration of Wi-Fi Client mode. | |
| enable | boolean Enable Wi-Fi Networking. |
| id | integer Interface id |
| mode | string Value: "client" Given Wi-Fi interface mode. |
{- "client": {
- "checkalive": {
- "enable": true,
- "intervalSec": 60,
- "targetHost": "8.8.8.8"
}, - "ipSetting": {
- "dns": [
- "1.1.1.1",
- "2.2.2.2"
], - "enableDhcp": false,
- "gateway": "192.168.3.1",
- "ip": "192.168.3.40",
- "netmask": "255.255.252.0"
}, - "networks": [
- {
- "security": {
- "mode": "wpa2-personal",
- "password": "!2345678"
}, - "ssid": "moxa-test-ap-1"
}, - {
- "security": {
- "mode": "wpa2-personal",
- "password": "!2345678"
}, - "ssid": "moxa-ap-2"
}
]
}, - "enable": true,
- "id": 1,
- "mode": "client"
}{- "data": {
- "capabilities": {
- "mode": [
- "client"
]
}, - "client": {
- "checkalive": {
- "enable": true,
- "intervalSec": 60,
- "targetHost": "8.8.8.8"
}, - "connectState": "connected",
- "currentAp": "bzLJpU7MR",
- "ipSetting": {
- "dns": [
- "1.1.1.1",
- "2.2.2.2"
], - "enableDhcp": false,
- "gateway": "192.168.3.1",
- "ip": "192.168.3.40",
- "netmask": "255.255.252.0"
}, - "networks": [
- {
- "band": "band50",
- "bssid": "10:c3:7b:c6:47:f8",
- "security": {
- "mode": "wpa2-personal",
- "password": "!2345678"
}, - "signal": -17,
- "ssid": "moxa-test-ap-1",
- "uuid": "bzLJpU7MR"
}, - {
- "band": "band24",
- "bssid": "",
- "security": {
- "mode": "wpa2-personal",
- "password": "!2345678"
}, - "signal": null,
- "ssid": "moxa-ap-2",
- "uuid": "kcpJpUnMR"
}
], - "priority": [
- "bzLJpU7MR, kcpJpUnMR"
]
}, - "displayName": "WiFi2",
- "enable": true,
- "id": 1,
- "mode": "client",
- "name": "wlan0"
}
}Get Wi-Fi client networks scan results
| id required | integer Interface id. |
| event | boolean Get runtime scan, ex: {[{ssid: moxa-test-ap-1, security:{mode: wpa2-personal, encryption: aes, support: true}, signal: -17, band: band50},{...}]} |
{- "data": [
- {
- "band": "band50",
- "bssid": "7C:57:3C:23:6C:22",
- "security": {
- "mode": "wpa2-personal",
- "support": true
}, - "signal": -17,
- "ssid": "moxa-test-ap-1"
}, - {
- "band": "band24",
- "bssid": "7C:57:3C:23:6C:23",
- "security": {
- "mode": "none",
- "support": true
}, - "signal": -43,
- "ssid": "D-k"
}, - {
- "band": "band50",
- "bssid": "7C:57:3C:23:6C:24",
- "security": {
- "mode": "wpa2-enterprise",
- "support": false
}, - "signal": -58,
- "ssid": "TP-k"
}
]
}Update static DNS settings. If enable is ture, primary should be required.
| enable required | boolean |
| primary | string^(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\... |
| secondary | string^(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\... |
{- "enable": false,
- "primary": "",
- "secondary": ""
}{- "data": {
- "enable": false,
- "primary": "",
- "secondary": ""
}
}Get azure iotedge configuration.
{- "data": {
- "downstreamCerts": {
- "caCertFile": "string",
- "caCertID": "string",
- "caPkFile": "string",
- "caPkID": "string",
- "certificateInfo": {
- "issuer": "string",
- "notAfter": "string",
- "subject": {
- "cn": "string"
}
}, - "mode": "default",
- "trustedCaFile": "string",
- "trustedCaID": "string"
}, - "edgeAgentURI": "string",
- "iotedge": {
- "match": true,
- "modules": [
- {
- "config": "string",
- "description": "string",
- "match": true,
- "name": "string",
- "status": "string",
- "suggestion": "string"
}
], - "since": "Mon 2016-10-07 09:49:16 CST",
- "status": "resetting",
- "suggestion": "string",
- "version": "string"
}, - "provisioning": {
- "connectionString": "string",
- "defenderEnable": false,
- "enable": false,
- "endorsementKey": "string",
- "identityCert": "string",
- "identityCertUuid": "string",
- "identityPk": "string",
- "identityPkUuid": "string",
- "method": "tpm",
- "registrationId": "string",
- "scopeId": "string",
- "source": "manual",
- "supportTwin": true,
- "symmetricKey": "string"
}
}
}Update azure iotedge configuration.
object | |
| edgeAgentURI | string default URI of edgeAgent |
object IoT Edge runtime information | |
object |
{- "downstreamCerts": {
- "mode": "default"
}
}{- "data": {
- "downstreamCerts": {
- "caCertFile": "string",
- "caCertID": "string",
- "caPkFile": "string",
- "caPkID": "string",
- "certificateInfo": {
- "issuer": "string",
- "notAfter": "string",
- "subject": {
- "cn": "string"
}
}, - "mode": "default",
- "trustedCaFile": "string",
- "trustedCaID": "string"
}, - "edgeAgentURI": "string",
- "iotedge": {
- "match": true,
- "modules": [
- {
- "config": "string",
- "description": "string",
- "match": true,
- "name": "string",
- "status": "string",
- "suggestion": "string"
}
], - "since": "Mon 2016-10-07 09:49:16 CST",
- "status": "resetting",
- "suggestion": "string",
- "version": "string"
}, - "provisioning": {
- "connectionString": "string",
- "defenderEnable": false,
- "enable": false,
- "endorsementKey": "string",
- "identityCert": "string",
- "identityCertUuid": "string",
- "identityPk": "string",
- "identityPkUuid": "string",
- "method": "tpm",
- "registrationId": "string",
- "scopeId": "string",
- "source": "manual",
- "supportTwin": true,
- "symmetricKey": "string"
}
}
}Export user self generate downstream certificates.
{- "data": "\n-----BEGIN CERTIFICATE-----\nx509_content\n-----END CERTIFICATE-----\n-----BEGIN CERTIFICATE-----\nx509_content\n-----END CERTIFICATE-----\n-----BEGIN CERTIFICATE-----\nx509 content\n-----END CERTIFICATE-----\n"
}Import user certificates and update azure iotedge configuration.
The uploaded certificates and configuration.
| caCertFile | string <binary> device ca certificate |
| caPkFile | string <binary> device ca private key |
| trustedCaFile | string <binary> a file containing all the trusted CA |
{- "data": {
- "downstreamCerts": {
- "caCertFile": "string",
- "caCertID": "string",
- "caPkFile": "string",
- "caPkID": "string",
- "certificateInfo": {
- "issuer": "string",
- "notAfter": "string",
- "subject": {
- "cn": "string"
}
}, - "mode": "default",
- "trustedCaFile": "string",
- "trustedCaID": "string"
}, - "edgeAgentURI": "string",
- "iotedge": {
- "match": true,
- "modules": [
- {
- "config": "string",
- "description": "string",
- "match": true,
- "name": "string",
- "status": "string",
- "suggestion": "string"
}
], - "since": "Mon 2016-10-07 09:49:16 CST",
- "status": "resetting",
- "suggestion": "string",
- "version": "string"
}, - "provisioning": {
- "connectionString": "string",
- "defenderEnable": false,
- "enable": false,
- "endorsementKey": "string",
- "identityCert": "string",
- "identityCertUuid": "string",
- "identityPk": "string",
- "identityPkUuid": "string",
- "method": "tpm",
- "registrationId": "string",
- "scopeId": "string",
- "source": "manual",
- "supportTwin": true,
- "symmetricKey": "string"
}
}
}Control azure iotedge service.
{- "data": {
- "downstreamCerts": {
- "caCertFile": "string",
- "caCertID": "string",
- "caPkFile": "string",
- "caPkID": "string",
- "certificateInfo": {
- "issuer": "string",
- "notAfter": "string",
- "subject": {
- "cn": "string"
}
}, - "mode": "default",
- "trustedCaFile": "string",
- "trustedCaID": "string"
}, - "edgeAgentURI": "string",
- "iotedge": {
- "match": true,
- "modules": [
- {
- "config": "string",
- "description": "string",
- "match": true,
- "name": "string",
- "status": "string",
- "suggestion": "string"
}
], - "since": "Mon 2016-10-07 09:49:16 CST",
- "status": "resetting",
- "suggestion": "string",
- "version": "string"
}, - "provisioning": {
- "connectionString": "string",
- "defenderEnable": false,
- "enable": false,
- "endorsementKey": "string",
- "identityCert": "string",
- "identityCertUuid": "string",
- "identityPk": "string",
- "identityPkUuid": "string",
- "method": "tpm",
- "registrationId": "string",
- "scopeId": "string",
- "source": "manual",
- "supportTwin": true,
- "symmetricKey": "string"
}
}
}get azure iotedge service account list
{- "data": [
- {
- "addon": [
- {
- "id": "APP_TEST_RW",
- "name": "My test app permission"
}
], - "displayname": "My Test APP",
- "name": "testapp",
- "required": [
- "SYS_MANAGEMENT_RW",
- "SRV_AIE_RW"
], - "source": "AzureIoTEdge"
}
]
}Array of objects The add-on permissions of the service. | |
| displayName | string The display name of the service. |
| name | string The name of the service. |
| required | Array of strings The required permissions of the service |
| source | string The source that create this service. |
{- "addon": [
- {
- "id": "APP_TEST_RW",
- "name": "My test app permission"
}
], - "displayname": "My Test APP",
- "name": "testapp",
- "required": [
- "SYS_MANAGEMENT_RW",
- "SRV_AIE_RW"
], - "source": "AzureIoTEdge"
}{- "data": {
- "addon": [
- {
- "id": "APP_TEST_RW",
- "name": "My test app permission"
}
], - "displayname": "My Test APP",
- "name": "testapp",
- "required": [
- "SYS_MANAGEMENT_RW",
- "SRV_AIE_RW"
], - "source": "AzureIoTEdge",
- "token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJVc2VyaWQiOi0xLCJOYW1lIjoiQXp1cmVJb1RFZGdlLzEyMzQ1ODkxMCIsIlNlcmlhbE51bWJ"
}
}| name required | string |
Array of objects The add-on permissions of the service. | |
| displayName | string The display name of the service. |
| required | Array of strings The required permissions of the service |
{- "addon": [
- {
- "id": "APP_TEST_RW",
- "name": "My test app permission"
}
], - "displayname": "My Test APP",
- "name": "testapp",
- "required": [
- "SYS_MANAGEMENT_RW",
- "SRV_AIE_RW"
], - "source": "AzureIoTEdge"
}{- "data": {
- "addon": [
- {
- "id": "APP_TEST_RW",
- "name": "My test app permission"
}
], - "displayname": "My Test APP",
- "name": "testapp",
- "required": [
- "SYS_MANAGEMENT_RW",
- "SRV_AIE_RW"
], - "source": "AzureIoTEdge"
}
}get twin properties setting.
{- "data": {
- "device": {
- "general": [
- {
- "desiredPath": "general",
- "reportedPath": "general"
}
], - "wan": [
- {
- "desiredPath": "wan",
- "reportedPath": "wan"
}
]
}
}
}update twin properties setting.
object |
{- "device": {
- "general": [
- {
- "desiredPath": "general",
- "reportedPath": "general"
}
], - "wan": [
- {
- "desiredPath": "wan",
- "reportedPath": "wan"
}
]
}
}{- "data": {
- "device": {
- "general": [
- {
- "desiredPath": "general",
- "reportedPath": "general"
}
], - "wan": [
- {
- "desiredPath": "wan",
- "reportedPath": "wan"
}
]
}
}
}Get azure iot device configuration.
{- "data": {
- "provisioning": {
- "authenticationType": "symmetricKey",
- "certificate": {
- "caCertFile": "device.crt",
- "caPkFile": "device.key"
}, - "connectionString": "[connection string]",
- "enable": true,
- "protocol": {
- "capabilities": [
- {
- "port": 8883,
- "protocol": "mqtt"
}, - {
- "port": 443,
- "protocol": "mqttOverWebsocket"
}, - {
- "port": 5671,
- "protocol": "amqp"
}, - {
- "port": 443,
- "protocol": "amqpOverWebsocket"
}
], - "port": 8883,
- "protocol": "mqtt"
}, - "rootCaCertFile": "root.crt",
- "supportTwin": true
}, - "status": "connected"
}
}Setup x509 certificates.
| caCertFile | string <binary> device ca certificate |
| caPkFile | string <binary> device ca private key |
| connectionString | string [ 1 .. 1024 ] characters |
| protocol | string Enum: "mqtt" "mqttOverWebsocket" "amqp" "amqpOverWebsocket" Communication protocol |
| rootCaCertFile | string <binary> root ca certificate |
{- "data": {
- "provisioning": {
- "authenticationType": "symmetricKey",
- "certificate": {
- "caCertFile": "device.crt",
- "caPkFile": "device.key"
}, - "connectionString": "[connection string]",
- "enable": true,
- "protocol": {
- "capabilities": [
- {
- "port": 8883,
- "protocol": "mqtt"
}, - {
- "port": 443,
- "protocol": "mqttOverWebsocket"
}, - {
- "port": 5671,
- "protocol": "amqp"
}, - {
- "port": 443,
- "protocol": "amqpOverWebsocket"
}
], - "port": 8883,
- "protocol": "mqtt"
}, - "rootCaCertFile": "root.crt",
- "supportTwin": true
}, - "status": "connected"
}
}Update provisioning configuration.
object |
{- "provisioning": {
- "authenticationType": "symmetricKey",
- "connectionString": "connection-string-test",
- "enable": true,
- "keepAlive": 60,
- "protocol": {
- "protocol": "mqttOverWebsocket"
}, - "supportTwin": true
}
}{- "data": {
- "provisioning": {
- "authenticationType": "symmetricKey",
- "certificate": {
- "caCertFile": "",
- "caPkFile": "",
- "certificateInfo": {
- "issuer": "",
- "notAfter": "",
- "subject": {
- "cn": ""
}
}
}, - "connectionString": "connection-string-test",
- "enable": true,
- "supportTwin": true
}, - "status": "connected"
}
}get store and forward setting.
{- "data": {
- "desiredDiskCacheSizeMB": 8,
- "disks": [
- {
- "device": "/dev/root",
- "free": 3200000000,
- "mount": "/",
- "name": "System",
- "total": 3206059008,
- "used": 6059008
}
], - "dropBehavior": "oldest",
- "enable": true,
- "targetDiskName": "System",
- "timeToLiveSec": 7200
}
}update store and forward setting.
| desiredDiskCacheSizeMB | integer |
Array of objects | |
| dropBehavior | string Enum: "oldest" "newest" |
| enable | boolean Default: false |
| targetDiskName | string |
| timeToLiveSec | integer |
{- "desiredDiskCacheSizeMB": 8,
- "dropBehavior": "oldest",
- "enable": true,
- "targetDiskName": "System",
- "timeToLiveSec": 7200
}{- "data": {
- "desiredDiskCacheSizeMB": 8,
- "disks": [
- {
- "device": "/dev/root",
- "free": 3200000000,
- "mount": "/",
- "name": "System",
- "total": 3206059008,
- "used": 6059008
}
], - "dropBehavior": "oldest",
- "enable": true,
- "targetDiskName": "System",
- "timeToLiveSec": 7200
}
}update twin properties setting.
object |
{- "device": {
- "general": [
- {
- "desiredPath": "general",
- "reportedPath": "general"
}
], - "wan": [
- {
- "desiredPath": "wan",
- "reportedPath": "wan"
}
]
}
}{- "data": {
- "device": {
- "general": [
- {
- "desiredPath": "general",
- "reportedPath": "general"
}
], - "wan": [
- {
- "desiredPath": "wan",
- "reportedPath": "wan"
}
]
}
}
}Get MQTT client configuration.
{- "data": [
- {
- "certificate": {
- "caCertFile": "",
- "caPkFile": "",
- "rootCaCertFile": ""
}, - "certificateOverTLS": false,
- "clearSession": true,
- "clientID": "mydevice1",
- "enable": true,
- "handshakeTimeout": 10,
- "id": 1,
- "insecureSkipVerify": false,
- "keepAliveSec": 60,
- "password": "123",
- "port": 1883,
- "protocolVersion": "3.1.1",
- "qos": 1,
- "remoteAPI": {
- "enable": true,
- "qos": 1,
- "requestSubTopic": "/devices/1/request",
- "responsePubTopic": "/devices/1/response",
- "retain": false,
- "ttl": 60
}, - "retain": false,
- "retryInterval": 60,
- "server": "127.0.0.1",
- "status": "connected",
- "tlsVersion": "1.2",
- "userName": "moxa",
- "willMessage": {
- "enable": true,
- "message": "dead",
- "qos": 1,
- "retain": true,
- "topic": "/devices/1/will"
}
}
]
}Create a MQTT client configuration.
object | |
| certificateOverTLS | boolean Default: false |
| clearSession | boolean Default: true |
| clientID | string Max length: 65536 in V3.1.1, 23 in V3.1 |
| enable | boolean Default: false |
| handshakeTimeout | integer [ 10 .. 600 ] Default: 10 |
| insecureSkipVerify | boolean Default: false |
| keepAliveSec | integer [ 10 .. 65536 ] Default: 60 |
| password | string <= 255 characters |
| port required | integer |
| protocolVersion | string Default: "3.1.1" Enum: 3.1 "3.1.1" MQTT protocol version |
| qos | integer Default: 1 support qos 0,1,2 |
object
| |
| retain | boolean Default: false |
| retryInterval | integer [ 10 .. 3600 ] Default: 60 |
| server required | string MQTT server(broker) ip or url |
| tlsVersion | string Default: "1.2" Enum: "1.3" "1.2" "1.1" "1.0" |
| userName | string <= 255 characters |
object |
{- "certificateOverTLS": false,
- "clearSession": true,
- "clientID": "mydevice1",
- "enable": true,
- "handshakeTimeout": 10,
- "insecureSkipVerify": false,
- "keepAliveSec": 60,
- "password": "123",
- "port": 1883,
- "protocolVersion": "3.1.1",
- "qos": 1,
- "remoteAPI": {
- "enable": true,
- "qos": 1,
- "requestSubTopic": "/devices/1/request",
- "responsePubTopic": "/devices/1/response",
- "retain": false,
- "ttl": 60
}, - "retain": false,
- "retryInterval": 60,
- "server": "127.0.0.1",
- "tlsVersion": "1.2",
- "userName": "moxa",
- "willMessage": {
- "enable": true,
- "message": "dead",
- "qos": 1,
- "retain": true,
- "topic": "/devices/1/will"
}
}{- "data": [
- {
- "certificate": {
- "caCertFile": "",
- "caPkFile": "",
- "rootCaCertFile": ""
}, - "certificateOverTLS": false,
- "clearSession": true,
- "clientID": "mydevice1",
- "enable": true,
- "handshakeTimeout": 10,
- "id": 1,
- "insecureSkipVerify": false,
- "keepAliveSec": 60,
- "password": "123",
- "port": 1883,
- "protocolVersion": "3.1.1",
- "qos": 1,
- "remoteAPI": {
- "enable": true,
- "qos": 1,
- "requestSubTopic": "/devices/1/request",
- "responsePubTopic": "/devices/1/response",
- "retain": false,
- "ttl": 60
}, - "retain": false,
- "retryInterval": 60,
- "server": "127.0.0.1",
- "status": "connected",
- "tlsVersion": "1.2",
- "userName": "moxa",
- "willMessage": {
- "enable": true,
- "message": "dead",
- "qos": 1,
- "retain": true,
- "topic": "/devices/1/will"
}
}
]
}delete MQTT client configuration.
| id required | integer the |
{- "data": [
- {
- "certificate": {
- "caCertFile": "",
- "caPkFile": "",
- "rootCaCertFile": ""
}, - "certificateOverTLS": false,
- "clearSession": true,
- "clientID": "mydevice1",
- "enable": true,
- "handshakeTimeout": 10,
- "id": 1,
- "insecureSkipVerify": false,
- "keepAliveSec": 60,
- "password": "123",
- "port": 1883,
- "protocolVersion": "3.1.1",
- "qos": 1,
- "remoteAPI": {
- "enable": true,
- "qos": 1,
- "requestSubTopic": "/devices/1/request",
- "responsePubTopic": "/devices/1/response",
- "retain": false,
- "ttl": 60
}, - "retain": false,
- "retryInterval": 60,
- "server": "127.0.0.1",
- "status": "connected",
- "tlsVersion": "1.2",
- "userName": "moxa",
- "willMessage": {
- "enable": true,
- "message": "dead",
- "qos": 1,
- "retain": true,
- "topic": "/devices/1/will"
}
}
]
}Edit MQTT client configuration.
| id required | integer the |
object | |
| certificateOverTLS | boolean Default: false |
| clearSession | boolean Default: true |
| clientID | string Max length: 65536 in V3.1.1, 23 in V3.1 |
| enable | boolean Default: false |
| handshakeTimeout | integer [ 10 .. 600 ] Default: 10 |
| insecureSkipVerify | boolean Default: false |
| keepAliveSec | integer [ 10 .. 65536 ] Default: 60 |
| password | string <= 255 characters |
| port required | integer |
| protocolVersion | string Default: "3.1.1" Enum: 3.1 "3.1.1" MQTT protocol version |
| qos | integer Default: 1 support qos 0,1,2 |
object
| |
| retain | boolean Default: false |
| retryInterval | integer [ 10 .. 3600 ] Default: 60 |
| server required | string MQTT server(broker) ip or url |
| tlsVersion | string Default: "1.2" Enum: "1.3" "1.2" "1.1" "1.0" |
| userName | string <= 255 characters |
object |
{- "certificate": {
- "caCertFile": "",
- "caPkFile": "",
- "rootCaCertFile": ""
}, - "certificateOverTLS": false,
- "clearSession": true,
- "clientID": "mydevice1",
- "enable": true,
- "handshakeTimeout": 10,
- "id": 1,
- "insecureSkipVerify": false,
- "keepAliveSec": 60,
- "password": "123",
- "port": 1883,
- "protocolVersion": "3.1.1",
- "qos": 1,
- "remoteAPI": {
- "enable": true,
- "qos": 1,
- "requestSubTopic": "/devices/1/request",
- "responsePubTopic": "/devices/1/response",
- "retain": false,
- "ttl": 60
}, - "retain": false,
- "retryInterval": 60,
- "server": "127.0.0.1",
- "status": "connected",
- "tlsVersion": "1.2",
- "userName": "moxa",
- "willMessage": {
- "enable": true,
- "message": "dead",
- "qos": 1,
- "retain": true,
- "topic": "/devices/1/will"
}
}{- "data": {
- "certificate": {
- "caCertFile": "",
- "caPkFile": "",
- "rootCaCertFile": ""
}, - "certificateOverTLS": false,
- "clearSession": true,
- "clientID": "mydevice1",
- "enable": true,
- "handshakeTimeout": 10,
- "id": 1,
- "insecureSkipVerify": false,
- "keepAliveSec": 60,
- "password": "123",
- "port": 1883,
- "protocolVersion": "3.1.1",
- "qos": 1,
- "remoteAPI": {
- "enable": true,
- "qos": 1,
- "requestSubTopic": "/devices/1/request",
- "responsePubTopic": "/devices/1/response",
- "retain": false,
- "ttl": 60
}, - "retain": false,
- "retryInterval": 60,
- "server": "127.0.0.1",
- "status": "connected",
- "tlsVersion": "1.2",
- "userName": "moxa",
- "willMessage": {
- "enable": true,
- "message": "dead",
- "qos": 1,
- "retain": true,
- "topic": "/devices/1/will"
}
}
}delete certficate.
| id required | integer the |
{- "data": {
- "certificate": {
- "caCertFile": "",
- "caPkFile": "",
- "rootCaCertFile": ""
}, - "certificateOverTLS": false,
- "clearSession": true,
- "clientID": "mydevice1",
- "enable": true,
- "handshakeTimeout": 10,
- "id": 1,
- "insecureSkipVerify": false,
- "keepAliveSec": 60,
- "password": "123",
- "port": 1883,
- "protocolVersion": "3.1.1",
- "qos": 1,
- "remoteAPI": {
- "enable": true,
- "qos": 1,
- "requestSubTopic": "/devices/1/request",
- "responsePubTopic": "/devices/1/response",
- "retain": false,
- "ttl": 60
}, - "retain": false,
- "retryInterval": 60,
- "server": "127.0.0.1",
- "status": "connected",
- "tlsVersion": "1.2",
- "userName": "moxa",
- "willMessage": {
- "enable": true,
- "message": "dead",
- "qos": 1,
- "retain": true,
- "topic": "/devices/1/will"
}
}
}get store and forward setting.
| id required | integer the |
{- "data": {
- "desiredDiskCacheSizeMB": 8,
- "disks": [
- {
- "device": "/dev/root",
- "free": 3200000000,
- "mount": "/",
- "name": "System",
- "total": 3206059008,
- "used": 6059008
}
], - "dropBehavior": "oldest",
- "enable": true,
- "targetDiskName": "System",
- "timeToLiveSec": 7200
}
}update store and forward setting.
| id required | integer the |
| desiredDiskCacheSizeMB | integer |
Array of objects | |
| dropBehavior | string Enum: "oldest" "newest" |
| enable | boolean Default: false |
| targetDiskName | string |
| timeToLiveSec | integer |
{- "desiredDiskCacheSizeMB": 8,
- "dropBehavior": "oldest",
- "enable": true,
- "targetDiskName": "System",
- "timeToLiveSec": 7200
}{- "data": {
- "desiredDiskCacheSizeMB": 8,
- "disks": [
- {
- "device": "/dev/root",
- "free": 3200000000,
- "mount": "/",
- "name": "System",
- "total": 3206059008,
- "used": 6059008
}
], - "dropBehavior": "oldest",
- "enable": true,
- "targetDiskName": "System",
- "timeToLiveSec": 7200
}
}[- {
- "charInterval": 0,
- "format": 0,
- "frameInterval": 0,
- "initialDelay": 0,
- "masterSerIfaceId": 0,
- "portValue": 0,
- "remoteDevs": [
- {
- "enable": 0,
- "masterSerIfaceId": 0,
- "mcmds": [
- {
- "fpData": "00 00",
- "fpFunc": 0,
- "fpTout": 60000,
- "func": 3,
- "interceptOffset": 0,
- "interceptSlope": 1,
- "mcmdId": 1,
- "mode": 1,
- "name": "read_command_1",
- "pointSourceMax": 1,
- "pointSourceMin": 0,
- "pointTargetMax": 1,
- "pointTargetMin": 0,
- "pollInterval": 100,
- "readAddress": 0,
- "readQuantity": 1,
- "remoteDevId": 2,
- "scalingFunc": 0,
- "stData": "00 00",
- "stFunc": 0,
- "swap": 0,
- "tags": {
- "access": "r",
- "dataSize": 20,
- "dataType": "raw",
- "dataUnit": "%",
- "mcmdId": 1,
- "name": "read_command_tag1",
- "offset": 0,
- "szoneId": 1,
- "tagId": 1
}, - "writeAddress": 0,
- "writeQuantity": 1
}
], - "name": "device",
- "remoteDevId": 0,
- "slaveId": 1,
- "slaveIpaddr": "0.0.0.0",
- "slaveTcpPort": 502
}
], - "responseTout": 1000,
- "retryCount": 3,
- "serMasterId": 0
}
]| masterSerIfaceId required | integer ID of port. |
{- "charInterval": 0,
- "format": 0,
- "frameInterval": 0,
- "initialDelay": 0,
- "masterSerIfaceId": 0,
- "portValue": 0,
- "remoteDevs": [
- {
- "enable": 0,
- "masterSerIfaceId": 0,
- "mcmds": [
- {
- "fpData": "00 00",
- "fpFunc": 0,
- "fpTout": 60000,
- "func": 3,
- "interceptOffset": 0,
- "interceptSlope": 1,
- "mcmdId": 1,
- "mode": 1,
- "name": "read_command_1",
- "pointSourceMax": 1,
- "pointSourceMin": 0,
- "pointTargetMax": 1,
- "pointTargetMin": 0,
- "pollInterval": 100,
- "readAddress": 0,
- "readQuantity": 1,
- "remoteDevId": 2,
- "scalingFunc": 0,
- "stData": "00 00",
- "stFunc": 0,
- "swap": 0,
- "tags": {
- "access": "r",
- "dataSize": 20,
- "dataType": "raw",
- "dataUnit": "%",
- "mcmdId": 1,
- "name": "read_command_tag1",
- "offset": 0,
- "szoneId": 1,
- "tagId": 1
}, - "writeAddress": 0,
- "writeQuantity": 1
}
], - "name": "device",
- "remoteDevId": 0,
- "slaveId": 1,
- "slaveIpaddr": "0.0.0.0",
- "slaveTcpPort": 502
}
], - "responseTout": 1000,
- "retryCount": 3,
- "serMasterId": 0
}The configuration which does not belong to the request would not be changed.
| masterSerIfaceId required | integer ID of port. |
integer or integer Default: 0 Modbus char interval (t1.5), 0 is used by auto baud rate setting (ms). | |
| format | integer Default: 0 Enum: 0 1 Modbus serial mode (RTU, ASCII). |
integer or integer Default: 0 Modbus frame interval (t3.5), 0 is used by auto baud rate setting (ms). | |
| initialDelay | integer [ 0 .. 30000 ] Default: 0 When Modbus module start, activate the serial master after initial delay time (ms). |
| masterSerIfaceId | integer Master serial interface ID. |
| portValue required | integer Serial port index which should be unique. |
Array of objects (Modbus Module API_remoteDevsForSer) | |
| responseTout | integer [ 10 .. 120000 ] Default: 1000 Modbus response timeout. Modbus master wait the request command time for response (ms). |
| retryCount | integer [ 0 .. 5 ] Default: 3 Modbus retry count. When Modbus command does not get response, resend the command by define times. |
| serMasterId required | integer Used as foreign key for master serial interface table. |
{- "charInterval": 0,
- "format": 0,
- "frameInterval": 0,
- "initialDelay": 0,
- "portValue": 0,
- "responseTout": 1000,
- "retryCount": 3,
- "serMasterId": 1
}{- "charInterval": 0,
- "format": 0,
- "frameInterval": 0,
- "initialDelay": 0,
- "masterSerIfaceId": 0,
- "portValue": 0,
- "remoteDevs": [
- {
- "enable": 0,
- "masterSerIfaceId": 0,
- "mcmds": [
- {
- "fpData": "00 00",
- "fpFunc": 0,
- "fpTout": 60000,
- "func": 3,
- "interceptOffset": 0,
- "interceptSlope": 1,
- "mcmdId": 1,
- "mode": 1,
- "name": "read_command_1",
- "pointSourceMax": 1,
- "pointSourceMin": 0,
- "pointTargetMax": 1,
- "pointTargetMin": 0,
- "pollInterval": 100,
- "readAddress": 0,
- "readQuantity": 1,
- "remoteDevId": 2,
- "scalingFunc": 0,
- "stData": "00 00",
- "stFunc": 0,
- "swap": 0,
- "tags": {
- "access": "r",
- "dataSize": 20,
- "dataType": "raw",
- "dataUnit": "%",
- "mcmdId": 1,
- "name": "read_command_tag1",
- "offset": 0,
- "szoneId": 1,
- "tagId": 1
}, - "writeAddress": 0,
- "writeQuantity": 1
}
], - "name": "device",
- "remoteDevId": 0,
- "slaveId": 1,
- "slaveIpaddr": "0.0.0.0",
- "slaveTcpPort": 502
}
], - "responseTout": 1000,
- "retryCount": 3,
- "serMasterId": 0
}[- {
- "initialDelay": 0,
- "masterTcpIfaceId": 0,
- "remoteDevs": [
- {
- "enable": 0,
- "masterTcpIfaceId": 0,
- "mcmds": [
- {
- "fpData": "00 00",
- "fpFunc": 0,
- "fpTout": 60000,
- "func": 3,
- "interceptOffset": 0,
- "interceptSlope": 1,
- "mcmdId": 1,
- "mode": 1,
- "name": "read_command_1",
- "pointSourceMax": 1,
- "pointSourceMin": 0,
- "pointTargetMax": 1,
- "pointTargetMin": 0,
- "pollInterval": 100,
- "readAddress": 0,
- "readQuantity": 1,
- "remoteDevId": 2,
- "scalingFunc": 0,
- "stData": "00 00",
- "stFunc": 0,
- "swap": 0,
- "tags": {
- "access": "r",
- "dataSize": 20,
- "dataType": "raw",
- "dataUnit": "%",
- "mcmdId": 1,
- "name": "read_command_tag1",
- "offset": 0,
- "szoneId": 1,
- "tagId": 1
}, - "writeAddress": 0,
- "writeQuantity": 1
}
], - "name": "device",
- "remoteDevId": 0,
- "slaveId": 1,
- "slaveIpaddr": "0.0.0.0",
- "slaveTcpPort": 502
}
], - "responseTout": 1000,
- "retryCount": 3,
- "tcpMasterId": 0
}
]| masterTcpIfaceId required | integer ID of TCP. |
{- "initialDelay": 0,
- "masterTcpIfaceId": 0,
- "remoteDevs": [
- {
- "enable": 0,
- "masterTcpIfaceId": 0,
- "mcmds": [
- {
- "fpData": "00 00",
- "fpFunc": 0,
- "fpTout": 60000,
- "func": 3,
- "interceptOffset": 0,
- "interceptSlope": 1,
- "mcmdId": 1,
- "mode": 1,
- "name": "read_command_1",
- "pointSourceMax": 1,
- "pointSourceMin": 0,
- "pointTargetMax": 1,
- "pointTargetMin": 0,
- "pollInterval": 100,
- "readAddress": 0,
- "readQuantity": 1,
- "remoteDevId": 2,
- "scalingFunc": 0,
- "stData": "00 00",
- "stFunc": 0,
- "swap": 0,
- "tags": {
- "access": "r",
- "dataSize": 20,
- "dataType": "raw",
- "dataUnit": "%",
- "mcmdId": 1,
- "name": "read_command_tag1",
- "offset": 0,
- "szoneId": 1,
- "tagId": 1
}, - "writeAddress": 0,
- "writeQuantity": 1
}
], - "name": "device",
- "remoteDevId": 0,
- "slaveId": 1,
- "slaveIpaddr": "0.0.0.0",
- "slaveTcpPort": 502
}
], - "responseTout": 1000,
- "retryCount": 3,
- "tcpMasterId": 0
}The configuration which does not belong to the request would not be changed.
| masterTcpIfaceId required | integer ID of TCP. |
| initialDelay | integer [ 0 .. 30000 ] Default: 0 When Modbus module start, activate the TCP master after initial delay time (ms). |
| masterTcpIfaceId | integer master TCP interface ID. |
Array of objects (Modbus Module API_remoteDevsForTcp) | |
| responseTout | integer [ 10 .. 120000 ] Default: 1000 Modbus response timeout. Modbus master wait the request command time for response (ms). |
| retryCount | integer [ 0 .. 5 ] Default: 3 Modbus retry count. When Modbus command does not get response, resend the command by define times. |
| tcpMasterId required | integer Used as foreign key for master TCP table. |
{- "initialDelay": 0,
- "responseTout": 1000,
- "retryCount": 3,
- "tcpMasterId": 1
}{- "initialDelay": 0,
- "masterTcpIfaceId": 0,
- "remoteDevs": [
- {
- "enable": 0,
- "masterTcpIfaceId": 0,
- "mcmds": [
- {
- "fpData": "00 00",
- "fpFunc": 0,
- "fpTout": 60000,
- "func": 3,
- "interceptOffset": 0,
- "interceptSlope": 1,
- "mcmdId": 1,
- "mode": 1,
- "name": "read_command_1",
- "pointSourceMax": 1,
- "pointSourceMin": 0,
- "pointTargetMax": 1,
- "pointTargetMin": 0,
- "pollInterval": 100,
- "readAddress": 0,
- "readQuantity": 1,
- "remoteDevId": 2,
- "scalingFunc": 0,
- "stData": "00 00",
- "stFunc": 0,
- "swap": 0,
- "tags": {
- "access": "r",
- "dataSize": 20,
- "dataType": "raw",
- "dataUnit": "%",
- "mcmdId": 1,
- "name": "read_command_tag1",
- "offset": 0,
- "szoneId": 1,
- "tagId": 1
}, - "writeAddress": 0,
- "writeQuantity": 1
}
], - "name": "device",
- "remoteDevId": 0,
- "slaveId": 1,
- "slaveIpaddr": "0.0.0.0",
- "slaveTcpPort": 502
}
], - "responseTout": 1000,
- "retryCount": 3,
- "tcpMasterId": 0
}The configuration which does not belong to the request would be the default value.
| masterTcpIfaceId required | integer ID of TCP. |
| initialDelay | integer [ 0 .. 30000 ] Default: 0 When Modbus module start, activate the TCP master after initial delay time (ms). |
| masterTcpIfaceId | integer master TCP interface ID. |
Array of objects (Modbus Module API_remoteDevsForTcp) | |
| responseTout | integer [ 10 .. 120000 ] Default: 1000 Modbus response timeout. Modbus master wait the request command time for response (ms). |
| retryCount | integer [ 0 .. 5 ] Default: 3 Modbus retry count. When Modbus command does not get response, resend the command by define times. |
| tcpMasterId required | integer Used as foreign key for master TCP table. |
{- "initialDelay": 0,
- "responseTout": 1000,
- "retryCount": 3,
- "tcpMasterId": 1
}{- "initialDelay": 0,
- "masterTcpIfaceId": 0,
- "remoteDevs": [
- {
- "enable": 0,
- "masterTcpIfaceId": 0,
- "mcmds": [
- {
- "fpData": "00 00",
- "fpFunc": 0,
- "fpTout": 60000,
- "func": 3,
- "interceptOffset": 0,
- "interceptSlope": 1,
- "mcmdId": 1,
- "mode": 1,
- "name": "read_command_1",
- "pointSourceMax": 1,
- "pointSourceMin": 0,
- "pointTargetMax": 1,
- "pointTargetMin": 0,
- "pollInterval": 100,
- "readAddress": 0,
- "readQuantity": 1,
- "remoteDevId": 2,
- "scalingFunc": 0,
- "stData": "00 00",
- "stFunc": 0,
- "swap": 0,
- "tags": {
- "access": "r",
- "dataSize": 20,
- "dataType": "raw",
- "dataUnit": "%",
- "mcmdId": 1,
- "name": "read_command_tag1",
- "offset": 0,
- "szoneId": 1,
- "tagId": 1
}, - "writeAddress": 0,
- "writeQuantity": 1
}
], - "name": "device",
- "remoteDevId": 0,
- "slaveId": 1,
- "slaveIpaddr": "0.0.0.0",
- "slaveTcpPort": 502
}
], - "responseTout": 1000,
- "retryCount": 3,
- "tcpMasterId": 0
}| mastersFile | string Modbus masters csv file. |
{- "count": 0,
- "data": [
- {
- "configId": 0,
- "masterParams": [
- {
- "configId": 0,
- "enableCmdFailEvent": 0,
- "enableDevFailEvent": 0,
- "enableSerMasters": 0,
- "enableTcpMasters": 0,
- "masterParamId": 0
}
], - "serMasters": [
- {
- "configId": 0,
- "masterSerIfaces": [
- {
- "charInterval": 0,
- "format": 0,
- "frameInterval": 0,
- "initialDelay": 0,
- "masterSerIfaceId": 0,
- "portValue": 0,
- "remoteDevs": [
- {
- "enable": 0,
- "masterSerIfaceId": 0,
- "mcmds": [
- null
], - "name": "device",
- "remoteDevId": 0,
- "slaveId": 1,
- "slaveIpaddr": "0.0.0.0",
- "slaveTcpPort": 502
}
], - "responseTout": 1000,
- "retryCount": 3,
- "serMasterId": 0
}
], - "name": "modbus_serial_master",
- "serMasterId": 0
}
], - "tcpMasters": [
- {
- "configId": 0,
- "masterTcpIfaces": [
- {
- "initialDelay": 0,
- "masterTcpIfaceId": 0,
- "remoteDevs": [
- {
- "enable": 0,
- "masterTcpIfaceId": 0,
- "mcmds": [
- null
], - "name": "device",
- "remoteDevId": 0,
- "slaveId": 1,
- "slaveIpaddr": "0.0.0.0",
- "slaveTcpPort": 502
}
], - "responseTout": 1000,
- "retryCount": 3,
- "tcpMasterId": 0
}
], - "name": "modbus_tcp_master",
- "tcpMasterId": 0
}
]
}
]
}| mcmdsFile | string Master command csv file. |
| remoteDevId | any Remote device ID. |
{- "count": 0,
- "data": [
- [
- {
- "fpData": "00 00",
- "fpFunc": 0,
- "fpTout": 60000,
- "func": 3,
- "interceptOffset": 0,
- "interceptSlope": 1,
- "mcmdId": 1,
- "mode": 1,
- "name": "read_command_1",
- "pointSourceMax": 1,
- "pointSourceMin": 0,
- "pointTargetMax": 1,
- "pointTargetMin": 0,
- "pollInterval": 100,
- "readAddress": 0,
- "readQuantity": 1,
- "remoteDevId": 2,
- "scalingFunc": 0,
- "stData": "00 00",
- "stFunc": 0,
- "swap": 0,
- "tags": {
- "access": "r",
- "dataSize": 20,
- "dataType": "raw",
- "dataUnit": "%",
- "mcmdId": 1,
- "name": "read_command_tag1",
- "offset": 0,
- "szoneId": 1,
- "tagId": 1
}, - "writeAddress": 0,
- "writeQuantity": 1
}
]
]
}system log level.
| logLevel | string (Modbus Module API_log_level_str) Enum: "ALL" "TRACE" "DEBUG" "INFO" "WARN" "ERROR" "FATAL" "OFF" system log level. |
{- "logLevel": "DEBUG"
}{- "error": {
- "message": "get 'level' parameter failed"
}
}| delAll | string Value: "false" /szones?delAll=false would delete one or more szoneId(s) specified in the payload. |
szoneId(s) to be deleted.
| szoneId required | Array of integers |
{- "szoneId": [
- 1,
- 3,
- 4
]
}{- "error": {
- "message": "szoneId(%d) not exists"
}
}{- "data": [
- {
- "address": 0,
- "dataFormat": 3,
- "fromRefTaglist": 1,
- "quan": 1,
- "refTags": [
- {
- "access": "r",
- "dataType": "uint16",
- "prvdName": "modbus_tcp_master",
- "refTagId": 1,
- "srcName": "moxa-device",
- "szoneId": 1,
- "tagName": "voltage"
}
], - "rowId": 0,
- "szoneId": 1,
- "tags": [ ],
- "tcpSlaveId": 1
}
]
}{- "data": {
- "address": 0,
- "dataFormat": 3,
- "fromRefTaglist": 1,
- "quan": 1,
- "refTags": [
- {
- "access": "r",
- "dataType": "uint16",
- "prvdName": "modbus_tcp_master",
- "refTagId": 1,
- "srcName": "moxa-device",
- "szoneId": 1,
- "tagName": "voltage"
}
], - "rowId": 0,
- "szoneId": 1,
- "tags": [ ],
- "tcpSlaveId": 1
}
}The configuration which does not belong to the request would not be changed.
| szoneId required | string ID of szone. |
| address | integer [ 0 .. 65535 ] Default: 0 Modbus start address, like Modbus command address, it used for tag mapping used. |
{- "address": 10
}{- "data": {
- "address": 0,
- "dataFormat": 3,
- "fromRefTaglist": 1,
- "quan": 1,
- "refTags": [
- {
- "access": "r",
- "dataType": "uint16",
- "prvdName": "modbus_tcp_master",
- "refTagId": 1,
- "srcName": "moxa-device",
- "szoneId": 1,
- "tagName": "voltage"
}
], - "rowId": 0,
- "szoneId": 1,
- "tags": [ ],
- "tcpSlaveId": 1
}
}| createFromRefTag required | boolean Value: true /szones?createFromRefTag=true would fill the value of dataFormat, address and quantity automatically. The access, dataType, dataSize of the ref-tag are fetched by mx-modbus automatically. |
Slave zone data.
required | Array of objects |
| tcpSlaveId required | integer Used as foreign key for szone table. |
{- "refTags": [
- {
- "prvdName": "modbus_tcp_master",
- "srcName": "moxa-device",
- "tagName": "voltage"
}
], - "tcpSlaveId": 1
}{- "data": [
- {
- "address": 0,
- "dataFormat": 3,
- "fromRefTaglist": 1,
- "quan": 1,
- "refTags": [
- {
- "access": "r",
- "dataType": "uint16",
- "prvdName": "modbus_tcp_master",
- "refTagId": 1,
- "srcName": "moxa-device",
- "szoneId": 1,
- "tagName": "voltage"
}
], - "rowId": 0,
- "szoneId": 1,
- "tags": [ ],
- "tcpSlaveId": 1
}
]
}| tcpSlaveId required | string ID of tcpSlave. |
{- "data": {
- "configId": 0,
- "enable": 0,
- "keepAliveTime": 99,
- "listenPort": 502,
- "maxRefTagByte": 0,
- "maxRefTagQuan": 0,
- "name": "modbus_tcp_slave",
- "slaveId": 1,
- "szones": [
- {
- "address": 0,
- "dataFormat": 0,
- "fromRefTaglist": 0,
- "quan": 1,
- "refTags": [
- {
- "access": "w",
- "dataType": "int32",
- "prvdName": "modbus_tcp_master",
- "refTagId": 1,
- "srcName": "moxa-device",
- "szoneId": 1,
- "tagName": "voltage"
}
], - "szoneId": 0,
- "tags": [
- {
- "access": "r",
- "dataSize": 1,
- "dataType": "boolean",
- "dataUnit": "string",
- "name": "tag",
- "offset": 0,
- "szoneId": 0,
- "tagId": 0
}
], - "tcpSlaveId": 0
}
], - "tcpSlaveId": 0
}
}The configuration which does not belong to the request would not be changed.
| tcpSlaveId required | string ID of tcpSlave. |
| enable | integer Default: 0 Enum: 0 1 Enable for Modbus TCP slave. |
| listenPort | integer [ 1 .. 65535 ] Default: 502 Modbus listen port. "listenPort + slaveId" should be unique. |
| slaveId | integer [ 1 .. 255 ] Default: 1 Modbus slave ID. |
{- "enable": 1
}{- "data": {
- "configId": 0,
- "enable": 0,
- "keepAliveTime": 20,
- "listenPort": 502,
- "name": "modbus_tcp_slave",
- "slaveId": 1,
- "szones": [
- {
- "address": 0,
- "dataFormat": 0,
- "fromRefTaglist": 0,
- "quan": 1,
- "refTags": [
- {
- "access": "w",
- "dataType": "int32",
- "prvdName": "modbus_tcp_master",
- "refTagId": 1,
- "srcName": "moxa-device",
- "szoneId": 1,
- "tagName": "voltage"
}
], - "szoneId": 0,
- "tags": [
- {
- "access": "r",
- "dataSize": 1,
- "dataType": "boolean",
- "dataUnit": "string",
- "name": "tag",
- "offset": 0,
- "szoneId": 0,
- "tagId": 0
}
], - "tcpSlaveId": 0
}
], - "tcpSlaveId": 0
}
}sequence of szoneId
| dataFormat required | integer Enum: 0 1 2 3 Data format to be rearranged.
|
required | Array of objects (Modbus Module API_szone_sequence) Sequence of szoneId for specific data format |
{- "dataFormat": 0,
- "sequence": [
- {
- "szoneId": 2
}, - {
- "szoneId": 3
}, - {
- "szoneId": 1
}
]
}{- "data": [
- {
- "address": 0,
- "dataFormat": 3,
- "fromRefTaglist": 1,
- "quan": 10,
- "refTags": [
- {
- "access": "r",
- "dataSize": 20,
- "dataType": "raw",
- "prvdName": "modbus_tcp_master",
- "refTagId": 2,
- "srcName": "dev1",
- "szoneId": 2,
- "tagName": "tag2"
}
], - "szoneId": 2,
- "tags": [ ],
- "tcpSlaveId": 1
}, - {
- "address": 10,
- "dataFormat": 3,
- "fromRefTaglist": 1,
- "quan": 4,
- "refTags": [
- {
- "access": "r",
- "dataType": "int64",
- "prvdName": "modbus_tcp_master",
- "refTagId": 1,
- "srcName": "dev1",
- "szoneId": 1,
- "tagName": "tag1"
}
], - "szoneId": 1,
- "tags": [ ],
- "tcpSlaveId": 1
}, - {
- "address": -1,
- "dataFormat": 3,
- "fromRefTaglist": 1,
- "quan": 10,
- "refTags": [
- {
- "access": "r",
- "dataSize": 20,
- "dataType": "raw",
- "prvdName": "modbus_tcp_master",
- "refTagId": 3,
- "srcName": "dev1",
- "szoneId": 3,
- "tagName": "tag3"
}
], - "szoneId": 3,
- "tags": [ ],
- "tcpSlaveId": 1
}
]
}Display so far user defined functions.
| event | boolean Enable server-sent event |
{- "data": [
- {
- "enabled": true,
- "executable": {
- "language": "python"
}, - "expose": {
- "tags": [
- {
- "dataType": "string",
- "prvdName": "virtual",
- "srcName": "user",
- "tagName": "hello"
}
]
}, - "name": "helloworld",
- "params": { },
- "trigger": {
- "dirven": "timeDriven",
- "timeDriven": {
- "cronJob": "",
- "mode": "boot"
}
}
}
]
}Edit an existed function by function name. If doesn't exist, function app will create a new one.
| enabled | boolean |
object (ThingsPro Edge Function_Executable) | |
object (ThingsPro Edge Function_Expose) | |
| name | string [ 1 .. 255 ] characters ASCII alphanumeric characters or hyphens (a-z, A-Z, 0-9, "-") |
| params | object |
object (ThingsPro Edge Function_Trigger) |
{- "enabled": false,
- "name": "timedriven"
}{- "data": [
- {
- "enabled": false,
- "executable": {
- "context": "#!/usr/bin/python\n# -*- coding: utf-8 -*-\n\"\"\"\nThingsPro Edge Function time driven function template\n\"\"\"\nfrom thingspro.edge.func_v1 import package\nif __name__ == \"__main__\":\n # create function client instance\n config = package.Configuration()\n # print parameters defined inpackage.json\n print(config.parameters())\n\n # infinite loop\n while True:\n time.sleep(1)\n\n",
- "error": "",
- "language": "python",
- "lastUpTime": "2021-01-15T16:14:08+08:00",
- "state": "running"
}, - "expose": {
- "tags": [
- {
- "dataType": "double",
- "prvdName": "virtual",
- "srcName": "define",
- "tagName": "tag"
}
]
}, - "name": "timedriven",
- "params": {
- "version": "1.0.0"
}, - "trigger": {
- "driven": "timeDriven",
- "timeDriven": {
- "cronJob": "",
- "mode": "boot"
}
}
}
]
}Add a new function by upload tar.gz that packs function index.py(python program) and package.json(metadata)
| file | string <binary> configuration file |
{- "data": [
- {
- "enabled": true,
- "executable": {
- "context": "#!/usr/bin/python\n# -*- coding: utf-8 -*-\n\"\"\"\nThingsPro Edge Function time driven function template\n\"\"\"\nfrom thingspro.edge.func_v1 import package\nif __name__ == \"__main__\":\n # create function client instance\n config = package.Configuration()\n # print parameters defined inpackage.json\n print(config.parameters())\n\n # infinite loop\n while True:\n time.sleep(1)\n\n",
- "error": "",
- "language": "python",
- "lastUpTime": "2021-01-15T16:14:08+08:00",
- "state": "running"
}, - "expose": {
- "tags": [
- {
- "dataType": "double",
- "prvdName": "virtual",
- "srcName": "define",
- "tagName": "tag"
}
]
}, - "name": "timedriven",
- "params": {
- "version": "1.0.0"
}, - "trigger": {
- "driven": "timeDriven",
- "timeDriven": {
- "cronJob": "",
- "mode": "boot"
}
}
}
]
}up-to-date all installed python modules
{- "data": [
- "certifi=2021.5.30",
- "charset-normalizer=2.0.6",
- "enum34=1.1.10",
- "grpcio=1.30.0",
- "idna=3.2",
- "pip=21.2.4",
- "protobuf=3.18.1",
- "requests=2.26.0",
- "requests-unixsocket=0.2.0",
- "setuptools=57.5.0",
- "six=1.16.0",
- "urllib3=1.26.7",
- "wheel=0.37.0"
]
}install/uninstall desired python modules
| uninstall | boolean a flag to change operation from install to uninstall python modules |
| pip | Array of strings |
| timeout | integer [ 1 .. 120 ] |
{- "pip": [
- "requests"
], - "timeout": 60
}| download | boolean Examples:
provide download by query string |
{- "data": {
- "account": [
- {
- "id": "SEC-MON-301-1",
- "message": "Password not changed within the set time.",
- "risk": "medium",
- "status": "pass",
- "timestamp": 1691486943
}
]
}
}returns all certificates
{- "count": 0,
- "data": [
- {
- "expiredAt": "string",
- "id": 0,
- "name": "string",
- "rootCA": true,
- "sourceName": "string",
- "status": "valid",
- "subjectNames": {
- "commonName": "string",
- "country": [
- "string"
], - "issuer": "string",
- "locality": [
- "string"
], - "organization": [
- "string"
], - "state": [
- "string"
]
}, - "uuid": "string"
}
]
}returns certificate
| uuid required | integer |
| download | boolean |
{- "count": 0,
- "data": [
- {
- "expiredAt": "string",
- "id": 0,
- "name": "string",
- "rootCA": true,
- "sourceName": "string",
- "status": "valid",
- "subjectNames": {
- "commonName": "string",
- "country": [
- "string"
], - "issuer": "string",
- "locality": [
- "string"
], - "organization": [
- "string"
], - "state": [
- "string"
]
}, - "uuid": "string"
}
]
}Get firewall host inbound rules.
{- "count": 1,
- "data": [
- {
- "gatewayPort": "8443",
- "id": 10001,
- "name": "https server port",
- "protocol": "tcp",
- "sourceIp": "10.128.10.0/22",
- "sourcePort": ""
}
]
}Modify the system rule to restrict access only from specific source IP or source ports.
| id required | integer rule ID |
| sourceIp required | string Default: "" Packet soruce IP. Support:
|
| sourcePort | string Packet soruce port. Support:
|
{- "sourceIp": "10.128.10.0/24",
- "sourcePort": ""
}{- "count": 1,
- "data": [
- {
- "gatewayPort": "8443",
- "id": 10001,
- "name": "https server port",
- "protocol": "tcp",
- "sourceIp": "10.128.10.0/24",
- "sourcePort": ""
}
]
}Delete user customize filter or port forwarding rule of firewall inbound
| type required | string Enum: "allow" "forward" rule operation type. allow is filter of whilelist, forward is port forwarding of whilelist. |
| id required | integer rule ID |
{- "error": {
- "code": 400,
- "message": "invalid input, err: incorrect id"
}
}Get firewall user customize inbound rules overview.
| type required | string Enum: "allow" "forward" rule operation type. allow is filter of whilelist, forward is port forwarding of whilelist. |
{- "count": 1,
- "data": [
- {
- "gatewayPort": "8080",
- "id": 1,
- "name": "open listen port 8080",
- "protocol": "tcp",
- "sourceIp": "",
- "sourcePort": ""
}
]
}Modify user customize filter or port forwarding rule of firewall inbound
| type required | string Enum: "allow" "forward" rule operation type. allow is filter of whilelist, forward is port forwarding of whilelist. |
| id required | integer rule ID |
| gatewayPort required | string Exposed public port |
| id | integer Rule ID |
| name required | string [ 1 .. 32 ] characters ascii passphrase with '-' or '_' characters Rule name |
| protocol required | string Enum: "tcp" "udp" The specified protocol |
| sourceIp | string Default: "" Packet soruce IP. Support:
|
| sourcePort | string Default: "" Packet soruce port. Support:
|
{- "gatewayPort": "8081",
- "name": "open listen port 8081",
- "protocol": "tcp",
- "sourceIp": "",
- "sourcePort": ""
}{- "count": 1,
- "data": [
- {
- "gatewayPort": "8081",
- "id": 1,
- "name": "open listen port 8081",
- "protocol": "tcp",
- "sourceIp": "",
- "sourcePort": ""
}
]
}Add user customize rule for allow filter port or port forwarding
| type required | string Enum: "allow" "forward" rule operation type. allow is filter of whilelist, forward is port forwarding of whilelist. |
| gatewayPort required | string Exposed public port |
| id | integer Rule ID |
| name required | string [ 1 .. 32 ] characters ascii passphrase with '-' or '_' characters Rule name |
| protocol required | string Enum: "tcp" "udp" The specified protocol |
| sourceIp | string Default: "" Packet soruce IP. Support:
|
| sourcePort | string Default: "" Packet soruce port. Support:
|
[- {
- "gatewayPort": "8080",
- "name": "open listen port 8080",
- "protocol": "tcp",
- "sourceIp": "",
- "sourcePort": ""
}
]{- "count": 1,
- "data": [
- {
- "gatewayPort": "8080",
- "id": 1,
- "name": "open listen port 8080",
- "protocol": "tcp",
- "sourceIp": "",
- "sourcePort": ""
}
]
}Put firewall user snat to enable or disable.
| enable required | boolean snat status |
{- "enable": true
}{- "data": {
- "enable": false
}
}{- "data": {
- "certFileName": "thingspro_https_default.crt",
- "httpPort": 80,
- "httpsEnable": true,
- "httpsPort": 8443,
- "keyFileName": "thingspro_https_default.key",
- "redirectToHttps": false
}
}| httpsPort | integer listen port for https, value should be 443 or between 1024 to 65535 |
| redirectToHttps | boolean |
{- "httpsPort": 8443,
- "redirectToHttps": false
}{- "data": {
- "certFileName": "thingspro_https_default.crt",
- "httpPort": 80,
- "httpsEnable": true,
- "httpsPort": 8443,
- "keyFileName": "thingspro_https_default.key",
- "redirectToHttps": false
}
}| httpsPort | integer listen port for https, value should be 443 or between 1024 to 65535 |
| redirectToHttps | boolean |
{- "httpsPort": 8443,
- "redirectToHttps": false
}{- "data": {
- "certFileName": "thingspro_https_default.crt",
- "httpPort": 80,
- "httpsEnable": true,
- "httpsPort": 8443,
- "keyFileName": "thingspro_https_default.key",
- "redirectToHttps": false
}
}| enable required | boolean |
| failTimes required | integer [ 3 .. 32 ] Default: 10 authenticate fail times |
| failWindow required | integer [ 1 .. 60 ] Default: 15 time window to count authenticate fail times in minutes |
| lockWindow required | integer [ 5 .. 1440 ] Default: 10 lock time in minutes |
{- "enable": true,
- "failTimes": 10,
- "failWindow": 1,
- "lockWindow": 10
}{- "data": {
- "enable": true,
- "failTimes": 10,
- "failWindow": 1,
- "lockWindow": 10
}
}| ids | integer Delete sessions with given session ID, seperated by comma(,) |
| userIds | integer Delete user sessions with given user ID, seperated by comma(,) |
{- "error": {
- "code": 400,
- "message": "invalid input, err: $detail"
}
}| userIds | integer Get sessions with given user ID, seperated by comma(,) |
{- "count": 2,
- "data": [
- {
- "createdAt": "2022-10-13T01:31:48.964368971Z",
- "id": 1,
- "isCurrent": true,
- "lastAccessAt": "2022-10-13T01:31:49.334247271Z",
- "sourceIp": "127.0.0.1",
- "userId": 1,
- "userName": "admin"
}, - {
- "createdAt": "2022-10-13T01:35:38.919457191Z",
- "id": 2,
- "lastAccessAt": "2022-10-13T01:35:38.919457191Z",
- "sourceIp": "192.168.3.127",
- "userId": 2,
- "userName": "terry"
}
]
}| id required | integer ID of session |
{- "data": {
- "createdAt": "2022-10-13T01:31:48.964368971Z",
- "id": 1,
- "lastAccessAt": "2022-10-13T01:31:49.334247271Z",
- "sourceIp": "127.0.0.1",
- "userId": 1,
- "userName": "admin"
}
}| idleTimeoutMin | integer [ 1 .. 1440 ] session timeout while the session timeout, unit in minutes |
| maxCountByUser | integer [ 1 .. 32 ] Default: 5 max sessions of a user |
| timeoutMin | integer [ 60 .. 28800 ] Default: 1440 session timeout in minutes |
{- "idleTimeoutMin": 5,
- "maxCountByUser": 5,
- "timeoutMin": 1440
}{- "data": {
- "idleTimeoutMin": 5,
- "maxCount": 1024,
- "maxCountByUser": 5,
- "timeoutMin": 1440
}
}{- "data": {
- "enable": true,
- "network": {
- "gateway": "10.8.1.254",
- "localIp": "10.8.0.1",
- "netmask": "255.255.255.0",
- "remoteIp": "10.144.48.22"
}, - "profile": "client.ovpn",
- "ready": true,
- "status": "connected",
- "type": "openvpn"
}
}| enable | boolean Default: true enable system use notification |
| enableDefaultText | boolean Default: true use default text |
| userText | string [ 0 .. 1024 ] characters text of user configured |
{- "enable": true,
- "enableDefaultText": true,
- "userText": "user text."
}{- "data": {
- "defaultText": "system default text.",
- "enable": true,
- "enableDefaultText": true,
- "userText": "user text."
}
}{- "count": 1,
- "data": [
- {
- "createdAt": "2019-09-24T05:52:28.912234779Z",
- "description": null,
- "email": null,
- "id": 1,
- "isActive": true,
- "loginAt": "0001-01-01T00:00:00Z",
- "name": "admin",
- "passwordChangedAt": null,
- "permissions": [
- "SYS_MAINTENANCE_RW",
- "SYS_ACCOUNT_RW"
], - "roles": [
- {
- "id": 1,
- "name": "Administrator"
}
]
}
]
}| description | string or null <= 512 characters \X{0,512} |
string or null <email> | |
| isActive required | boolean |
| name required | string [ 1 .. 64 ] characters ^[a-zA-Z0-9]+[a-zA-Z0-9+=,.@_-]{0,63}$ |
| password required | string <password> [ 8 .. 256 ] characters ^[0-9a-zA-z~`!@#$%^&*()_\-+={}\[\]|\\:\";'<>?... |
required | Array of objects non-empty |
{- "isActive": true,
- "name": "admin",
- "password": "admin@123",
- "roles": [
- {
- "id": 1
}
]
}{- "data": {
- "createdAt": "2019-09-24T05:52:28.912234779Z",
- "description": null,
- "email": null,
- "id": 1,
- "isActive": true,
- "loginAt": "0001-01-01T00:00:00Z",
- "name": "admin",
- "passwordChangedAt": null,
- "permissions": [
- "SYS_MAINTENANCE_RW",
- "SYS_ACCOUNT_RW"
], - "roles": [
- {
- "id": 1,
- "name": "Administrator"
}
]
}
}| id required | integer ID of account |
{- "data": {
- "createdAt": "2019-09-24T05:52:28.912234779Z",
- "description": null,
- "email": null,
- "id": 1,
- "isActive": true,
- "loginAt": "0001-01-01T00:00:00Z",
- "name": "admin",
- "passwordChangedAt": null,
- "permissions": [
- "SYS_MAINTENANCE_RW",
- "SYS_ACCOUNT_RW"
], - "roles": [
- {
- "id": 1,
- "name": "Administrator"
}
]
}
}| id required | integer ID of user |
| description | string <= 512 characters \X{0,512} |
string <email> | |
| isActive | boolean |
Array of objects non-empty |
{- "isActive": true,
- "roles": [
- {
- "id": 1
}
]
}{- "data": {
- "createdAt": "2019-09-24T05:52:28.912234779Z",
- "description": null,
- "email": null,
- "id": 1,
- "isActive": true,
- "loginAt": "0001-01-01T00:00:00Z",
- "name": "admin",
- "passwordChangedAt": null,
- "permissions": [
- "SYS_MAINTENANCE_RW",
- "SYS_ACCOUNT_RW"
], - "roles": [
- {
- "id": 1,
- "name": "Administrator"
}
]
}
}| id required | integer ID of account |
| newPassword required | string <password> [ 8 .. 256 ] characters ^[0-9a-zA-z~`!@#$%^&*()_\-+={}\[\]|\\:\";'<>?... |
{- "newPassword": "12345678"
}{- "data": {
- "createdAt": "2019-09-24T05:52:28.912234779Z",
- "description": null,
- "email": null,
- "id": 1,
- "isActive": true,
- "loginAt": "0001-01-01T00:00:00Z",
- "name": "admin",
- "passwordChangedAt": null,
- "permissions": [
- "SYS_MAINTENANCE_RW",
- "SYS_ACCOUNT_RW"
], - "roles": [
- {
- "id": 1,
- "name": "Administrator"
}
]
}
}{- "data": {
- "createdAt": "2019-09-24T05:52:28.912234779Z",
- "description": null,
- "email": null,
- "id": 1,
- "isActive": true,
- "loginAt": "0001-01-01T00:00:00Z",
- "name": "admin",
- "passwordChangedAt": null,
- "permissions": [
- "SYS_MAINTENANCE_RW",
- "SYS_ACCOUNT_RW"
], - "roles": [
- {
- "id": 1,
- "name": "Administrator"
}
]
}
}| description | string <= 512 characters \X{0,512} |
string <email> |
{- "email": "aa@aaa.aaa"
}{- "data": {
- "createdAt": "2019-09-24T05:52:28.912234779Z",
- "description": null,
- "email": null,
- "id": 1,
- "isActive": true,
- "loginAt": "0001-01-01T00:00:00Z",
- "name": "admin",
- "passwordChangedAt": null,
- "permissions": [
- "SYS_MAINTENANCE_RW",
- "SYS_ACCOUNT_RW"
], - "roles": [
- {
- "id": 1,
- "name": "Administrator"
}
]
}
}| newPassword required | string <password> [ 8 .. 256 ] characters ^[0-9a-zA-z~`!@#$%^&*()_\-+={}\[\]|\\:\";'<>?... |
| oldPassword | string <password> [ 8 .. 256 ] characters ^[0-9a-zA-z~`!@#$%^&*()_\-+={}\[\]|\\:\";'<>?... field is not required only when the it is an initial account and the password must change before normal use |
{- "newPassword": "12345678",
- "oldPassword": "moxa1234"
}{- "data": {
- "createdAt": "2019-09-24T05:52:28.912234779Z",
- "description": null,
- "email": null,
- "id": 1,
- "isActive": true,
- "loginAt": "0001-01-01T00:00:00Z",
- "name": "admin",
- "passwordChangedAt": null,
- "permissions": [
- "SYS_MAINTENANCE_RW",
- "SYS_ACCOUNT_RW"
], - "roles": [
- {
- "id": 1,
- "name": "Administrator"
}
]
}
}{- "count": 1,
- "data": [
- {
- "description": "",
- "id": 1,
- "name": "Administrator",
- "permissions": [
- "SYS_ACCOUNT_RW",
- "SYS_MAINTENANCE_RW"
], - "users": [
- {
- "id": 1,
- "name": "admin"
}, - {
- "id": 2,
- "name": "myuser"
}
]
}
]
}| description | string <= 512 characters \X{0,512} |
| name required | string [ 1 .. 64 ] characters ^[a-zA-Z0-9]+[a-zA-Z0-9+=,.@_-]{0,63}$ |
| permissions required | Array of strings non-empty |
{- "description": "",
- "name": "myrole",
- "permissions": [
- "SYS_ACCOUNT_RW"
]
}{- "data": {
- "description": "moxa best",
- "id": 2,
- "name": "myrole",
- "permissions": [
- "SYS_ACCOUNT_RW"
], - "users": [ ]
}
}| id required | integer ID of role |
| description | string <= 512 characters \X{0,512} |
| name | string [ 1 .. 64 ] characters ^[a-zA-Z0-9]+[a-zA-Z0-9+=,.@_-]{0,63}$ |
| permissions | Array of strings non-empty |
{- "description": "",
- "name": "myrole",
- "permissions": [
- "SYS_ACCOUNT_RW"
]
}{- "data": {
- "description": "moxa best",
- "id": 2,
- "name": "myrole",
- "permissions": [
- "SYS_ACCOUNT_RW"
], - "users": [ ]
}
}{- "data": {
- "atLeastOneDigit": true,
- "atLeastOneSpecial": true,
- "blacklist": [
- "admin@123",
- "moxamoxa"
], - "enableReminder": false,
- "lengthMin": 8,
- "mixedUpperLowerLetters": true,
- "reminderFrequencyDay": 180
}
}| atLeastOneDigit | boolean Default: false password must be at least one digit |
| atLeastOneSpecial | boolean Default: false password must be at least one special chararacter |
| enableReminder | boolean Default: true enable password reminder |
| lengthMin | integer [ 8 .. 256 ] Default: 8 password minimum length |
| mixedUpperLowerLetters | boolean Default: false password must be mixed upper and lower case |
| reminderFrequencyDay | integer [ 10 .. 360 ] Default: 180 frequency to remind user to change the password |
{- "atLeastOneDigit": true,
- "atLeastOneSpecial": true,
- "enableReminder": true,
- "lengthMin": 8,
- "mixedUpperLowerLetters": true,
- "reminderFrequencyDay": 180
}{- "data": {
- "atLeastOneDigit": true,
- "atLeastOneSpecial": true,
- "blacklist": [
- "admin@123",
- "moxamoxa"
], - "enableReminder": false,
- "lengthMin": 8,
- "mixedUpperLowerLetters": true,
- "reminderFrequencyDay": 180
}
}| enable | boolean enable discovery service |
{- "enable": true
}{- "data": {
- "enable": true
}
}Update configuration of internet check alive
| enable | boolean Default: false enable/disable internet check alive service |
| interval | integer [ 10 .. 86400 ] Default: 60 interval in seconds for internet check alive |
| retry | integer [ 1 .. 10 ] Default: 3 retry times for internet check alive |
| target | string [ 1 .. 255 ] characters Default: "google.com" target for internet check alive |
| timeout | integer [ 1 .. 60 ] Default: 5 each check timeout in seconds for internet check alive |
{- "enable": true,
- "interval": 120,
- "retry": 5,
- "target": "www.moxa.com",
- "timeout": 10
}{- "data": {
- "enable": true,
- "interval": 120,
- "retry": 5,
- "target": "www.moxa.com",
- "timeout": 10
}
}| enable | boolean enable serial console |
{- "enable": true
}{- "data": {
- "enable": true
}
}| enable | boolean enable SSH |
| port | integer [ 1 .. 65535 ] port to listen |
{- "enable": true,
- "port": 22
}{- "data": {
- "enable": true,
- "port": 22
}
}| cronSchedule | string^[0]{1}\s[0-9]{1}\s[*]{1}\s[*]{1}\s[0-6,]{1,1... crontab (https://linux.die.net/man/5/crontab) |
| enableScheduler | boolean |
| now | boolean |
{- "now": true
}{- "data": {
- "cronSchedule": "0 0 * * 0,1,2,3,4,5,6",
- "enableScheduler": true,
- "lastBootAt": "2023-04-21T13:06:41+08:00",
- "now": false
}
}| file | string <binary> configuration file |
{- "data": {
- "diff": {
- "current": {
- "firmwareVersion": "1.0.1",
- "modelName": "AIG-502",
- "softwareVersion": "1.0.1"
}, - "imported": {
- "firmwareVersion": "1.0.0",
- "modelName": "AIG-502",
- "softwareVersion": "1.0.0"
}
}, - "fileName": "2022-09-01-10-55-export-configuration.tar.gz",
- "fileSize": 46272,
- "sections": [
- {
- "import": true,
- "name": "System"
}, - {
- "import": true,
- "name": "APPs"
}
]
}
}returns available updates
| scan | boolean Example: scan=true Get real-time updates or by last scan |
{- "checktime": "2023-05-02T03:51:22Z",
- "data": {
- "patches": [ ],
- "product": {
- "category": "",
- "currentVersion": "1.0.0",
- "name": "moxa-aig-502-tpe",
- "newVersion": "",
- "size": 0
}
}
}Trigger update(s)
[- "openssl"
]{- "data": [
- "openssl"
], - "message": "Successfully trigger"
}Returns the update history
[- {
- "message": "Success",
- "name": "moxa-aig-502-tpe",
- "size": 10000,
- "status": "success",
- "time": "2022-10-03T08:18:07Z",
- "type": "package",
- "version": "1.1.0"
}
]Update the update settings
| allowOverCellular | boolean |
| allowUpdate | boolean |
| autoScan | boolean |
| autoScanExpression | string/((((\d+,)+\d+|(\d+(\/|-)\d+)|\d+|\*) ?){5})/... |
| snapshotBeforeUpdate | boolean |
{- "allowOverCellular": false,
- "allowUpdate": true,
- "autoScan": false,
- "autoScanExpression": "0 3 * * 1,2,3",
- "snapshotBeforeUpdate": true
}{- "allowOverCellular": false,
- "allowUpdate": true,
- "autoScan": false,
- "autoScanExpression": "0 3 * * 1,2,3",
- "snapshotBeforeUpdate": true
}Update the update settings
| allowOverCellular | boolean |
| allowUpdate | boolean |
| autoScan | boolean |
| autoScanExpression | string/((((\d+,)+\d+|(\d+(\/|-)\d+)|\d+|\*) ?){5})/... |
| snapshotBeforeUpdate | boolean |
{- "allowOverCellular": false,
- "allowUpdate": true,
- "autoScan": false,
- "autoScanExpression": "0 3 * * 1,2,3",
- "snapshotBeforeUpdate": true
}{- "allowOverCellular": false,
- "allowUpdate": true,
- "autoScan": false,
- "autoScanExpression": "0 3 * * 1,2,3",
- "snapshotBeforeUpdate": true
}| limit | integer Limit the number of result (default:100). |
| offset | integer Log starting from the offset (default:0). |
| order | string Enum: "time" "id" "category" "name" "severity" Order by key (default:time). Use id if order by absolute time required, cannot provide the precise time but the absolute order which won't affect by time change. |
| sort | string Enum: "asc" "desc" sorting (default:desc). |
| categories | string Filter out logs by category with keywords seperated by comma(,) |
| names | string Filter out logs by event name with keywords seperated by comma(,) |
| severities | string Filter out logs by severity with keywords seperated by comma(,) |
| sources | string Filter out logs by source with keywords seperated by comma(,) |
| messages | string Filter out logs that partially or fully match the category, with keywords separated by commas (,) |
| download | boolean Download audit log as a compressed csv file (Value is always true if having this field). |
| monitor | boolean Enable server-sent event to monitor exposed audit log. (Value is always true if having this field). |
{- "count": 2,
- "data": [
- {
- "category": "Maintenance",
- "createdAt": "2020-02-25T00:08:54.97510268+08:00",
- "id": 20340,
- "message": "Software package update success.",
- "name": "softwarePackageUpdate",
- "severity": "notice",
- "source": "System",
- "sourceIp": "127.0.0.1"
}, - {
- "category": "Maintenance",
- "createdAt": "2020-02-25T00:08:54.92855576+08:00",
- "id": 20339,
- "message": "Reset to configuration default.",
- "name": "resetToConfigurationDefault",
- "severity": "notice",
- "source": "System",
- "sourceIp": "127.0.0.1"
}
], - "limit": 2,
- "offset": 0,
- "total": 14154
}| alertThreshold | integer [ 50 .. 95 ] Default: 80 issue notification when audit log storage reach threshold |
| desiredDiskCacheSizeMB | integer >= 10 Default: 100 the maximum desired size in MB, limited to half of the system log storage |
| enableTimeToLive | boolean Default: false |
| reachThresholdPolicy | string Value: "rotate" policy when log size reach limit. |
| timeToLiveDay | integer >= 1 Default: 7 how many days can log live if enableTimeToLive enabled. |
{- "alertThreshold": 90,
- "desiredDiskCacheSizeMB": 10,
- "enableTimeToLive": true,
- "reachThresholdPolicy": "rotate",
- "timeToLiveDay": 7
}{- "data": {
- "alertThreshold": 90,
- "desiredDiskCacheSizeMB": 10,
- "enableTimeToLive": true,
- "maxSizeMB": 500,
- "reachThresholdPolicy": "rotate",
- "timeToLiveDay": 7
}
}{- "data": {
- "events": [
- {
- "category": "Account and Access",
- "eventId": "AA01",
- "name": "roleCreate",
- "severity": "notice"
}, - {
- "category": "Configuration Update",
- "eventId": "CU01",
- "name": "systemInitialize",
- "severity": "notice"
}
], - "names": [
- "roleCreate",
- "systemInitialize"
], - "severities": [
- "notice",
- "alert"
]
}
}| download | boolean Indicate to download log as zip file. Value is always true. |
{- "data": {
- "desiredDiskCacheSizeMB": 100,
- "disks": [
- {
- "free": 858275840,
- "maxFree": 858275840,
- "name": "System",
- "percent": 9.5,
- "total": 1021005824,
- "used": 93106176
}
], - "enableTimeToLive": false,
- "targetDiskName": "System",
- "timeToLiveDay": 1
}
}| desiredDiskCacheSizeMB | integer [ 1 .. 4096 ] the maximum desired size in MB, limited to half of the system log storage if the target disk is "System" |
| enableTimeToLive | boolean |
| targetDiskName | string <= 4096 characters target storage disk name |
| timeToLiveDay | integer [ 1 .. 30 ] days to keep the log |
{- "desiredDiskCacheSizeMB": 20,
- "enableTimeToLive": true,
- "targetDiskName": "System",
- "timeToLiveDay": 1
}{- "data": {
- "desiredDiskCacheSizeMB": 20,
- "disks": [
- {
- "free": 858275840,
- "maxFree": 858275840,
- "name": "System",
- "percent": 9.5,
- "total": 1021005824,
- "used": 93106176
}
], - "enableTimeToLive": true,
- "targetDiskName": "System",
- "timeToLiveDay": 1
}
}