AIG-302 APIs (1.4.0+351)

Download OpenAPI specification:Download

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:
redirectToHttps
boolean
httpsPort
integer

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

Responses

Request samples

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

Response samples

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

Set httpserver configuration partially

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

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

Responses

Request samples

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

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
mode
required
string
Enum: "manual" "auto"

gps mode.

object (ThingsPro Ethernet API_GpsLocation)

Location information, with latitude and longitude data.

Responses

Request samples

Content type
application/json
Example
{
  • "mode": "manual",
  • "location": {
    }
}

Response samples

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

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
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
integer [ 50 .. 95 ]
Default: 80

issue notification when audit log storage reach threshold

Responses

Request samples

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

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

ethernets

Get ethernet interfaces configuration.

Get ethernet interfaces configuration.

Authorizations:
ThingsPro Ethernet API_auth

Responses

Response samples

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

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
id
integer >= 1

Identifier of an Ethernet interface.

enable
required
boolean

Set interface UP.

enableDhcp
required
boolean

Enable (true) the dhcp client.

object

DHCP Client option

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,
  • "dhcpClient": {
    },
  • "wan": true
}

Response samples

Content type
application/json
Example
{
  • "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
time
string [ 20 .. 35 ] characters

Current system time (format: RFC3339).

timezone
string [ 1 .. 64 ] characters

device timezone.

object

Responses

Request samples

Content type
application/json
Example
{
  • "time": "2015-03-26T16:27:48+08:00"
}

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

IO

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

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 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
mode
string
status
string
Enum: "ON" "OFF"
initStatus
string
Enum: "ON" "OFF"

Responses

Request samples

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

Response samples

Content type
application/json
{
  • "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
mode
string
autoSampling
boolean
pollingIntervalSec
integer [ 5 .. 3600 ]
Default: 10

Responses

Request samples

Content type
application/json
Example
{
  • "autoSampling": false,
  • "pollingIntervalSec": 10
}

Response samples

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

network

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 device does not have a cellular or WiFi module, it is still necessary to input and configure the settings as fixed value.

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

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

internet-check-alive

Do internt check alive.

Do internt check alive.

Authorizations:
ThingsPro Device API_auth

Responses

Response samples

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

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

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

target
string [ 1 .. 255 ] characters
Default: "google.com"

target for internet check alive

interval
integer [ 10 .. 86400 ]
Default: 60

interval in seconds for internet check alive

timeout
integer [ 1 .. 60 ]
Default: 5

each check timeout in seconds for internet check alive

retry
integer [ 1 .. 10 ]
Default: 3

retry times for internet check alive

Responses

Request samples

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

Response samples

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

security advisor

get latest security scan result

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

provide download by query string

Responses

Response samples

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

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: [...]}, ap: {...}}, {id:2,...}]

Responses

Response samples

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

Update Wi-Fi interface configuration.

Update Wi-Fi interface configuration.

path Parameters
id
required
integer

Interface id.

Request Body schema: application/json
id
integer

Interface id

mode
string
Enum: "client" "ap"

Given Wi-Fi interface mode.

enable
boolean

Enable Wi-Fi Networking.

object

Configuration of Wi-Fi AP mode.

object

Configuration of Wi-Fi Client mode.

Responses

Request samples

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

Response samples

Content type
application/json
Example
{
  • "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": [
    ]
}

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

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
email
string or null <email>
description
string or null <= 512 characters \X{0,512}
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
email
string <email>
description
string <= 512 characters \X{0,512}
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
email
string <email>
description
string <= 512 characters \X{0,512}

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

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

lengthMin
integer [ 8 .. 256 ]
Default: 8

password minimum length

mixedUpperLowerLetters
boolean
Default: false

password must be mixed upper and lower case

enableReminder
boolean
Default: true

enable password reminder

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,
  • "lengthMin": 8,
  • "mixedUpperLowerLetters": true,
  • "enableReminder": true,
  • "reminderFrequencyDay": 180
}

Response samples

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

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
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
boolean

Responses

Request samples

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

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
failWindow
required
integer [ 1 .. 60 ]
Default: 15

time window to count authenticate fail times in minutes

failTimes
required
integer [ 3 .. 32 ]
Default: 10

authenticate fail times

lockWindow
required
integer [ 5 .. 1440 ]
Default: 10

lock time in minutes

Responses

Request samples

Content type
application/json
{
  • "enable": true,
  • "failWindow": 1,
  • "failTimes": 10,
  • "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

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 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 by ID

Authorizations:
ThingsPro User Auth APIs_auth
path Parameters
id
required
integer

ID of session

Responses

Response samples

Content type
application/json
{
  • "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 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
maxCountByUser
integer [ 1 .. 32 ]
Default: 5

max sessions of a user

timeoutMin
integer [ 60 .. 28800 ]
Default: 1440

session timeout in minutes

idleTimeoutMin
integer [ 1 .. 1440 ]

session timeout while the session timeout, unit in minutes

Responses

Request samples

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

Response samples

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

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: multipart/form-data
file
string <binary>

The offline update signed file to upload.

Responses

Response samples

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

Get update history

Returns the update history

Authorizations:
ThingsPro Software Update API_auth

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Patch update setting

Update the update settings

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

Responses

Request samples

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

Response samples

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

Put update settings

Update the update settings

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

Responses

Request samples

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

Response samples

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

Upgrade

Upload an upgrade file (multipart or URL source)

Uploads an upgrade file in one of two ways:

  1. Multipart upload with a file part containing the raw file.
  2. URL upload with a JSON body specifying a downloadable URL.

Only one file may exist at a time; a successful upload replaces any previously uploaded file.

Authorizations:
ThingsPro Software Update API_auth
Request Body schema:
file
required
string <binary>

Raw file content. The client-supplied part filename will be recorded as the filename in the response.

Responses

Request samples

Content type
{}

Response samples

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

Get current uploaded file status

Returns metadata and status for the currently stored upgrade file.

Authorizations:
ThingsPro Software Update API_auth

Responses

Response samples

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

Delete the current uploaded file

Deletes the currently stored upgrade file and any temporary artifacts.

Authorizations:
ThingsPro Software Update API_auth

Responses

Response samples

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

Execute an upgrade task (file or apt)

Starts an upgrade task.

  • mode=file: Upgrade using the currently stored uploaded file from /system/upgrade/file. If no file is present or file status is not ready, the request fails with 404 or 409.

  • mode=apt: Upgrade using APT. Provide one or more packages. The device will resolve dependencies via its configured APT sources.

allowReboot controls whether the device automatically reboots after a successful upgrade.

Authorizations:
ThingsPro Software Update API_auth
Request Body schema: application/json
mode
required
string

Use the currently uploaded file (from /system/upgrade/file) to perform the upgrade.

fileId
string^patch-[A-Za-z0-9]+$

File identify. Example: "16350285c4fb1306"

allowReboot
required
boolean

Whether to automatically reboot after a successful upgrade.

Responses

Request samples

Content type
application/json
Example
{
  • "mode": "file",
  • "fileId": "16350285c4fb1306",
  • "allowReboot": true
}

Response samples

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

Get the current upgrade task status

Returns metadata and status for the currently running or last executed upgrade task.

  • mode indicates whether the task was file-based or apt-based.
  • status shows the current state of the task.
  • message can provide progress information (e.g., "downloading 40%", "installing package 2/5").
  • allowReboot shows if the system is scheduled to automatically reboot after success.
Authorizations:
ThingsPro Software Update API_auth

Responses

Response samples

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

Start an upgrade (file upload, URL, or APT) in a single endpoint

Combined entrypoint for upgrades.

  • mode=file (multipart/form-data): Upload a file and start an upgrade immediately.
  • mode=file (application/json): Provide a downloadable URL; the device downloads it and starts an upgrade.
  • mode=apt (application/json): Start an APT-based upgrade using provided package list.

Only one upgrade task may run at a time; concurrent requests return 409.

Authorizations:
ThingsPro Software Update API_auth
Request Body schema:
allowReboot
required
boolean

Whether to automatically reboot after a successful upgrade.

file
required
string <binary>

Raw file content to upload then upgrade.

Responses

Request samples

Content type
No sample

Response samples

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

firewall-user-zone

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
{
  • "data": [
    ],
  • "count": 1
}

Add user customize rule for allow filter port or port forwarding.

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
id
integer

Rule ID

name
required
string [ 1 .. 32 ] characters ascii passphrase with '-' or '_' characters

Rule name

gatewayPort
required
string

Exposed public port

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
{
  • "data": [
    ],
  • "count": 1
}

Modify user customize filter or port forwarding rule of firewall inbound.

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
id
integer

Rule ID

name
required
string [ 1 .. 32 ] characters ascii passphrase with '-' or '_' characters

Rule name

gatewayPort
required
string

Exposed public port

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
{
  • "name": "open listen port 8081",
  • "gatewayPort": "8081",
  • "protocol": "tcp",
  • "sourceIp": "",
  • "sourcePort": ""
}

Response samples

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

Delete user customize filter or port forwarding rule of firewall inbound.

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

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
enableScheduler
boolean
cronSchedule
string^[0]{1}\s[0-9]{1}\s[*]{1}\s[*]{1}\s[0-6,]{1,1...
now
boolean

Responses

Request samples

Content type
application/json
Example
{
  • "enableScheduler": true,
  • "cronSchedule": "0 0 * * 0,1,2,3,4,5,6"
}

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

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

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

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

encrypt-storage

Get encrypted Storage configuration

Authorizations:
ThingsPro Systemn API_auth

Responses

Response samples

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

Set Encrypted Storage

Authorizations:
ThingsPro Systemn API_auth
Request Body schema: application/json
disk
required
string

disk partition name

encrypted
required
boolean

enable encrypted storage (disable is not allowed)

password
required
string

encrypted password

Responses

Request samples

Content type
application/json
{
  • "disk": "USB3_p2",
  • "encrypted": true,
  • "password": "moxamoxa"
}

Response samples

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

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

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

backup-restore

delete backup

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

Get backup infomation

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

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

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
timeToLiveDay
integer [ 1 .. 30 ]

days to keep the log

targetDiskName
string <= 4096 characters

target storage disk name

Responses

Request samples

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

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, primary should be required.

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": true,
  • "primary": "8.8.8.8",
  • "secondary": "1.1.1.1"
}

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
id
integer

Interface id.

enable
required
boolean

Enable Cellular Networking.

profileTimeout
required
integer [ 120 .. 3600 ]
Default: 180

Retry timeout in seconds for switch profiles.

required
Array of objects (Cellular Profile)

Profiles for redundancy

required
object (Checkalive Settings)

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
{
  • "currentProfileName": "Profile-1",
  • "ip": "",
  • "tac": "",
  • "type": "cellular",
  • "operatorName": "",
  • "checkalive": {
    },
  • "capabilities": {
    },
  • "id": 1,
  • "gateway": "",
  • "profileTimeout": 180,
  • "imsi": "466977300046885",
  • "status": "ready",
  • "enable": false,
  • "dns": [ ],
  • "lac": "11114",
  • "mac": "00:00:11:12:13:14",
  • "imei": "359841080332053",
  • "cellId": "6326",
  • "name": "wwan0",
  • "displayName": "Cellular1",
  • "signalStrength": 4,
  • "signal": {
    },
  • "pinRetryRemain": -1,
  • "netmask": "",
  • "profiles": [
    ],
  • "mode": "lte",
  • "iccId": "89886971410730170000"
}

Update cellular configuration.

Update cellular configuration.

Authorizations:
ThingsPro Cellular APIs_auth
path Parameters
id
required
integer

Cellular interface id.

Request Body schema: application/json
id
integer

Interface id.

enable
required
boolean

Enable Cellular Networking.

profileTimeout
required
integer [ 120 .. 3600 ]
Default: 180

Retry timeout in seconds for switch profiles.

required
Array of objects (Cellular Profile)

Profiles for redundancy

required
object (Checkalive Settings)

Responses

Request samples

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

Response samples

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

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

taghub

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

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
{
  • "prvdName": "modbus_tcp_master",
  • "srcName": "ioLogik",
  • "tagName": "di0",
  • "timestamp": "1560322153374",
  • "dataType": "uint16",
  • "dataValue": 1
}

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"
integer or number or string or boolean

The value to write. Accepted type depends on dataType: int8 (-128 ~ 127), int16 (-32768 ~ 32767), int32 (-2147483648 ~ 2147483647), int64 (-9223372036854775808 ~ 9223372036854775807), uint8 (0 ~ 255), uint16 (0 ~ 65535), uint32 (0 ~ 4294967295), uint64 (0 ~ 18446744073709551615), float (IEEE 754 single-precision), double (IEEE 754 double-precision), boolean (true/false), string (text value). Integer values may be passed as either a JSON number or a string.

Responses

Request samples

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

Response samples

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

serials

Get serial interfaces configuration.

Get serial interfaces configuration.

Authorizations:
ThingsPro Serial Ports API_auth

Responses

Response samples

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

Update serial interfaces configuration.

Update serial interfaces configuration.

Authorizations:
ThingsPro Serial Ports API_auth
Request Body schema: application/json
Array
id
integer

Interface id.

mode
string
Enum: "rs232" "rs422" "rs4852w" "rs4854w"

Serial interface mode.

baudRate
integer

baud rate

parity
string

parity

dataBits
integer

data bits

stopBits
number

stop bits

flowControl
string

flow control

Responses

Request samples

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

Response samples

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

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
id
integer

Interface id.

mode
string
Enum: "rs232" "rs422" "rs4852w" "rs4854w"

Serial interface mode.

baudRate
integer

baud rate

parity
string

parity

dataBits
integer

data bits

stopBits
number

stop bits

flowControl
string

flow control

Responses

Request samples

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

Response samples

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

firewall-core-zone

Get firewall host inbound rules.

Get firewall host inbound rules.

Authorizations:
ThingsPro Firewall APIs_auth

Responses

Response samples

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

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

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
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
{
  • "data": [
    ],
  • "count": 1
}

function

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

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

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
name
string [ 1 .. 255 ] characters

ASCII alphanumeric characters or hyphens (a-z, A-Z, 0-9, "-")

enabled
boolean
object (ThingsPro Edge Function_Trigger)
object (ThingsPro Edge Function_Executable)
object (ThingsPro Edge Function_Expose)
params
object

Responses

Request samples

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

Response samples

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

delete target function

Delete an existed function

Authorizations:
ThingsPro Edge Function_bearerAuth
query Parameters
id
required
string

ID is target function's name

Responses

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
timeout
integer [ 1 .. 120 ]
pip
Array of strings

Responses

Request samples

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

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

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:
enable
boolean
Default: false
protocolVersion
string
Default: "3.1.1"
Enum: 3.1 "3.1.1"

MQTT protocol version

server
required
string

MQTT server(broker) ip or url

port
required
integer
keepAliveSec
integer [ 10 .. 65536 ]
Default: 60
handshakeTimeout
integer [ 10 .. 600 ]
Default: 10
retryInterval
integer [ 10 .. 3600 ]
Default: 60
clearSession
boolean
Default: true
certificateOverTLS
boolean
Default: false
clientID
string

Max length: 65536 in V3.1.1, 23 in V3.1

userName
string <= 255 characters
password
string <= 255 characters
tlsVersion
string
Default: "1.2"
Enum: "1.3" "1.2" "1.1" "1.0"
insecureSkipVerify
boolean
Default: false
object
qos
integer
Default: 1

support qos 0,1,2

retain
boolean
Default: false
object
object
  • ThingsPro Edge REST API invocation(request/response patten)
  • required headers:
    • request-expired-time: UTC
    • request-id: int string

Responses

Request samples

Content type
{
  • "enable": true,
  • "protocolVersion": "3.1.1",
  • "server": "127.0.0.1",
  • "port": 1883,
  • "keepAliveSec": 60,
  • "handshakeTimeout": 10,
  • "retryInterval": 60,
  • "clearSession": true,
  • "certificateOverTLS": false,
  • "clientID": "mydevice1",
  • "userName": "moxa",
  • "password": "123",
  • "tlsVersion": "1.2",
  • "insecureSkipVerify": false,
  • "qos": 1,
  • "retain": false,
  • "willMessage": {
    },
  • "remoteAPI": {
    }
}

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:
enable
boolean
Default: false
protocolVersion
string
Default: "3.1.1"
Enum: 3.1 "3.1.1"

MQTT protocol version

server
required
string

MQTT server(broker) ip or url

port
required
integer
keepAliveSec
integer [ 10 .. 65536 ]
Default: 60
handshakeTimeout
integer [ 10 .. 600 ]
Default: 10
retryInterval
integer [ 10 .. 3600 ]
Default: 60
clearSession
boolean
Default: true
certificateOverTLS
boolean
Default: false
clientID
string

Max length: 65536 in V3.1.1, 23 in V3.1

userName
string <= 255 characters
password
string <= 255 characters
tlsVersion
string
Default: "1.2"
Enum: "1.3" "1.2" "1.1" "1.0"
insecureSkipVerify
boolean
Default: false
object
qos
integer
Default: 1

support qos 0,1,2

retain
boolean
Default: false
object
object
  • ThingsPro Edge REST API invocation(request/response patten)
  • required headers:
    • request-expired-time: UTC
    • request-id: int string

Responses

Request samples

Content type
{
  • "id": 1,
  • "enable": true,
  • "status": "connected",
  • "protocolVersion": "3.1.1",
  • "server": "127.0.0.1",
  • "port": 1883,
  • "keepAliveSec": 60,
  • "handshakeTimeout": 10,
  • "retryInterval": 60,
  • "clearSession": true,
  • "certificateOverTLS": false,
  • "clientID": "mydevice1",
  • "userName": "moxa",
  • "password": "123",
  • "tlsVersion": "1.2",
  • "insecureSkipVerify": false,
  • "certificate": {
    },
  • "qos": 1,
  • "retain": false,
  • "willMessage": {
    },
  • "remoteAPI": {
    }
}

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

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
enable
boolean
Default: false
targetDiskName
string
desiredDiskCacheSizeMB
integer

Desired disk cache size in MiB (1 MiB = 1024 × 1024 bytes, base-1024)

timeToLiveSec
integer
dropBehavior
string
Enum: "oldest" "newest"
sendDelayMillsecond
integer [ 10 .. 1000 ]
Default: 10
Array of objects

Responses

Request samples

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

Response samples

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

aws

Get AWS iot device configuration.

Get AWS iot device configuration.

Authorizations:
ThingsPro Cloud APIs_auth

Responses

Response samples

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

Update provisioning configuration.

Update provisioning configuration.

Authorizations:
ThingsPro Cloud APIs_auth
Request Body schema:
object

Responses

Request samples

Content type
{
  • "status": "connected",
  • "provisioning": {
    }
}

Response samples

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

get shadow properties setting.

get shadow properties setting.

Authorizations:
ThingsPro Cloud APIs_auth

Responses

Response samples

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

update shadow properties setting.

update shadow 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": {
    }
}

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
enable
boolean
Default: false
targetDiskName
string
desiredDiskCacheSizeMB
integer

Desired disk cache size in MiB (1 MiB = 1024 × 1024 bytes, base-1024)

timeToLiveSec
integer
dropBehavior
string
Enum: "oldest" "newest"
sendDelayMillsecond
integer [ 10 .. 1000 ]
Default: 10
Array of objects

Responses

Request samples

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

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

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

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

rootCaCertFile
string <binary>

root ca certificate

connectionString
string [ 1 .. 1024 ] characters
protocol
string
Enum: "mqtt" "mqttOverWebsocket" "amqp" "amqpOverWebsocket"

Communication protocol

Responses

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

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
enable
boolean
Default: false
targetDiskName
string
desiredDiskCacheSizeMB
integer

Desired disk cache size in MiB (1 MiB = 1024 × 1024 bytes, base-1024)

timeToLiveSec
integer
dropBehavior
string
Enum: "oldest" "newest"
sendDelayMillsecond
integer [ 10 .. 1000 ]
Default: 10
Array of objects

Responses

Request samples

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

Response samples

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

sparkplug

Get Sparkplug configuration.

Get Sparkplug configuration.

Authorizations:
ThingsPro Cloud APIs_auth
query Parameters
event
boolean

Get runtime status, ex: {"brokerList":[{"id":1,"status":"connected"}]}

Responses

Response samples

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

Update Sparkplug configuration.(BrokerList is read

Update Sparkplug configuration.(BrokerList is readOnly in this endpoint)

Authorizations:
ThingsPro Cloud APIs_auth
Request Body schema: application/json
enable
boolean
Default: false
enableDM
boolean
Default: false
nodeID
required
string [ 1 .. 255 ] characters

The format can be valid UTF-8 alphanumeric String with the exception of the reserved characters of "+", "/", "#"

groupID
required
string [ 1 .. 255 ] characters

The format can be valid UTF-8 alphanumeric String with the exception of the reserved characters of "+", "/", "#"

uuid
string [ 0 .. 255 ] characters

The format can be valid UTF-8 alphanumeric String. UUID to track message type in terms of schema definitions

primaryHostID
string [ 0 .. 255 ] characters

The format can be valid UTF-8 alphanumeric String.

handshakeTimeout
integer [ 1 .. 600 ]
Default: 10
maxRetries
integer [ 0 .. 60 ]
Default: 3
retryInterval
integer [ 10 .. 3600 ]
Default: 60

Responses

Request samples

Content type
application/json
{
  • "enable": true,
  • "enableDM": false,
  • "nodeID": "gary",
  • "groupID": "thingspro-edges",
  • "uuid": "",
  • "primaryHostID": "garyig",
  • "handshakeTimeout": 10,
  • "retryInterval": 10,
  • "maxRetries": 3
}

Response samples

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

Download configurations

Authorizations:
ThingsPro Cloud APIs_auth
query Parameters
encryption
boolean
Default: true

Use password to encryption (default:true)

header Parameters
password
string

password

Responses

Upload configurations

Authorizations:
ThingsPro Cloud APIs_auth
Request Body schema: multipart/form-data
decryption
boolean
Default: true

Use password to decryption (default:true)

file
string <binary>

configuration file

password
string

password

Responses

Response samples

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

Get Sparkplug brokers configuration.

Get Sparkplug brokers configuration.

Authorizations:
ThingsPro Cloud APIs_auth

Responses

Response samples

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

Update Sparkplug brokers configuration.

Update Sparkplug brokers configuration.

Authorizations:
ThingsPro Cloud APIs_auth
Request Body schema: application/json
Array
id
required
integer
enable
required
boolean
server
required
string

MQTT server(broker) ip or url

port
required
integer [ 1 .. 65536 ]
keepAliveSec
required
integer [ 10 .. 65536 ]
certificateOverTLS
required
boolean
clientID
string

Max length: 65536 in V3.1.1, 23 in V3.1

userName
string <= 255 characters
password
string <= 255 characters
tlsVersion
required
string
Enum: "1.3" "1.2" "1.1" "1.0"
insecureSkipVerify
required
boolean
object

Responses

Request samples

Content type
application/json
[
  • {
    }
]

Response samples

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

Create a new Sparkplug broker configuration.

Create a new Sparkplug broker configuration.

Authorizations:
ThingsPro Cloud APIs_auth
Request Body schema:
enable
boolean
Default: false
server
required
string

MQTT server(broker) ip or url

port
required
integer [ 1 .. 65536 ]
keepAliveSec
integer [ 10 .. 65536 ]
Default: 60
certificateOverTLS
boolean
Default: false
clientID
string

Max length: 65536 in V3.1.1, 23 in V3.1

userName
string <= 255 characters
password
string <= 255 characters
tlsVersion
string
Default: "1.2"
Enum: "1.3" "1.2" "1.1" "1.0"
insecureSkipVerify
boolean
Default: false
object

Responses

Request samples

Content type
{
  • "enable": true,
  • "server": "test.sparkplug.org",
  • "port": 1883,
  • "keepAliveSec": 10,
  • "userName": "admin",
  • "password": "password"
}

Response samples

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

Update Sparkplug broker configuration.

Update Sparkplug broker configuration.

Authorizations:
ThingsPro Cloud APIs_auth
path Parameters
id
required
integer

broker id.

Request Body schema:
id
required
integer
enable
required
boolean
server
required
string

MQTT server(broker) ip or url

port
required
integer [ 1 .. 65536 ]
keepAliveSec
required
integer [ 10 .. 65536 ]
certificateOverTLS
required
boolean
clientID
string

Max length: 65536 in V3.1.1, 23 in V3.1

userName
string <= 255 characters
password
string <= 255 characters
tlsVersion
required
string
Enum: "1.3" "1.2" "1.1" "1.0"
insecureSkipVerify
required
boolean
object

Responses

Request samples

Content type
{
  • "enable": true,
  • "server": "test.sparkplug.org",
  • "port": 1883,
  • "keepAliveSec": 10,
  • "userName": "admin",
  • "password": "password"
}

Response samples

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

Delete Sparkplug broker configuration.

Delete Sparkplug broker configuration.

Authorizations:
ThingsPro Cloud APIs_auth
path Parameters
id
required
integer

broker id.

Responses

Response samples

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

get node properties setting.

get node 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": {
    }
}

reported node properties.

reported node properties.

Authorizations:
ThingsPro Cloud APIs_auth

Responses

Response samples

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

clear node properties.

clear node properties.

Authorizations:
ThingsPro Cloud APIs_auth
Request Body schema: application/json
Array
string

Responses

Request samples

Content type
application/json
[
  • "general",
  • "ethernets"
]

Response samples

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

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
enable
boolean
Default: false
targetDiskName
string
desiredDiskCacheSizeMB
integer

Desired disk cache size in MiB (1 MiB = 1024 × 1024 bytes, base-1024)

timeToLiveSec
integer
dropBehavior
string
Enum: "oldest" "newest"
sendDelayMillsecond
integer [ 10 .. 1000 ]
Default: 10
Array of objects
object (Bluk Upload Configuration)

Bulk data upload to server after device status change to connected.

Responses

Request samples

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

Response samples

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

get message groups setting.

get message groups setting.

Authorizations:
ThingsPro Cloud APIs_auth
query Parameters
type
string
Enum: "node" "device"

Responses

Response samples

Content type
application/json
[
  • {
    }
]

create a message group.

create a message group.

Authorizations:
ThingsPro Cloud APIs_auth
query Parameters
type
string
Enum: "node" "device"
Request Body schema: application/json
enable
required
boolean
description
string <= 1024 characters
required
object
minPublishInterval
integer [ 0 .. 10 ]
Default: 0

a fixed interval between the two publish. unit:second

samplingMode
string
Default: "allChangedValues"
Enum: "allValues" "latestValues" "allChangedValues" "latestChangedValues"
customSamplingRate
boolean
Default: false

enable will use the pollingInterval that user input.

pollingInterval
integer [ 0 .. 86400 ] characters
Default: 10

unit:second, 0 means subscribe mode

required
object

Responses

Request samples

Content type
application/json
{
  • "enable": true,
  • "description": "my message group",
  • "onChange": false,
  • "minPublishInterval": 0,
  • "samplingMode": "allValues",
  • "customSamplingRate": false,
  • "tags": {
    },
  • "pollingInterval": 0,
  • "sendOutThreshold": {
    }
}

Response samples

Content type
application/json
[
  • {
    }
]

get message group setting.

get message group setting.

Authorizations:
ThingsPro Cloud APIs_auth
path Parameters
id
required
integer

message group id.

Responses

Response samples

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

update message group setting.

update message group setting.

Authorizations:
ThingsPro Cloud APIs_auth
path Parameters
id
required
integer

message group id.

Request Body schema: application/json
enable
required
boolean
description
string <= 1024 characters
required
object
minPublishInterval
integer [ 0 .. 10 ]
Default: 0

a fixed interval between the two publish. unit:second

samplingMode
string
Default: "allChangedValues"
Enum: "allValues" "latestValues" "allChangedValues" "latestChangedValues"
customSamplingRate
boolean
Default: false

enable will use the pollingInterval that user input.

pollingInterval
integer [ 0 .. 86400 ] characters
Default: 10

unit:second, 0 means subscribe mode

required
object

Responses

Request samples

Content type
application/json
{
  • "enable": true,
  • "description": "my message group",
  • "onChange": false,
  • "minPublishInterval": 0,
  • "samplingMode": "allValues",
  • "customSamplingRate": false,
  • "tags": {
    },
  • "pollingInterval": 0,
  • "sendOutThreshold": {
    }
}

Response samples

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

delete message group setting.

delete message group setting.

Authorizations:
ThingsPro Cloud APIs_auth
path Parameters
id
required
integer

message group id.

Responses

Response samples

Content type
application/json
[
  • {
    }
]

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
}

getOvpnConfig

Import an OpenVpn client profile file

Request Body schema: multipart/form-data
filename
string

Responses

exportOvpnConfig

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

query Parameters
name
string
Example: name=sample

sample

Responses

Delete Target OpenVpn client profile file

Delete Target OpenVpn client profile file

Responses

Export an OpenVpn client logs file

Export an OpenVpn client logs file

Responses

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
edgeAgentURI
string

default URI of edgeAgent

object

IoT Edge runtime information

object
object

Responses

Request samples

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

Response samples

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

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

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

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

Download azure iotedge module logs as a zip file.

Download azure iotedge module logs as a zip file.

Authorizations:
ThingsPro Services Management APIs_auth
path Parameters
name
required
string
Examples:
  • edgeAgent - module name

module name.

Responses

Response samples

Content type
application/zip
edgeAgent-Log-2025-09-15T105052.zip

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 configuration.

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

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
name
string

The name of the service.

displayName
string

The display name of the service.

source
string

The source that create this service.

Array of objects

The add-on permissions of the service.

required
Array of strings

The required permissions of the service

Responses

Request samples

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

Response samples

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

update service account

Authorizations:
ThingsPro Services Management APIs_auth
path Parameters
name
required
string
Request Body schema: application/json
displayName
string

The display name of the service.

Array of objects

The add-on permissions of the service.

required
Array of strings

The required permissions of the service

Responses

Request samples

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

Response samples

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

delete permission of service

Authorizations:
ThingsPro Services Management APIs_auth
path Parameters
name
required
string

Responses

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

services

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
name
string

The name of the service.

displayName
string

The display name of the service.

source
string

The source that create this service.

Array of objects

The add-on permissions of the service.

required
Array of strings

The required permissions of the service

Responses

Request samples

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

Response samples

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

update service account

Authorizations:
ThingsPro Services Management APIs_auth
path Parameters
name
required
string
Request Body schema: application/json
displayName
string

The display name of the service.

Array of objects

The add-on permissions of the service.

required
Array of strings

The required permissions of the service

Responses

Request samples

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

Response samples

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

delete permission of service

Authorizations:
ThingsPro Services Management APIs_auth
path Parameters
name
required
string

Responses

TCP Slaves

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
slaveId
integer [ 1 .. 255 ]
Default: 1

Modbus slave ID.

listenPort
integer [ 1 .. 65535 ]
Default: 502

Modbus listen port. "listenPort + slaveId" should be unique.

keepAliveTime
integer [ 0 .. 99 ]

Modbus tcp connection keep alive time. default is 1 for Laputa, RAN; 20 for TPE

name
string [ 1 .. 128 ] characters ^[\w\-.~]{1,128}$
Default: "modbus_tcp_slave"

Provider name for full-tag name used. "name" should be unique. Allowed characters are ALPHA / DIGIT / "-" / "." / "_" / "~".

enable
integer
Default: 1
Enum: 0 1

Enable for Modbus TCP slave. Default value is 0 for TPE, 1 for others.

Responses

Request samples

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

Response samples

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

Slave Zones

Get all of slave zones' configurations

Responses

Response samples

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

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

Update all slave zones configuration

Request Body schema: application/json

Slave zone data.

One of
szoneId
integer

Unique szone ID.

rowId
integer >= 1

For web sorting. Not used in TPE.

serSlaveId
integer

Used as foreign key for szone table.

tcpSlaveId
integer

Used as foreign key for szone table.

dataFormat
integer
Default: 2
Enum: 0 1 2 3

Modbus data format.

  • 0: Coils
  • 1: Discretes Input
  • 2: Holding Registers
  • 3: Input Registers
address
integer [ 0 .. 65535 ]
Default: 0

Modbus start address, like Modbus command address, it used for tag mapping used. (TPE only - For refTags, -1 represent invalid)

quan
integer
Default: 1

Modbus quantity for szone, like Modbus command quantity, it used for tag mapping used.

swap
integer (Modbus Module API_swapForSzone)
Default: 0
Enum: 0 1 2 3 4 5

The swap mode for the tags and ref-tags of this szone.

  • 0: Big-endian (default, aka None, AB CD -> AB CD)
  • 1: Big-endian byte swap (aka Byte, AB CD -> BA DC)
  • 2: Word (deprecated)
  • 3: Byte and Word (deprecated)
  • 4: Little-endian (AB CD -> DC BA)
  • 5: Little-endian byte swap (AB CD -> CD AB)
fromRefTaglist
integer
Default: 0
Enum: 0 1

Determine the slave tag is reference from tag list or created by itself.

scalingFunc
integer
Default: 0
Enum: 0 1 2

Modbus scaling function, (disable, intercept, point).

interceptSlope
number [ DOUBLE_MIN (-1.79e+308) .. DOUBLE_MAX (1.79e+308) ]
Default: 1

Slope for intercept of Modbus scaling function.

interceptOffset
number [ DOUBLE_MIN (-1.79e+308) .. DOUBLE_MAX (1.79e+308) ]
Default: 0

Offset for intercept of Modbus scaling function.

pointSourceMin
number [ DOUBLE_MIN (-1.79e+308) .. DOUBLE_MAX (1.79e+308) ]
Default: 0

Source minimum value for point of Modbus scaling function. The value should not be equal to pointSourceMax.

pointSourceMax
number [ DOUBLE_MIN (-1.79e+308) .. DOUBLE_MAX (1.79e+308) ]
Default: 1

Source maximum value for point of Modbus scaling function. The value should not be equal to pointSourceMin.

pointTargetMin
number [ DOUBLE_MIN (-1.79e+308) .. DOUBLE_MAX (1.79e+308) ]
Default: 0

Target minimum value for point of Modbus scaling function.

pointTargetMax
number [ DOUBLE_MIN (-1.79e+308) .. DOUBLE_MAX (1.79e+308) ]
Default: 1

Target maximum value for point of Modbus scaling function.

Array of objects (Modbus Module API_tagsForSzones)
Array of objects (Modbus Module API_refTags)

Responses

Request samples

Content type
application/json
Example
[
  • {
    }
]

Response samples

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

Get specific slave zone's configuration

path Parameters
szoneId
required
string

ID of szone.

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

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.

query Parameters
autoCreate
string
Value: "tags"

/szones?autoCreate=tags would create tags automatically. dataType must be added in payload.

Request Body schema: application/json
One of
rowId
integer >= 1

For web sorting. Not used in TPE.

serSlaveId
integer

Used as foreign key for szone table.

tcpSlaveId
integer

Used as foreign key for szone table.

dataFormat
integer
Default: 2
Enum: 0 1 2 3

Modbus data format.

  • 0: Coils
  • 1: Discretes Input
  • 2: Holding Registers
  • 3: Input Registers
address
integer [ 0 .. 65535 ]
Default: 0

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

quan
integer
Default: 1

Modbus quantity for szone, like Modbus command quantity, it used for tag mapping used.

swap
integer (Modbus Module API_swapForSzone)
Default: 0
Enum: 0 1 2 3 4 5

The swap mode for the tags and ref-tags of this szone.

  • 0: Big-endian (default, aka None, AB CD -> AB CD)
  • 1: Big-endian byte swap (aka Byte, AB CD -> BA DC)
  • 2: Word (deprecated)
  • 3: Byte and Word (deprecated)
  • 4: Little-endian (AB CD -> DC BA)
  • 5: Little-endian byte swap (AB CD -> CD AB)
fromRefTaglist
integer
Default: 0
Enum: 0 1

Determine the slave tag is reference from tag list or created by itself.

scalingFunc
integer
Default: 0
Enum: 0 1 2

Modbus scaling function, (disable, intercept, point).

interceptSlope
number [ DOUBLE_MIN (-1.79e+308) .. DOUBLE_MAX (1.79e+308) ]
Default: 1

Slope for intercept of Modbus scaling function.

interceptOffset
number [ DOUBLE_MIN (-1.79e+308) .. DOUBLE_MAX (1.79e+308) ]
Default: 0

Offset for intercept of Modbus scaling function.

pointSourceMin
number [ DOUBLE_MIN (-1.79e+308) .. DOUBLE_MAX (1.79e+308) ]
Default: 0

Source minimum value for point of Modbus scaling function. The value should not be equal to pointSourceMax.

pointSourceMax
number [ DOUBLE_MIN (-1.79e+308) .. DOUBLE_MAX (1.79e+308) ]
Default: 1

Source maximum value for point of Modbus scaling function. The value should not be equal to pointSourceMin.

pointTargetMin
number [ DOUBLE_MIN (-1.79e+308) .. DOUBLE_MAX (1.79e+308) ]
Default: 0

Target minimum value for point of Modbus scaling function.

pointTargetMax
number [ DOUBLE_MIN (-1.79e+308) .. DOUBLE_MAX (1.79e+308) ]
Default: 1

Target maximum value for point of Modbus scaling function.

Responses

Request samples

Content type
application/json
Example
{
  • "serSlaveId": 1,
  • "dataFormat": 0,
  • "address": 0,
  • "quan": 10
}

Response samples

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

Slave Control

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

Responses

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

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

Master TCP Interfaces

Get all of master TCPs' configurations

Responses

Response samples

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

Get specific master TCP's configuration

path Parameters
masterTcpIfaceId
required
integer

ID of TCP.

Responses

Response samples

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

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
masterTcpIfaceId
integer

master TCP interface ID.

tcpMasterId
required
integer

Used as foreign key for master TCP table.

initialDelay
integer [ 0 .. 30000 ]
Default: 0

When Modbus module start, activate the TCP master after initial delay time (ms).

retryCount
integer [ 0 .. 5 ]
Default: 3

Modbus retry count. When Modbus command does not get response, resend the command by define times.

responseTout
integer [ 10 .. 120000 ]
Default: 1000

Modbus response timeout. Modbus master wait the request command time for response (ms).

Array of objects (Modbus Module API_remoteDevsForTcp)

Responses

Request samples

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

Response samples

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

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
masterTcpIfaceId
integer

master TCP interface ID.

tcpMasterId
required
integer

Used as foreign key for master TCP table.

initialDelay
integer [ 0 .. 30000 ]
Default: 0

When Modbus module start, activate the TCP master after initial delay time (ms).

retryCount
integer [ 0 .. 5 ]
Default: 3

Modbus retry count. When Modbus command does not get response, resend the command by define times.

responseTout
integer [ 10 .. 120000 ]
Default: 1000

Modbus response timeout. Modbus master wait the request command time for response (ms).

Array of objects (Modbus Module API_remoteDevsForTcp)

Responses

Request samples

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

Response samples

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

Master Serial Interfaces

Get all of master ports' configurations

Responses

Response samples

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

Get specific master port's configuration

path Parameters
masterSerIfaceId
required
integer

ID of port.

Responses

Response samples

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

Modify some of specific master 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
masterSerIfaceId
integer

Master serial interface ID.

serMasterId
required
integer

Used as foreign key for master serial interface table.

portValue
required
integer

Serial port index which should be unique.

format
integer
Default: 0
Enum: 0 1

Modbus serial mode (RTU, ASCII).

initialDelay
integer [ 0 .. 30000 ]
Default: 0

When Modbus module start, activate the serial master after initial delay time (ms).

retryCount
integer [ 0 .. 5 ]
Default: 3

Modbus retry count. When Modbus command does not get response, resend the command by define times.

responseTout
integer [ 10 .. 120000 ]
Default: 1000

Modbus response timeout. Modbus master wait the request command time for response (ms).

integer or integer
Default: 0

Modbus frame interval (t3.5), 0 is used by auto baud rate setting (ms).

integer or integer
Default: 0

Modbus char interval (t1.5), 0 is used by auto baud rate setting (ms).

Array of objects (Modbus Module API_remoteDevsForSer)

Responses

Request samples

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

Response samples

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

Master Control

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

Responses

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
{
  • "data": [
    ],
  • "count": 0
}

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
{
  • "data": [
    ],
  • "count": 0
}

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