AIG-302 APIs (1.0.0+6642)

Download OpenAPI specification:Download

authentication

Get authentication status

This API returns wether authentication token in header is valid by HTTP status code

Authorizations:
ThingsPro User Auth APIs_auth

Responses

Response samples

Content type
application/json
{
  • "data": "ok"
}

Sign in

Request Body schema: application/json
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}$

Responses

Request samples

Content type
application/json
{
  • "acceptEULA": true,
  • "name": "admin",
  • "password": "moxa1234"
}

Response samples

Content type
application/json
{
  • "data": {
    }
}

taghub

Direct read method by tag

Only 'r', 'rw' access type can work.

Authorizations:
ThingsPro Tag APIs_auth
path Parameters
provider
required
string
source
required
string
tag
required
string

Responses

Response samples

Content type
application/json
{
  • "dataType": "uint16",
  • "dataValue": 1,
  • "prvdName": "modbus_tcp_master",
  • "srcName": "ioLogik",
  • "tagName": "di0",
  • "timestamp": "1560322153374"
}

Direct write method by tag

Only 'w', 'rw' access type can work.

Authorizations:
ThingsPro Tag APIs_auth
path Parameters
provider
required
string
source
required
string
tag
required
string
Request Body schema: application/json
dataType
string
Enum: "uint8" "uint16" "uint32" "uint64" "int8" "int16" "int32" "int64" "float" "double" "string" "boolean" "raw"
dataValue
object

Responses

Request samples

Content type
application/json
{
  • "dataType": "int16",
  • "dataValue": 1
}

Response samples

Content type
application/json
Example
{
  • "error": {
    }
}

Get the list of all tags

Authorizations:
ThingsPro Tag APIs_auth
query Parameters
provider
string

return tag list by a specific provider name

Responses

Response samples

Content type
application/json
Example
{
  • "data": [
    ]
}

Get monitoring tag values

Returns value of tags in taghub which queried by different sources and time

Authorizations:
ThingsPro Tag APIs_auth
path Parameters
provider
required
string

Provider Name - (system, module name, app name)

source
required
string

Source Name - (device name, function name)

query Parameters
tags
string

Tag Name - format (tags=name1,name2,name3)

streamInterval
integer

create a http streaming connection and response data by milliseconds time interval

onChanged
boolean

create a http streaming connection and response data on tag value changed

Responses

Response samples

Content type
application/json
{
  • "data": {
    }
}

general

Get system general configuration.

Get system general configuration.

Authorizations:
ThingsPro Device API_auth

Responses

Response samples

Content type
application/json
{
  • "data": {
    }
}

Update system general configuration.

Update system general configuration.

Authorizations:
ThingsPro Device API_auth
Request Body schema: application/json
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.
- Hostname must be between 1 and 64 octets inclusive.
- Each label in the hostname (component separated by ".") must be between 1 and 63 octets inclusive.
- Each label must start with an ASCII alphabet character (a-z, A-Z), end with an ASCII alphanumeric character (a-z, A-Z, 0-9), and must contain only ASCII alphanumeric characters or hyphens (a-z, A-Z, 0-9, "-").

Responses

Request samples

Content type
application/json
Example
{
  • "description": "This is My Thingspro Edge."
}

Response samples

Content type
application/json
{
  • "data": {
    }
}

time

Get system time configuration.

Get system time configuration.

Authorizations:
ThingsPro Device API_auth

Responses

Response samples

Content type
application/json
{
  • "data": {
    }
}

Update system time configuration.

Update system time configuration.

Authorizations:
ThingsPro Device API_auth
Request Body schema: application/json
object
time
string [ 20 .. 35 ] characters

Current system time (format: RFC3339).

timezone
string [ 1 .. 64 ] characters

device timezone.

Responses

Request samples

Content type
application/json
Example
{
  • "ntp": {
    }
}

Response samples

Content type
application/json
Example
{
  • "data": {
    }
}

Get current timezone information

Get current timezone information

Authorizations:
ThingsPro Device API_auth

Responses

Response samples

Content type
application/json
{
  • "data": {
    }
}

gps

Get gps configuration.

Get gps configuration.

Authorizations:
ThingsPro Ethernet API_auth

Responses

Response samples

Content type
application/json
{
  • "data": {
    }
}

Patch gps configuration.

Patch gps configuration.

Authorizations:
ThingsPro Ethernet API_auth
Request Body schema: application/json
object (ThingsPro Ethernet API_GpsLocation)

Location information, with latitude and longitude data.

mode
required
string
Enum: "manual" "auto"

gps mode.

Responses

Request samples

Content type
application/json
Example
{
  • "mode": "auto"
}

Response samples

Content type
application/json
Example
{
  • "data": {
    }
}

serials

Get serial interfaces configuration.

Get serial interfaces configuration.

Authorizations:
ThingsPro Serial Ports API_auth

Responses

Response samples

Content type
application/json
{
  • "count": 2,
  • "data": [
    ]
}

Update serial interfaces configuration.

Update serial interfaces configuration.

Authorizations:
ThingsPro Serial Ports API_auth
Request Body schema: application/json
Array
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

Responses

Request samples

Content type
application/json
[
  • {
    },
  • {
    }
]

Response samples

Content type
application/json
{
  • "count": 2,
  • "data": [
    ]
}

Get serial interface configuration.

Get serial interface configuration.

Authorizations:
ThingsPro Serial Ports API_auth
path Parameters
id
required
integer
Example: 1

Serial interface id.

Responses

Response samples

Content type
application/json
{
  • "data": {
    }
}

Update serial interface configuration.

Update serial interface configuration.

Authorizations:
ThingsPro Serial Ports API_auth
path Parameters
id
required
integer
Example: 1

Serial interface id.

Request Body schema: application/json
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

Responses

Request samples

Content type
application/json
{
  • "flowControl": "software",
  • "mode": "rs422"
}

Response samples

Content type
application/json
{
  • "data": {
    }
}

IO

Get information of all managed DIs

Get information of all managed DIs

Authorizations:
ThingsPro IOs API_auth

Responses

Response samples

Content type
application/json
{
  • "count": 2,
  • "data": [
    ]
}

Patch to set DI by channel

Patch to set DI by channel

Authorizations:
ThingsPro IOs API_auth
path Parameters
channel
required
integer
Example: 1

managed DI of IO channel start from 1, and mode can't be modified

Request Body schema: application/json
autoSampling
boolean
mode
string
pollingIntervalSec
integer [ 5 .. 3600 ]
Default: 10

Responses

Request samples

Content type
application/json
Example
{
  • "autoSampling": true
}

Response samples

Content type
application/json
{
  • "data": {
    }
}

Get information of all managed DOs

Get information of all managed DOs

Authorizations:
ThingsPro IOs API_auth

Responses

Response samples

Content type
application/json
{
  • "count": 2,
  • "data": [
    ]
}

Patch to set DO by channel

Patch to set DO by channel

Authorizations:
ThingsPro IOs API_auth
path Parameters
channel
required
integer
Example: 1

managed DO of IO channel start from 1, and mode can't be modified

Request Body schema: application/json
initStatus
string
Enum: "ON" "OFF"
mode
string
status
string
Enum: "ON" "OFF"

Responses

Request samples

Content type
application/json
Example
{
  • "initStatus": "OFF",
  • "status": "OFF"
}

Response samples

Content type
application/json
{
  • "data": {
    }
}

network

Get device route configuration of wan.

Get device route configuration of wan.

Authorizations:
ThingsPro Device API_auth

Responses

Response samples

Content type
application/json
{
  • "data": {
    }
}

Get device route configuration.

Get device route configuration.

Authorizations:
ThingsPro Device API_auth

Responses

Response samples

Content type
application/json
{
  • "data": {
    }
}

Update device route configuration. Even if the dev

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.

Authorizations:
ThingsPro Device API_auth
Request Body schema: application/json
priorityList
Array of strings[ items [ 2 .. 15 ] characters [A-Za-z0-9_-]+ ]

Responses

Request samples

Content type
application/json
{
  • "priorityList": [
    ]
}

Response samples

Content type
application/json
{
  • "data": {
    }
}

ethernets

Get ethernet interfaces configuration.

Get ethernet interfaces configuration.

Authorizations:
ThingsPro Ethernet API_auth

Responses

Response samples

Content type
application/json
{
  • "count": 1,
  • "data": [
    ]
}

Update ethernet interface configuration.

Update ethernet interface configuration.

Authorizations:
ThingsPro Ethernet API_auth
Request Body schema: application/json
One of
Array of objects

Responses

Request samples

Content type
application/json
Example
[
  • {
    }
]

Response samples

Content type
application/json
Example
{
  • "data": {
    }
}

Get ethernet interface configuration.

Get ethernet interface configuration.

Authorizations:
ThingsPro Ethernet API_auth
path Parameters
id
required
integer
Example: 1

Ethernet interface id.

Responses

Response samples

Content type
application/json
{
  • "data": {
    }
}

Update ethernet interface configuration.

Update ethernet interface configuration.

Authorizations:
ThingsPro Ethernet API_auth
path Parameters
id
required
integer
Example: 1

Ethernet interface id.

Request Body schema: application/json
One of
enable
required
boolean

Set interface UP.

enableDhcp
required
boolean

Enable (true) the dhcp client.

id
integer >= 1

Identifier of an Ethernet interface.

wan
required
boolean

Define the interface type is WAN (true) or LAN (false)

Responses

Request samples

Content type
application/json
Example
{
  • "enable": true,
  • "enableDhcp": true,
  • "wan": true
}

Response samples

Content type
application/json
Example
{
  • "data": {
    }
}

cellulars

Get cellular interfaces configuration.

Get cellular interfaces configuration.

Authorizations:
ThingsPro Cellular APIs_auth

Responses

Response samples

Content type
application/json
Example
{
  • "count": 1,
  • "data": [
    ]
}

Update cellular interfaces configuration.

Update cellular interfaces configuration.

Authorizations:
ThingsPro Cellular APIs_auth
Request Body schema: application/json
Array
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

Responses

Request samples

Content type
application/json
[
  • {
    }
]

Response samples

Content type
application/json
[
  • {
    }
]

Get cellular interface configuration.

Get cellular interface configuration.

Authorizations:
ThingsPro Cellular APIs_auth
path Parameters
id
required
integer

Cellular interface id.

Responses

Response samples

Content type
application/json
{
  • "capabilities": {
    },
  • "cellId": "6326",
  • "checkalive": {
    },
  • "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": [
    ],
  • "signal": {
    },
  • "signalStrength": 4,
  • "status": "ready",
  • "tac": "",
  • "type": "cellular"
}

Update cellular configuration.

Update cellular configuration.

Authorizations:
ThingsPro Cellular APIs_auth
path Parameters
id
required
integer

Cellular interface id.

Request Body schema: application/json
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

Responses

Request samples

Content type
application/json
{
  • "checkalive": {
    },
  • "enable": true,
  • "profileTimeout": 120,
  • "profiles": [
    ]
}

Response samples

Content type
application/json
{
  • "checkalive": {
    },
  • "displayName": "Cellular1",
  • "enable": true,
  • "id": 1,
  • "profileTimeout": 120,
  • "profiles": [
    ]
}

wifi

Get Wi-Fi interfaces configuration.

Get Wi-Fi interfaces configuration.

query Parameters
event
boolean

Get runtime status, ex: [{id: 1 ,client: {currentAp: "bzLJpU7MR", connectState: "connected", networks: [...]}}, {id:2,...}]

Responses

Response samples

Content type
application/json
{
  • "data": [
    ]
}

Get Wi-Fi interface configuration.

Get Wi-Fi interface configuration.

path Parameters
id
required
integer

Interface id.

Responses

Response samples

Content type
application/json
{
  • "data": {
    }
}

Update Wi-Fi interface configuration.

Update Wi-Fi interface configuration.

path Parameters
id
required
integer

Interface id.

Request Body schema: application/json
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.

Responses

Request samples

Content type
application/json
{
  • "client": {
    },
  • "enable": true,
  • "id": 1,
  • "mode": "client"
}

Response samples

Content type
application/json
{
  • "data": {
    }
}

Get Wi-Fi client networks scan results

Get Wi-Fi client networks scan results

path Parameters
id
required
integer

Interface id.

query Parameters
event
boolean

Get runtime scan, ex: {[{ssid: moxa-test-ap-1, security:{mode: wpa2-personal, encryption: aes, support: true}, signal: -17, band: band50},{...}]}

Responses

Response samples

Content type
application/json
{
  • "data": [
    ]
}

dns

Get static DNS settings.

Get static DNS settings.

Authorizations:
ThingsPro Custom DNS APIs_auth

Responses

Response samples

Content type
application/json
Example
{
  • "data": {
    }
}

Update static DNS settings. If enable is ture, pri

Update static DNS settings. If enable is ture, primary should be required.

Authorizations:
ThingsPro Custom DNS APIs_auth
Request Body schema: application/json
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]?)\...

Responses

Request samples

Content type
application/json
Example
{
  • "enable": false,
  • "primary": "",
  • "secondary": ""
}

Response samples

Content type
application/json
Example
{
  • "data": {
    }
}

azure iotedge

Get azure iotedge configuration.

Get azure iotedge configuration.

Authorizations:
ThingsPro Services Management APIs_auth

Responses

Response samples

Content type
application/json
{
  • "data": {
    }
}

Update azure iotedge configuration.

Update azure iotedge configuration.

Authorizations:
ThingsPro Services Management APIs_auth
Request Body schema: application/json
object
edgeAgentURI
string

default URI of edgeAgent

object

IoT Edge runtime information

object

Responses

Request samples

Content type
application/json
Example
{
  • "downstreamCerts": {
    }
}

Response samples

Content type
application/json
{
  • "data": {
    }
}

Export user self generate downstream certificates.

Export user self generate downstream certificates.

Authorizations:
ThingsPro Services Management APIs_auth

Responses

Response samples

Content type
application/json
{
  • "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

Import user certificates and update azure iotedge configuration.

Authorizations:
ThingsPro Services Management APIs_auth
Request Body schema: multipart/form-data

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

Responses

Response samples

Content type
application/json
{
  • "data": {
    }
}

get defender runtime information.

get defender runtime information.

Authorizations:
ThingsPro Services Management APIs_auth

Responses

Response samples

Content type
application/json
{
  • "data": {
    }
}

reload defender (need enable defender).

reload defender (need enable defender).

Authorizations:
ThingsPro Services Management APIs_auth

Responses

Response samples

Content type
application/json
{
  • "data": {
    }
}

Restart azure module.

Restart azure module.

Authorizations:
ThingsPro Services Management APIs_auth
path Parameters
name
required
string
Value: "restart"

control action.

Responses

Response samples

Content type
application/json
{
  • "data": "edgeAgent restart success"
}

Reset AIE APP(include iotedge runtime) cache and c

Reset AIE APP(include iotedge runtime) cache and configuration.

Authorizations:
ThingsPro Services Management APIs_auth

Responses

Response samples

Content type
application/json
{
  • "data": {
    }
}

Control azure iotedge service.

Control azure iotedge service.

Authorizations:
ThingsPro Services Management APIs_auth

Responses

Response samples

Content type
application/json
{
  • "data": {
    }
}

get azure iotedge service account list

get azure iotedge service account list

Authorizations:
ThingsPro Services Management APIs_auth

Responses

Response samples

Content type
application/json
{
  • "data": [
    ]
}

create new azure iotedge service account

Authorizations:
ThingsPro Services Management APIs_auth
Request Body schema: application/json
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.

Responses

Request samples

Content type
application/json
{
  • "addon": [
    ],
  • "displayname": "My Test APP",
  • "name": "testapp",
  • "required": [
    ],
  • "source": "AzureIoTEdge"
}

Response samples

Content type
application/json
{
  • "data": {
    }
}

delete permission of service

Authorizations:
ThingsPro Services Management APIs_auth
path Parameters
name
required
string

Responses

update service account

Authorizations:
ThingsPro Services Management APIs_auth
path Parameters
name
required
string
Request Body schema: application/json
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

Responses

Request samples

Content type
application/json
{
  • "addon": [
    ],
  • "displayname": "My Test APP",
  • "name": "testapp",
  • "required": [
    ],
  • "source": "AzureIoTEdge"
}

Response samples

Content type
application/json
{
  • "data": {
    }
}

get twin properties setting.

get twin properties setting.

Authorizations:
ThingsPro Services Management APIs_auth

Responses

Response samples

Content type
application/json
{
  • "data": {
    }
}

update twin properties setting.

update twin properties setting.

Authorizations:
ThingsPro Services Management APIs_auth
Request Body schema: application/json
object

Responses

Request samples

Content type
application/json
{
  • "device": {
    }
}

Response samples

Content type
application/json
{
  • "data": {
    }
}

azure_device

Get azure iot device configuration.

Get azure iot device configuration.

Authorizations:
ThingsPro Cloud APIs_auth

Responses

Response samples

Content type
application/json
{
  • "data": {
    }
}

Setup x509 certificates.

Setup x509 certificates.

Authorizations:
ThingsPro Cloud APIs_auth
Request Body schema: multipart/form-data
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

Responses

Response samples

Content type
application/json
{
  • "data": {
    }
}

Update provisioning configuration.

Update provisioning configuration.

Authorizations:
ThingsPro Cloud APIs_auth
Request Body schema: application/json
object

Responses

Request samples

Content type
application/json
Example
{
  • "provisioning": {
    }
}

Response samples

Content type
application/json
{
  • "data": {
    }
}

get store and forward setting.

get store and forward setting.

Authorizations:
ThingsPro Cloud APIs_auth

Responses

Response samples

Content type
application/json
{
  • "data": {
    }
}

update store and forward setting.

update store and forward setting.

Authorizations:
ThingsPro Cloud APIs_auth
Request Body schema: application/json
desiredDiskCacheSizeMB
integer
Array of objects
dropBehavior
string
Enum: "oldest" "newest"
enable
boolean
Default: false
targetDiskName
string
timeToLiveSec
integer

Responses

Request samples

Content type
application/json
{
  • "desiredDiskCacheSizeMB": 8,
  • "dropBehavior": "oldest",
  • "enable": true,
  • "targetDiskName": "System",
  • "timeToLiveSec": 7200
}

Response samples

Content type
application/json
{
  • "data": {
    }
}

get twin properties setting.

get twin properties setting.

Authorizations:
ThingsPro Cloud APIs_auth

Responses

Response samples

Content type
application/json
{
  • "data": {
    }
}

update twin properties setting.

update twin properties setting.

Authorizations:
ThingsPro Cloud APIs_auth
Request Body schema: application/json
object

Responses

Request samples

Content type
application/json
{
  • "device": {
    }
}

Response samples

Content type
application/json
{
  • "data": {
    }
}

mqtt

Get MQTT client configuration.

Get MQTT client configuration.

Authorizations:
ThingsPro Cloud APIs_auth

Responses

Response samples

Content type
application/json
{
  • "data": [
    ]
}

Create a MQTT client configuration.

Create a MQTT client configuration.

Authorizations:
ThingsPro Cloud APIs_auth
Request Body schema:
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
  • ThingsPro Edge REST API invocation(request/response patten)
  • required headers:
    • request-expired-time: UTC
    • request-id: int string
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

Responses

Request samples

Content type
{
  • "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": {
    },
  • "retain": false,
  • "retryInterval": 60,
  • "server": "127.0.0.1",
  • "tlsVersion": "1.2",
  • "userName": "moxa",
  • "willMessage": {
    }
}

Response samples

Content type
application/json
{
  • "data": [
    ]
}

delete MQTT client configuration.

delete MQTT client configuration.

Authorizations:
ThingsPro Cloud APIs_auth
path Parameters
id
required
integer

the id in the configuration of mqtt clients.

Responses

Response samples

Content type
application/json
{
  • "data": [
    ]
}

Edit MQTT client configuration.

Edit MQTT client configuration.

Authorizations:
ThingsPro Cloud APIs_auth
path Parameters
id
required
integer

the id in the configuration of mqtt clients.

Request Body schema:
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
  • ThingsPro Edge REST API invocation(request/response patten)
  • required headers:
    • request-expired-time: UTC
    • request-id: int string
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

Responses

Request samples

Content type
{
  • "certificate": {
    },
  • "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": {
    },
  • "retain": false,
  • "retryInterval": 60,
  • "server": "127.0.0.1",
  • "status": "connected",
  • "tlsVersion": "1.2",
  • "userName": "moxa",
  • "willMessage": {
    }
}

Response samples

Content type
application/json
{
  • "data": {
    }
}

delete certficate.

delete certficate.

Authorizations:
ThingsPro Cloud APIs_auth
path Parameters
id
required
integer

the id in the configuration of mqtt clients.

Responses

Response samples

Content type
application/json
{
  • "data": {
    }
}

get store and forward setting.

get store and forward setting.

Authorizations:
ThingsPro Cloud APIs_auth
path Parameters
id
required
integer

the id in the configuration of mqtt clients.

Responses

Response samples

Content type
application/json
{
  • "data": {
    }
}

update store and forward setting.

update store and forward setting.

Authorizations:
ThingsPro Cloud APIs_auth
path Parameters
id
required
integer

the id in the configuration of mqtt clients.

Request Body schema: application/json
desiredDiskCacheSizeMB
integer
Array of objects
dropBehavior
string
Enum: "oldest" "newest"
enable
boolean
Default: false
targetDiskName
string
timeToLiveSec
integer

Responses

Request samples

Content type
application/json
{
  • "desiredDiskCacheSizeMB": 8,
  • "dropBehavior": "oldest",
  • "enable": true,
  • "targetDiskName": "System",
  • "timeToLiveSec": 7200
}

Response samples

Content type
application/json
{
  • "data": {
    }
}

modbus master

Get all of master serial ports' configurations

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Get specific master serial port's configuration

path Parameters
masterSerIfaceId
required
integer

ID of port.

Responses

Response samples

Content type
application/json
{
  • "charInterval": 0,
  • "format": 0,
  • "frameInterval": 0,
  • "initialDelay": 0,
  • "masterSerIfaceId": 0,
  • "portValue": 0,
  • "remoteDevs": [
    ],
  • "responseTout": 1000,
  • "retryCount": 3,
  • "serMasterId": 0
}

Modify some of specific master serial port configuration

The configuration which does not belong to the request would not be changed.

path Parameters
masterSerIfaceId
required
integer

ID of port.

Request Body schema: application/json
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.

Responses

Request samples

Content type
application/json
Example
{
  • "charInterval": 0,
  • "format": 0,
  • "frameInterval": 0,
  • "initialDelay": 0,
  • "portValue": 0,
  • "responseTout": 1000,
  • "retryCount": 3,
  • "serMasterId": 1
}

Response samples

Content type
application/json
{
  • "charInterval": 0,
  • "format": 0,
  • "frameInterval": 0,
  • "initialDelay": 0,
  • "masterSerIfaceId": 0,
  • "portValue": 0,
  • "remoteDevs": [
    ],
  • "responseTout": 1000,
  • "retryCount": 3,
  • "serMasterId": 0
}

Get all of master TCPs' configurations

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Get specific master TCP's configuration

path Parameters
masterTcpIfaceId
required
integer

ID of TCP.

Responses

Response samples

Content type
application/json
{
  • "initialDelay": 0,
  • "masterTcpIfaceId": 0,
  • "remoteDevs": [
    ],
  • "responseTout": 1000,
  • "retryCount": 3,
  • "tcpMasterId": 0
}

Modify some of specific master TCP configuration

The configuration which does not belong to the request would not be changed.

path Parameters
masterTcpIfaceId
required
integer

ID of TCP.

Request Body schema: application/json
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.

Responses

Request samples

Content type
application/json
{
  • "initialDelay": 0,
  • "responseTout": 1000,
  • "retryCount": 3,
  • "tcpMasterId": 1
}

Response samples

Content type
application/json
{
  • "initialDelay": 0,
  • "masterTcpIfaceId": 0,
  • "remoteDevs": [
    ],
  • "responseTout": 1000,
  • "retryCount": 3,
  • "tcpMasterId": 0
}

Modify all of master TCP configuration

The configuration which does not belong to the request would be the default value.

path Parameters
masterTcpIfaceId
required
integer

ID of TCP.

Request Body schema: application/json
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.

Responses

Request samples

Content type
application/json
{
  • "initialDelay": 0,
  • "responseTout": 1000,
  • "retryCount": 3,
  • "tcpMasterId": 1
}

Response samples

Content type
application/json
{
  • "initialDelay": 0,
  • "masterTcpIfaceId": 0,
  • "remoteDevs": [
    ],
  • "responseTout": 1000,
  • "retryCount": 3,
  • "tcpMasterId": 0
}

Apply the Modbus Master configuration(it will restart the modbus daemon)

Responses

Response samples

Content type
application/json
{
  • "error": {
    }
}

export the configuration of Modbus masters

Responses

Response samples

Content type
application/json
{
  • "error": {
    }
}

import a configuration file into Modbus masters

Request Body schema: multipart/form-data
mastersFile
string

Modbus masters csv file.

Responses

Response samples

Content type
application/json
{
  • "count": 0,
  • "data": [
    ]
}

export the configuration of master commands

query Parameters
remoteDevId
required
integer

/export?remoteDevId=1.

Responses

Response samples

Content type
application/json
{
  • "error": {
    }
}

import a configuration file into master commands for a remote device

Request Body schema: multipart/form-data
mcmdsFile
string

Master command csv file.

remoteDevId
any

Remote device ID.

Responses

Response samples

Content type
application/json
{
  • "count": 0,
  • "data": [
    ]
}

Get current modbus daemon system log level

Responses

Response samples

Content type
application/json
"ALL"

set modbus dameon system log level

Request Body schema: application/json

system log level.

logLevel
string (Modbus Module API_log_level_str)
Enum: "ALL" "TRACE" "DEBUG" "INFO" "WARN" "ERROR" "FATAL" "OFF"

system log level.

Responses

Request samples

Content type
application/json
{
  • "logLevel": "DEBUG"
}

Response samples

Content type
application/json
Example
{
  • "error": {
    }
}

modbus slave

Delete all slave zones or specific zones configuration. If there is NO query added, it means delete all slave zones.

query Parameters
delAll
string
Value: "false"

/szones?delAll=false would delete one or more szoneId(s) specified in the payload.

Request Body schema: application/json

szoneId(s) to be deleted.

szoneId
required
Array of integers

Responses

Request samples

Content type
application/json
{
  • "szoneId": [
    ]
}

Response samples

Content type
application/json
Example
{
  • "error": {
    }
}

Get all of slave zones' configurations

Responses

Response samples

Content type
application/json
{
  • "data": [
    ]
}

Delete specific slave zone's configuration

path Parameters
szoneId
required
string

ID of szone.

Responses

Response samples

Content type
application/json
{
  • "error": {
    }
}

Get specific slave zone's configuration

path Parameters
szoneId
required
string

ID of szone.

Responses

Response samples

Content type
application/json
{
  • "data": {
    }
}

Modify some of specific slave zone configuration

The configuration which does not belong to the request would not be changed.

path Parameters
szoneId
required
string

ID of szone.

Request Body schema: application/json
One of
address
integer [ 0 .. 65535 ]
Default: 0

Modbus start address, like Modbus command address, it used for tag mapping used.

Responses

Request samples

Content type
application/json
{
  • "address": 10
}

Response samples

Content type
application/json
{
  • "data": {
    }
}

Add slave zone(s) configuration

query Parameters
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.

Request Body schema: application/json

Slave zone data.

One of
required
Array of objects
tcpSlaveId
required
integer

Used as foreign key for szone table.

Responses

Request samples

Content type
application/json
Example
{
  • "refTags": [
    ],
  • "tcpSlaveId": 1
}

Response samples

Content type
application/json
{
  • "data": [
    ]
}

Get specific TCP slave's configuration

path Parameters
tcpSlaveId
required
string

ID of tcpSlave.

Responses

Response samples

Content type
application/json
{
  • "data": {
    }
}

Modify some of specific TCP slave configuration

The configuration which does not belong to the request would not be changed.

path Parameters
tcpSlaveId
required
string

ID of tcpSlave.

Request Body schema: application/json
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.

Responses

Request samples

Content type
application/json
Example
{
  • "enable": 1
}

Response samples

Content type
application/json
{
  • "data": {
    }
}

Apply the Modbus Slave configuration(it will restart the modbus daemon)

Responses

Response samples

Content type
application/json
{
  • "error": {
    }
}

Rearrange all szones of specific data format based on the sequence in the payload, starting from address 0.

Request Body schema: application/json

sequence of szoneId

dataFormat
required
integer
Enum: 0 1 2 3

Data format to be rearranged.

  • 0: Coils
  • 1: Discretes Input
  • 2: Holding Registers
  • 3: Input Registers
required
Array of objects (Modbus Module API_szone_sequence)

Sequence of szoneId for specific data format

Responses

Request samples

Content type
application/json
Example
{
  • "dataFormat": 0,
  • "sequence": [
    ]
}

Response samples

Content type
application/json
{
  • "data": [
    ]
}

function

delete target function

Delete an existed function

Authorizations:
ThingsPro Edge Function_bearerAuth
query Parameters
id
required
string

ID is target function's name

Responses

display function list

Display so far user defined functions.

Authorizations:
ThingsPro Edge Function_bearerAuth
query Parameters
event
boolean

Enable server-sent event

Responses

Response samples

Content type
application/json
{
  • "data": [
    ]
}

update target function by function name

Edit an existed function by function name. If doesn't exist, function app will create a new one.

Authorizations:
ThingsPro Edge Function_bearerAuth
Request Body schema: application/json
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)

Responses

Request samples

Content type
application/json
{
  • "enabled": false,
  • "name": "timedriven"
}

Response samples

Content type
application/json
{
  • "data": [
    ]
}

add target function

Add a new function by upload tar.gz that packs function index.py(python program) and package.json(metadata)

Authorizations:
ThingsPro Edge Function_bearerAuth
Request Body schema: multipart/form-data
file
string <binary>

configuration file

Responses

Response samples

Content type
application/json
{
  • "data": [
    ]
}

get up-to-date all installed python modules

up-to-date all installed python modules

Authorizations:
ThingsPro Edge Function_bearerAuth

Responses

Response samples

Content type
application/json
{
  • "data": [
    ]
}

install/uninstall desired python modules

install/uninstall desired python modules

Authorizations:
ThingsPro Edge Function_bearerAuth
query Parameters
uninstall
boolean

a flag to change operation from install to uninstall python modules

Request Body schema: application/json
pip
Array of strings
timeout
integer [ 1 .. 120 ]

Responses

Request samples

Content type
application/json
{
  • "pip": [
    ],
  • "timeout": 60
}

security advisor

get latest security scan result

Authorizations:
Security Advisor APIs_auth
query Parameters
download
boolean
Examples:
  • download=true - Download Latest Security Scan Result in PDF format
  • download=false - Get Latest Security Scan Result

provide download by query string

Responses

Response samples

Content type
application/json
{
  • "data": {
    }
}

certificate

returns all certificates

returns all certificates

Authorizations:
ThingsPro Secrets Management Service APIs_auth

Responses

Response samples

Content type
application/json
{
  • "count": 0,
  • "data": [
    ]
}

returns certificate

returns certificate

Authorizations:
ThingsPro Secrets Management Service APIs_auth
path Parameters
uuid
required
integer
query Parameters
download
boolean

Responses

Response samples

Content type
application/json
{
  • "count": 0,
  • "data": [
    ]
}

firewall system rule

Get firewall host inbound rules.

Get firewall host inbound rules.

Authorizations:
ThingsPro Firewall APIs_auth

Responses

Response samples

Content type
application/json
{
  • "count": 1,
  • "data": [
    ]
}

Modify the system rule to restrict access only fro

Modify the system rule to restrict access only from specific source IP or source ports.

Authorizations:
ThingsPro Firewall APIs_auth
path Parameters
id
required
integer

rule ID

Request Body schema: application/json
Array
sourceIp
required
string
Default: ""

Packet soruce IP. Support:

  • 192.168.0.1
  • 192.168.0.1/24
  • empty string
sourcePort
string

Packet soruce port. Support:

  • 502
  • 502-505
  • empty string

Responses

Request samples

Content type
application/json
{
  • "sourceIp": "10.128.10.0/24",
  • "sourcePort": ""
}

Response samples

Content type
application/json
{
  • "count": 1,
  • "data": [
    ]
}

firewall user rule

Delete user customize filter or port forwarding ru

Delete user customize filter or port forwarding rule of firewall inbound

Authorizations:
ThingsPro Firewall APIs_auth
query Parameters
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

Responses

Response samples

Content type
application/json
Example
{
  • "error": {
    }
}

Get firewall user customize inbound rules overview

Get firewall user customize inbound rules overview.

Authorizations:
ThingsPro Firewall APIs_auth
query Parameters
type
required
string
Enum: "allow" "forward"

rule operation type. allow is filter of whilelist, forward is port forwarding of whilelist.

Responses

Response samples

Content type
application/json
Example
{
  • "count": 1,
  • "data": [
    ]
}

Modify user customize filter or port forwarding ru

Modify user customize filter or port forwarding rule of firewall inbound

Authorizations:
ThingsPro Firewall APIs_auth
query Parameters
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

Request Body schema: application/json
One of
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:

  • 192.168.0.1
  • 192.168.0.1/24
  • empty string
sourcePort
string
Default: ""

Packet soruce port. Support:

  • 502
  • 502-505
  • empty string

Responses

Request samples

Content type
application/json
Example
{
  • "gatewayPort": "8081",
  • "name": "open listen port 8081",
  • "protocol": "tcp",
  • "sourceIp": "",
  • "sourcePort": ""
}

Response samples

Content type
application/json
Example
{
  • "count": 1,
  • "data": [
    ]
}

Add user customize rule for allow filter port or p

Add user customize rule for allow filter port or port forwarding

Authorizations:
ThingsPro Firewall APIs_auth
query Parameters
type
required
string
Enum: "allow" "forward"

rule operation type. allow is filter of whilelist, forward is port forwarding of whilelist.

Request Body schema: application/json
Array
One of
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:

  • 192.168.0.1
  • 192.168.0.1/24
  • empty string
sourcePort
string
Default: ""

Packet soruce port. Support:

  • 502
  • 502-505
  • empty string

Responses

Request samples

Content type
application/json
Example
[
  • {
    }
]

Response samples

Content type
application/json
Example
{
  • "count": 1,
  • "data": [
    ]
}

Get firewall user snat status

Get firewall user snat status

Authorizations:
ThingsPro Firewall APIs_auth

Responses

Response samples

Content type
application/json
{
  • "data": {
    }
}

Put firewall user snat to enable or disable.

Put firewall user snat to enable or disable.

Authorizations:
ThingsPro Firewall APIs_auth
Request Body schema: application/json
enable
required
boolean

snat status

Responses

Request samples

Content type
application/json
{
  • "enable": true
}

Response samples

Content type
application/json
{
  • "data": {
    }
}

httpserver

Get httpserver configuration

Authorizations:
ThingsPro HTTP(s) Server APIs_auth

Responses

Response samples

Content type
application/json
{
  • "data": {
    }
}

Set httpserver configuration partially

Authorizations:
ThingsPro HTTP(s) Server APIs_auth
Request Body schema:
httpsPort
integer

listen port for https, value should be 443 or between 1024 to 65535

redirectToHttps
boolean

Responses

Request samples

Content type
{
  • "httpsPort": 8443,
  • "redirectToHttps": false
}

Response samples

Content type
application/json
{
  • "data": {
    }
}

Set httpserver configuration partially

Authorizations:
ThingsPro HTTP(s) Server APIs_auth
Request Body schema:
httpsPort
integer

listen port for https, value should be 443 or between 1024 to 65535

redirectToHttps
boolean

Responses

Request samples

Content type
{
  • "httpsPort": 8443,
  • "redirectToHttps": false
}

Response samples

Content type
application/json
{
  • "data": {
    }
}

auth-lock

Get auth lock configuration

Authorizations:
ThingsPro User Auth APIs_auth

Responses

Response samples

Content type
application/json
{
  • "data": {
    }
}

update auth lock configuration

Authorizations:
ThingsPro User Auth APIs_auth
Request Body schema: application/json
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

Responses

Request samples

Content type
application/json
{
  • "enable": true,
  • "failTimes": 10,
  • "failWindow": 1,
  • "lockWindow": 10
}

Response samples

Content type
application/json
{
  • "data": {
    }
}

Get locked account id

Authorizations:
ThingsPro User Auth APIs_auth

Responses

Response samples

Content type
application/json
{
  • "data": [
    ]
}

sessions

delete sessions, require at least one parameter in ids or userIds

Authorizations:
ThingsPro User Auth APIs_auth
query Parameters
ids
integer

Delete sessions with given session ID, seperated by comma(,)

userIds
integer

Delete user sessions with given user ID, seperated by comma(,)

Responses

Response samples

Content type
application/json
{
  • "error": {
    }
}

get session list

Authorizations:
ThingsPro User Auth APIs_auth
query Parameters
userIds
integer

Get sessions with given user ID, seperated by comma(,)

Responses

Response samples

Content type
application/json
{
  • "count": 2,
  • "data": [
    ]
}

delete session by ID

Authorizations:
ThingsPro User Auth APIs_auth
path Parameters
id
required
integer

ID of session

Responses

Response samples

Content type
application/json
{
  • "error": {
    }
}

get session by ID

Authorizations:
ThingsPro User Auth APIs_auth
path Parameters
id
required
integer

ID of session

Responses

Response samples

Content type
application/json
{
  • "data": {
    }
}

get session control configuration

Authorizations:
ThingsPro User Auth APIs_auth

Responses

Response samples

Content type
application/json
{
  • "data": {
    }
}

update session control configuration

Authorizations:
ThingsPro User Auth APIs_auth
Request Body schema: application/json
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

Responses

Request samples

Content type
application/json
{
  • "idleTimeoutMin": 5,
  • "maxCountByUser": 5,
  • "timeoutMin": 1440
}

Response samples

Content type
application/json
{
  • "data": {
    }
}

openvpn

getOvpnSettings

Get OpenVpn client setting

Responses

Response samples

Content type
application/json
{
  • "data": {
    }
}

enable OpenVpn client with current profile file

enable OpenVpn client with current profile file

Request Body schema: application/json
enable
boolean

Responses

Request samples

Content type
application/json
{
  • "enable": true
}

Export an OpenVpn client logs file

Export an OpenVpn client logs file

Responses

Delete Target OpenVpn client profile file

Delete Target OpenVpn client profile file

Responses

exportOvpnConfig

Export current OpenVpn client profile file (get smaple config by qurey string)

query Parameters
name
string
Example: name=sample

sample

Responses

getOvpnConfig

Import an OpenVpn client profile file

Request Body schema: multipart/form-data
filename
string

Responses

system use notification

Get system use notification configuration

Authorizations:
ThingsPro Systemn API_auth

Responses

Response samples

Content type
application/json
{
  • "data": {
    }
}

Set system use notification configuration

Authorizations:
ThingsPro Systemn API_auth
Request Body schema: application/json
enable
boolean
Default: true

enable system use notification

enableDefaultText
boolean
Default: true

use default text

userText
string [ 0 .. 1024 ] characters

text of user configured

Responses

Request samples

Content type
application/json
{
  • "enable": true,
  • "enableDefaultText": true,
  • "userText": "user text."
}

Response samples

Content type
application/json
{
  • "data": {
    }
}

users

Query account list

Authorizations:
ThingsPro User Auth APIs_auth

Responses

Response samples

Content type
application/json
{
  • "count": 1,
  • "data": [
    ]
}

Add new account

Authorizations:
ThingsPro User Auth APIs_auth
Request Body schema: application/json
description
string or null <= 512 characters \X{0,512}
email
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

Responses

Request samples

Content type
application/json
{
  • "isActive": true,
  • "name": "admin",
  • "password": "admin@123",
  • "roles": [
    ]
}

Response samples

Content type
application/json
{
  • "data": {
    }
}

Delete account by ID

Authorizations:
ThingsPro User Auth APIs_auth
path Parameters
id
required
integer

ID of user

Responses

Response samples

Content type
application/json
{
  • "error": {
    }
}

Query account by ID

Authorizations:
ThingsPro User Auth APIs_auth
path Parameters
id
required
integer

ID of account

Responses

Response samples

Content type
application/json
{
  • "data": {
    }
}

Update account by ID

Authorizations:
ThingsPro User Auth APIs_auth
path Parameters
id
required
integer

ID of user

Request Body schema: application/json
description
string <= 512 characters \X{0,512}
email
string <email>
isActive
boolean
Array of objects non-empty

Responses

Request samples

Content type
application/json
{
  • "isActive": true,
  • "roles": [
    ]
}

Response samples

Content type
application/json
{
  • "data": {
    }
}

Update account's password by ID

Authorizations:
ThingsPro User Auth APIs_auth
path Parameters
id
required
integer

ID of account

Request Body schema: application/json
newPassword
required
string <password> [ 8 .. 256 ] characters ^[0-9a-zA-z~`!@#$%^&*()_\-+={}\[\]|\\:\";'<>?...

Responses

Request samples

Content type
application/json
{
  • "newPassword": "12345678"
}

Response samples

Content type
application/json
{
  • "data": {
    }
}

Query who I am

Authorizations:
ThingsPro User Auth APIs_auth

Responses

Response samples

Content type
application/json
{
  • "data": {
    }
}

Update current account's information

Authorizations:
ThingsPro User Auth APIs_auth
Request Body schema: application/json
description
string <= 512 characters \X{0,512}
email
string <email>

Responses

Request samples

Content type
application/json
{
  • "email": "aa@aaa.aaa"
}

Response samples

Content type
application/json
{
  • "data": {
    }
}

Update current account's password

Authorizations:
ThingsPro User Auth APIs_auth
Request Body schema: application/json
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

Responses

Request samples

Content type
application/json
{
  • "newPassword": "12345678",
  • "oldPassword": "moxa1234"
}

Response samples

Content type
application/json
{
  • "data": {
    }
}

roles

Query permissions

Authorizations:
ThingsPro User Auth APIs_auth

Responses

Response samples

Content type
application/json
{
  • "count": 2,
  • "data": [
    ]
}

Query roles

Authorizations:
ThingsPro User Auth APIs_auth

Responses

Response samples

Content type
application/json
{
  • "count": 1,
  • "data": [
    ]
}

create a role

Authorizations:
ThingsPro User Auth APIs_auth
Request Body schema: application/json
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

Responses

Request samples

Content type
application/json
{
  • "description": "",
  • "name": "myrole",
  • "permissions": [
    ]
}

Response samples

Content type
application/json
{
  • "data": {
    }
}

Delete role by ID

Authorizations:
ThingsPro User Auth APIs_auth
path Parameters
id
required
integer

ID of role

Responses

Response samples

Content type
application/json
{
  • "error": {
    }
}

get role by ID

Authorizations:
ThingsPro User Auth APIs_auth
path Parameters
id
required
integer

ID of role

Responses

Response samples

Content type
application/json
{
  • "data": {
    }
}

update role by ID

Authorizations:
ThingsPro User Auth APIs_auth
path Parameters
id
required
integer

ID of role

Request Body schema: application/json
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

Responses

Request samples

Content type
application/json
{
  • "description": "",
  • "name": "myrole",
  • "permissions": [
    ]
}

Response samples

Content type
application/json
{
  • "data": {
    }
}

password-policy

Get password policy

Authorizations:
ThingsPro User Auth APIs_auth

Responses

Response samples

Content type
application/json
{
  • "data": {
    }
}

Update password policy

Authorizations:
ThingsPro User Auth APIs_auth
Request Body schema: application/json
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

Responses

Request samples

Content type
application/json
{
  • "atLeastOneDigit": true,
  • "atLeastOneSpecial": true,
  • "enableReminder": true,
  • "lengthMin": 8,
  • "mixedUpperLowerLetters": true,
  • "reminderFrequencyDay": 180
}

Response samples

Content type
application/json
{
  • "data": {
    }
}

bios

Get BIOS configuration

Authorizations:
ThingsPro Systemn API_auth

Responses

Response samples

Content type
application/json
{
  • "data": {
    }
}

Set BIOS configuration

Authorizations:
ThingsPro Systemn API_auth
Request Body schema: application/json
enable
boolean

enable bios configuration

Responses

Request samples

Content type
application/json
{
  • "enable": true
}

Response samples

Content type
application/json
{
  • "data": {
    }
}

provision

Get discovery service status

Authorizations:
ThingsPro Systemn API_auth

Responses

Response samples

Content type
application/json
{
  • "data": {
    }
}

Set discovery service configuration

Authorizations:
ThingsPro Systemn API_auth
Request Body schema: application/json
enable
boolean

enable discovery service

Responses

Request samples

Content type
application/json
{
  • "enable": true
}

Response samples

Content type
application/json
{
  • "data": {
    }
}

internet-check-alive

Get configuration of internet check alive

Get configuration of internet check alive

Authorizations:
ThingsPro Device API_auth

Responses

Response samples

Content type
application/json
{
  • "data": {
    }
}

Do internt check alive

Do internt check alive

Authorizations:
ThingsPro Device API_auth

Responses

Response samples

Content type
application/json
{
  • "data": {
    }
}

Update configuration of internet check alive

Update configuration of internet check alive

Authorizations:
ThingsPro Device API_auth
Request Body schema: application/json
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

Responses

Request samples

Content type
application/json
{
  • "enable": true,
  • "interval": 120,
  • "retry": 5,
  • "target": "www.moxa.com",
  • "timeout": 10
}

Response samples

Content type
application/json
{
  • "data": {
    }
}

serialconsole

Get serial console configuration

Authorizations:
ThingsPro Systemn API_auth

Responses

Response samples

Content type
application/json
{
  • "data": {
    }
}

Set serial console configuration

Authorizations:
ThingsPro Systemn API_auth
Request Body schema: application/json
enable
boolean

enable serial console

Responses

Request samples

Content type
application/json
{
  • "enable": true
}

Response samples

Content type
application/json
{
  • "data": {
    }
}

sshserver

Get SSH configuration

Authorizations:
ThingsPro Systemn API_auth

Responses

Response samples

Content type
application/json
{
  • "data": {
    }
}

Set SSH configuration

Authorizations:
ThingsPro Systemn API_auth
Request Body schema: application/json
enable
boolean

enable SSH

port
integer [ 1 .. 65535 ]

port to listen

Responses

Request samples

Content type
application/json
{
  • "enable": true,
  • "port": 22
}

Response samples

Content type
application/json
{
  • "data": {
    }
}

reboot

Get reboot configuration

Authorizations:
ThingsPro Systemn API_auth

Responses

Response samples

Content type
application/json
{
  • "data": {
    }
}

Reboot system

Authorizations:
ThingsPro Systemn API_auth
Request Body schema: application/json
cronSchedule
string^[0]{1}\s[0-9]{1}\s[*]{1}\s[*]{1}\s[0-6,]{1,1...
enableScheduler
boolean
now
boolean

Responses

Request samples

Content type
application/json
Example
{
  • "now": true
}

Response samples

Content type
application/json
{
  • "data": {
    }
}

configuration

Export configurations

Authorizations:
ThingsPro Systemn API_auth

Responses

Upload configurations

Authorizations:
ThingsPro Systemn API_auth
Request Body schema: multipart/form-data
file
string <binary>

configuration file

Responses

Response samples

Content type
application/json
Example
{
  • "data": {
    }
}

backup-restore

delete backup

Authorizations:
ThingsPro Systemn API_auth

Responses

Response samples

Content type
application/json
{
  • "data": {
    }
}

Get backup infomation

Authorizations:
ThingsPro Systemn API_auth

Responses

Response samples

Content type
application/json
{
  • "data": {
    }
}

toggle backup

Authorizations:
ThingsPro Systemn API_auth

Responses

Response samples

Content type
application/json
{
  • "data": {
    }
}

restore backup

Authorizations:
ThingsPro Systemn API_auth

Responses

Response samples

Content type
application/json
{
  • "error": {
    }
}

Update

Get available updates for current product

returns available updates

Authorizations:
ThingsPro Software Update API_auth
query Parameters
scan
boolean
Example: scan=true

Get real-time updates or by last scan

Responses

Response samples

Content type
application/json
Example
{
  • "checktime": "2023-05-02T03:51:22Z",
  • "data": {
    }
}

Trigger update

Trigger update(s)

Authorizations:
ThingsPro Software Update API_auth
Request Body schema:
Array
string [ 2 .. 128 ] characters ^[a-z0-9][a-z0-9-]{0,126}[a-z0-9]$

Responses

Request samples

Content type
[
  • "openssl"
]

Response samples

Content type
application/json
{
  • "data": [
    ],
  • "message": "Successfully trigger"
}

Get update history

Returns the update history

Authorizations:
ThingsPro Software Update API_auth

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Get update settings

Returns the update settings

Authorizations:
ThingsPro Software Update API_auth

Responses

Response samples

Content type
application/json
{
  • "allowOverCellular": false,
  • "allowUpdate": true,
  • "autoScan": false,
  • "autoScanExpression": "0 3 * * 1,2,3",
  • "snapshotBeforeUpdate": true
}

Patch update setting

Update the update settings

Authorizations:
ThingsPro Software Update API_auth
Request Body schema: application/json
allowOverCellular
boolean
allowUpdate
boolean
autoScan
boolean
autoScanExpression
string/((((\d+,)+\d+|(\d+(\/|-)\d+)|\d+|\*) ?){5})/...
snapshotBeforeUpdate
boolean

Responses

Request samples

Content type
application/json
{
  • "allowOverCellular": false,
  • "allowUpdate": true,
  • "autoScan": false,
  • "autoScanExpression": "0 3 * * 1,2,3",
  • "snapshotBeforeUpdate": true
}

Response samples

Content type
application/json
{
  • "allowOverCellular": false,
  • "allowUpdate": true,
  • "autoScan": false,
  • "autoScanExpression": "0 3 * * 1,2,3",
  • "snapshotBeforeUpdate": true
}

Put update settings

Update the update settings

Authorizations:
ThingsPro Software Update API_auth
Request Body schema: application/json
allowOverCellular
boolean
allowUpdate
boolean
autoScan
boolean
autoScanExpression
string/((((\d+,)+\d+|(\d+(\/|-)\d+)|\d+|\*) ?){5})/...
snapshotBeforeUpdate
boolean

Responses

Request samples

Content type
application/json
{
  • "allowOverCellular": false,
  • "allowUpdate": true,
  • "autoScan": false,
  • "autoScanExpression": "0 3 * * 1,2,3",
  • "snapshotBeforeUpdate": true
}

Response samples

Content type
application/json
{
  • "allowOverCellular": false,
  • "allowUpdate": true,
  • "autoScan": false,
  • "autoScanExpression": "0 3 * * 1,2,3",
  • "snapshotBeforeUpdate": true
}

reset-default

reset system to default configuration

Authorizations:
ThingsPro Systemn API_auth
query Parameters
mode
required
string
Default: "system"
Enum: "factory" "system"
scopes
string
Value: "keep-network-setting"

supported for mode "system", default to reset all configuration

Responses

decommission

compare to set-to-default, decommission will further erase all data stored in the log partition as they might contain security-sensitive information.

Authorizations:
ThingsPro Systemn API_auth

Responses

Response samples

Content type
application/json
{
  • "error": {
    }
}

audit log

Get audits

Authorizations:
ThingsPro Audit Service APIs_auth
query Parameters
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).

Responses

Response samples

Content type
{
  • "count": 2,
  • "data": [
    ],
  • "limit": 2,
  • "offset": 0,
  • "total": 14154
}

Get Audit Log setting configuration

Authorizations:
ThingsPro Audit Service APIs_auth

Responses

Response samples

Content type
application/json
{
  • "data": {
    }
}

Set audit configuration

Authorizations:
ThingsPro Audit Service APIs_auth
Request Body schema: application/json
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.

Responses

Request samples

Content type
application/json
{
  • "alertThreshold": 90,
  • "desiredDiskCacheSizeMB": 10,
  • "enableTimeToLive": true,
  • "reachThresholdPolicy": "rotate",
  • "timeToLiveDay": 7
}

Response samples

Content type
application/json
{
  • "data": {
    }
}

Get Audit Log profile with event ID, name and category list

Authorizations:
ThingsPro Audit Service APIs_auth

Responses

Response samples

Content type
application/json
{
  • "data": {
    }
}

system log

Get system log configuration or download log

Authorizations:
ThingsPro Systemn API_auth
query Parameters
download
boolean

Indicate to download log as zip file. Value is always true.

Responses

Response samples

Content type
application/json
{
  • "data": {
    }
}

Set System Log setting configuration

Authorizations:
ThingsPro Systemn API_auth
Request Body schema: application/json
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

Responses

Request samples

Content type
application/json
{
  • "desiredDiskCacheSizeMB": 20,
  • "enableTimeToLive": true,
  • "targetDiskName": "System",
  • "timeToLiveDay": 1
}

Response samples

Content type
application/json
{
  • "data": {
    }
}