Response samples
- 200
{- "data": [
- {
- "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": {
- "rootCaCertFile": "",
- "caCertFile": "",
- "caPkFile": ""
}, - "qos": 1,
- "retain": false,
- "willMessage": {
- "enable": true,
- "topic": "/devices/1/will",
- "message": "dead",
- "qos": 1,
- "retain": true
}, - "remoteAPI": {
- "enable": true,
- "requestSubTopic": "/devices/1/request",
- "responsePubTopic": "/devices/1/response",
- "ttl": 60,
- "qos": 1,
- "retain": false
}
}
]
}
Create a MQTT client configuration.
Create a MQTT client configuration.
Authorizations:
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
|
Responses
Request samples
- Payload
{- "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": {
- "rootCaCertFile": "",
- "caCertFile": "",
- "caPkFile": ""
}, - "qos": 1,
- "retain": false,
- "willMessage": {
- "enable": true,
- "topic": "/devices/1/will",
- "message": "dead",
- "qos": 1,
- "retain": true
}, - "remoteAPI": {
- "enable": true,
- "requestSubTopic": "/devices/1/request",
- "responsePubTopic": "/devices/1/response",
- "ttl": 60,
- "qos": 1,
- "retain": false
}
}
Response samples
- 200
{- "data": [
- {
- "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": {
- "rootCaCertFile": "",
- "caCertFile": "",
- "caPkFile": ""
}, - "qos": 1,
- "retain": false,
- "willMessage": {
- "enable": true,
- "topic": "/devices/1/will",
- "message": "dead",
- "qos": 1,
- "retain": true
}, - "remoteAPI": {
- "enable": true,
- "requestSubTopic": "/devices/1/request",
- "responsePubTopic": "/devices/1/response",
- "ttl": 60,
- "qos": 1,
- "retain": false
}
}
]
}
Edit MQTT client configuration.
Edit MQTT client configuration.
Authorizations:
path Parameters
id required | integer the |
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
|
Responses
Request samples
- Payload
{- "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": {
- "rootCaCertFile": "",
- "caCertFile": "",
- "caPkFile": ""
}, - "qos": 1,
- "retain": false,
- "willMessage": {
- "enable": true,
- "topic": "/devices/1/will",
- "message": "dead",
- "qos": 1,
- "retain": true
}, - "remoteAPI": {
- "enable": true,
- "requestSubTopic": "/devices/1/request",
- "responsePubTopic": "/devices/1/response",
- "ttl": 60,
- "qos": 1,
- "retain": false
}
}
Response samples
- 200
{- "data": {
- "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": {
- "rootCaCertFile": "",
- "caCertFile": "",
- "caPkFile": ""
}, - "qos": 1,
- "retain": false,
- "willMessage": {
- "enable": true,
- "topic": "/devices/1/will",
- "message": "dead",
- "qos": 1,
- "retain": true
}, - "remoteAPI": {
- "enable": true,
- "requestSubTopic": "/devices/1/request",
- "responsePubTopic": "/devices/1/response",
- "ttl": 60,
- "qos": 1,
- "retain": false
}
}
}
delete MQTT client configuration.
delete MQTT client configuration.
Authorizations:
path Parameters
id required | integer the |
Responses
Response samples
- 200
{- "data": [
- {
- "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": {
- "rootCaCertFile": "",
- "caCertFile": "",
- "caPkFile": ""
}, - "qos": 1,
- "retain": false,
- "willMessage": {
- "enable": true,
- "topic": "/devices/1/will",
- "message": "dead",
- "qos": 1,
- "retain": true
}, - "remoteAPI": {
- "enable": true,
- "requestSubTopic": "/devices/1/request",
- "responsePubTopic": "/devices/1/response",
- "ttl": 60,
- "qos": 1,
- "retain": false
}
}
]
}
delete certficate.
delete certficate.
Authorizations:
path Parameters
id required | integer the |
Responses
Response samples
- 200
{- "data": {
- "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": {
- "rootCaCertFile": "",
- "caCertFile": "",
- "caPkFile": ""
}, - "qos": 1,
- "retain": false,
- "willMessage": {
- "enable": true,
- "topic": "/devices/1/will",
- "message": "dead",
- "qos": 1,
- "retain": true
}, - "remoteAPI": {
- "enable": true,
- "requestSubTopic": "/devices/1/request",
- "responsePubTopic": "/devices/1/response",
- "ttl": 60,
- "qos": 1,
- "retain": false
}
}
}
get store and forward setting.
get store and forward setting.
Authorizations:
path Parameters
id required | integer the |
Responses
Response samples
- 200
{- "data": {
- "enable": true,
- "targetDiskName": "System",
- "desiredDiskCacheSizeMB": 8,
- "timeToLiveSec": 7200,
- "dropBehavior": "oldest",
- "disks": [
- {
- "name": "System",
- "mount": "/",
- "device": "/dev/root",
- "total": 3206059008,
- "used": 6059008,
- "free": 3200000000
}
]
}
}
update store and forward setting.
update store and forward setting.
Authorizations:
path Parameters
id required | integer the |
Request Body schema: application/json
enable | boolean Default: false |
targetDiskName | string |
desiredDiskCacheSizeMB | integer |
timeToLiveSec | integer |
dropBehavior | string Enum: "oldest" "newest" |
Array of objects[ items ] |
Responses
Request samples
- Payload
{- "enable": true,
- "targetDiskName": "System",
- "desiredDiskCacheSizeMB": 8,
- "timeToLiveSec": 7200,
- "dropBehavior": "oldest"
}
Response samples
- 200
{- "data": {
- "enable": true,
- "targetDiskName": "System",
- "desiredDiskCacheSizeMB": 8,
- "timeToLiveSec": 7200,
- "dropBehavior": "oldest",
- "disks": [
- {
- "name": "System",
- "mount": "/",
- "device": "/dev/root",
- "total": 3206059008,
- "used": 6059008,
- "free": 3200000000
}
]
}
}
get message groups setting.
get message groups setting.
Authorizations:
path Parameters
id required | integer the |
Responses
Response samples
- 200
[- {
- "id": 1,
- "enable": true,
- "outputTopic": "sample2",
- "properties": [ ],
- "tags": {
- "modbus": {
- "myDevice1": [
- "di0",
- "di1"
]
}, - "system": {
- "system": [
- "cpuUsage",
- "memoryUsage"
]
}
}, - "pollingInterval": 5,
- "sendOutThreshold": {
- "size": 4096,
- "time": 120
}, - "format": ""
}
]
create a message group.
create a message group.
Authorizations:
path Parameters
id required | integer the |
Request Body schema: application/json
enable required | boolean |
Array of objects[ items ] | |
required | object |
outputTopic required | string non-empty Default: "sample" |
pollingInterval required | integer [ 0 .. 86400 ] characters Default: 0 unit:second |
object | |
format | string [ 0 .. 4096 ] characters Default: "" jq filter string, use to change message format.
|
Responses
Request samples
- Payload
{- "id": 1,
- "enable": true,
- "outputTopic": "sample2",
- "properties": [ ],
- "tags": {
- "modbus": {
- "myDevice1": [
- "di0",
- "di1"
]
}, - "system": {
- "system": [
- "cpuUsage",
- "memoryUsage"
]
}
}, - "pollingInterval": 5,
- "sendOutThreshold": {
- "size": 4096,
- "time": 120
}, - "format": ""
}
Response samples
- 200
[- {
- "id": 1,
- "enable": true,
- "outputTopic": "sample2",
- "properties": [ ],
- "tags": {
- "modbus": {
- "myDevice1": [
- "di0",
- "di1"
]
}, - "system": {
- "system": [
- "cpuUsage",
- "memoryUsage"
]
}
}, - "pollingInterval": 5,
- "sendOutThreshold": {
- "size": 4096,
- "time": 120
}, - "format": ""
}
]
get message group setting.
get message group setting.
Authorizations:
path Parameters
id required | integer the |
group_id required | integer the |
Responses
Response samples
- 200
{- "data": {
- "id": 1,
- "enable": true,
- "outputTopic": "sample2",
- "properties": [ ],
- "tags": {
- "modbus": {
- "myDevice1": [
- "di0",
- "di1"
]
}, - "system": {
- "system": [
- "cpuUsage",
- "memoryUsage"
]
}
}, - "pollingInterval": 5,
- "sendOutThreshold": {
- "size": 4096,
- "time": 120
}, - "format": ""
}
}
update message group setting.
update message group setting.
Authorizations:
path Parameters
id required | integer the |
group_id required | integer the |
Request Body schema: application/json
enable required | boolean |
Array of objects[ items ] | |
required | object |
outputTopic required | string non-empty Default: "sample" |
pollingInterval required | integer [ 0 .. 86400 ] characters Default: 0 unit:second |
object | |
format | string [ 0 .. 4096 ] characters Default: "" jq filter string, use to change message format.
|
Responses
Request samples
- Payload
{- "id": 1,
- "enable": true,
- "outputTopic": "sample2",
- "properties": [ ],
- "tags": {
- "modbus": {
- "myDevice1": [
- "di0",
- "di1"
]
}, - "system": {
- "system": [
- "cpuUsage",
- "memoryUsage"
]
}
}, - "pollingInterval": 5,
- "sendOutThreshold": {
- "size": 4096,
- "time": 120
}, - "format": ""
}
Response samples
- 200
{- "data": {
- "id": 1,
- "enable": true,
- "outputTopic": "sample2",
- "properties": [ ],
- "tags": {
- "modbus": {
- "myDevice1": [
- "di0",
- "di1"
]
}, - "system": {
- "system": [
- "cpuUsage",
- "memoryUsage"
]
}
}, - "pollingInterval": 5,
- "sendOutThreshold": {
- "size": 4096,
- "time": 120
}, - "format": ""
}
}
delete message group setting.
delete message group setting.
Authorizations:
path Parameters
id required | integer the |
group_id required | integer the |
Responses
Response samples
- 200
[- {
- "id": 1,
- "enable": true,
- "outputTopic": "sample2",
- "properties": [ ],
- "tags": {
- "modbus": {
- "myDevice1": [
- "di0",
- "di1"
]
}, - "system": {
- "system": [
- "cpuUsage",
- "memoryUsage"
]
}
}, - "pollingInterval": 5,
- "sendOutThreshold": {
- "size": 4096,
- "time": 120
}, - "format": ""
}
]
test custom payload.
test custom payload.
Authorizations:
path Parameters
id required | integer the |
Request Body schema: application/json
format | string |
Array of objects (Tag) [ items ] |
Responses
Request samples
- Payload
{- "format": "{time: (now|todateiso8601), (.srcName): { (.tagName): .dataValue} }",
- "tags": [
- {
- "srcName": "system",
- "tagName": "cpuUsage",
- "dataType": "int32",
- "duration": 1000,
- "access": "ro"
}
]
}
Response samples
- 200
{- "data": {
- "system": {
- "cpuUsage": 60
}, - "time": "2019-09-27T11:42:34Z"
}
}
Response samples
- 200
{- "data": {
- "status": "connected",
- "provisioning": {
- "authenticationType": "symmetricKey",
- "connectionString": "[connection string]",
- "enable": true,
- "protocol": {
- "capabilities": [
- {
- "protocol": "mqtt",
- "port": 8883
}, - {
- "protocol": "mqttOverWebsocket",
- "port": 443
}, - {
- "protocol": "amqp",
- "port": 5671
}, - {
- "protocol": "amqpOverWebsocket",
- "port": 443
}
], - "protocol": "mqtt",
- "port": 8883
}, - "supportTwin": true,
- "certificate": {
- "caPkFile": "device.key",
- "caCertFile": "device.crt"
}, - "rootCaCertFile": "root.crt"
}
}
}
Update provisioning configuration.
Update provisioning configuration.
Authorizations:
Request Body schema: application/json
object | |||||||||||||||||
|
Responses
Request samples
- Payload
{- "provisioning": {
- "enable": true,
- "authenticationType": "symmetricKey",
- "supportTwin": true,
- "connectionString": "connection-string-test",
- "keepAlive": 60,
- "protocol": {
- "protocol": "mqtt"
}
}
}
Response samples
- 200
{- "data": {
- "provisioning": {
- "authenticationType": "symmetricKey",
- "connectionString": "connection-string-test",
- "enable": true,
- "supportTwin": true,
- "certificate": {
- "caPkFile": "",
- "caCertFile": "",
- "certificateInfo": {
- "notAfter": "",
- "subject": {
- "cn": ""
}, - "issuer": ""
}
}
}, - "status": "connected"
}
}
Setup x509 certificates.
Setup x509 certificates.
Authorizations:
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
- 200
{- "data": {
- "status": "connected",
- "provisioning": {
- "authenticationType": "symmetricKey",
- "connectionString": "[connection string]",
- "enable": true,
- "protocol": {
- "capabilities": [
- {
- "protocol": "mqtt",
- "port": 8883
}, - {
- "protocol": "mqttOverWebsocket",
- "port": 443
}, - {
- "protocol": "amqp",
- "port": 5671
}, - {
- "protocol": "amqpOverWebsocket",
- "port": 443
}
], - "protocol": "mqtt",
- "port": 8883
}, - "supportTwin": true,
- "certificate": {
- "caPkFile": "device.key",
- "caCertFile": "device.crt"
}, - "rootCaCertFile": "root.crt"
}
}
}
Response samples
- 200
{- "data": {
- "device": {
- "general": [
- {
- "reportedPath": "general",
- "desiredPath": "general"
}
], - "wan": [
- {
- "reportedPath": "wan",
- "desiredPath": "wan"
}
]
}
}
}
update twin properties setting.
update twin properties setting.
Authorizations:
Request Body schema: application/json
object | |||||||||||
|
Responses
Request samples
- Payload
{- "device": {
- "general": [
- {
- "reportedPath": "general",
- "desiredPath": "general"
}
], - "wan": [
- {
- "reportedPath": "wan",
- "desiredPath": "wan"
}
]
}
}
Response samples
- 200
{- "data": {
- "device": {
- "general": [
- {
- "reportedPath": "general",
- "desiredPath": "general"
}
], - "wan": [
- {
- "reportedPath": "wan",
- "desiredPath": "wan"
}
]
}
}
}
Response samples
- 200
{- "data": "ok"
}
Response samples
- 200
{- "data": {
- "enable": true,
- "targetDiskName": "System",
- "desiredDiskCacheSizeMB": 8,
- "timeToLiveSec": 7200,
- "dropBehavior": "oldest",
- "disks": [
- {
- "name": "System",
- "mount": "/",
- "device": "/dev/root",
- "total": 3206059008,
- "used": 6059008,
- "free": 3200000000
}
]
}
}
update store and forward setting.
update store and forward setting.
Authorizations:
Request Body schema: application/json
enable | boolean Default: false |
targetDiskName | string |
desiredDiskCacheSizeMB | integer |
timeToLiveSec | integer |
dropBehavior | string Enum: "oldest" "newest" |
Array of objects[ items ] |
Responses
Request samples
- Payload
{- "enable": true,
- "targetDiskName": "System",
- "desiredDiskCacheSizeMB": 8,
- "timeToLiveSec": 7200,
- "dropBehavior": "oldest"
}
Response samples
- 200
{- "data": {
- "enable": true,
- "targetDiskName": "System",
- "desiredDiskCacheSizeMB": 8,
- "timeToLiveSec": 7200,
- "dropBehavior": "oldest",
- "disks": [
- {
- "name": "System",
- "mount": "/",
- "device": "/dev/root",
- "total": 3206059008,
- "used": 6059008,
- "free": 3200000000
}
]
}
}
Response samples
- 200
[- {
- "id": 1,
- "enable": true,
- "outputTopic": "sample2",
- "properties": [ ],
- "tags": {
- "modbus": {
- "myDevice1": [
- "di0",
- "di1"
]
}, - "system": {
- "system": [
- "cpuUsage",
- "memoryUsage"
]
}
}, - "pollingInterval": 5,
- "sendOutThreshold": {
- "size": 4096,
- "time": 120
}, - "format": ""
}
]
create a message group.
create a message group.
Authorizations:
Request Body schema: application/json
enable required | boolean |
Array of objects[ items ] | |
required | object |
outputTopic required | string non-empty Default: "sample" |
pollingInterval required | integer [ 0 .. 86400 ] characters Default: 0 unit:second |
object | |
format | string [ 0 .. 4096 ] characters Default: "" jq filter string, use to change message format.
|
Responses
Request samples
- Payload
{- "id": 1,
- "enable": true,
- "outputTopic": "sample2",
- "properties": [ ],
- "tags": {
- "modbus": {
- "myDevice1": [
- "di0",
- "di1"
]
}, - "system": {
- "system": [
- "cpuUsage",
- "memoryUsage"
]
}
}, - "pollingInterval": 5,
- "sendOutThreshold": {
- "size": 4096,
- "time": 120
}, - "format": ""
}
Response samples
- 200
[- {
- "id": 1,
- "enable": true,
- "outputTopic": "sample2",
- "properties": [ ],
- "tags": {
- "modbus": {
- "myDevice1": [
- "di0",
- "di1"
]
}, - "system": {
- "system": [
- "cpuUsage",
- "memoryUsage"
]
}
}, - "pollingInterval": 5,
- "sendOutThreshold": {
- "size": 4096,
- "time": 120
}, - "format": ""
}
]
get message group setting.
get message group setting.
Authorizations:
path Parameters
id required | integer message group id. |
Responses
Response samples
- 200
{- "data": {
- "id": 1,
- "enable": true,
- "outputTopic": "sample2",
- "properties": [ ],
- "tags": {
- "modbus": {
- "myDevice1": [
- "di0",
- "di1"
]
}, - "system": {
- "system": [
- "cpuUsage",
- "memoryUsage"
]
}
}, - "pollingInterval": 5,
- "sendOutThreshold": {
- "size": 4096,
- "time": 120
}, - "format": ""
}
}
update message group setting.
update message group setting.
Authorizations:
path Parameters
id required | integer message group id. |
Request Body schema: application/json
enable required | boolean |
Array of objects[ items ] | |
required | object |
outputTopic required | string non-empty Default: "sample" |
pollingInterval required | integer [ 0 .. 86400 ] characters Default: 0 unit:second |
object | |
format | string [ 0 .. 4096 ] characters Default: "" jq filter string, use to change message format.
|
Responses
Request samples
- Payload
{- "id": 1,
- "enable": true,
- "outputTopic": "sample2",
- "properties": [ ],
- "tags": {
- "modbus": {
- "myDevice1": [
- "di0",
- "di1"
]
}, - "system": {
- "system": [
- "cpuUsage",
- "memoryUsage"
]
}
}, - "pollingInterval": 5,
- "sendOutThreshold": {
- "size": 4096,
- "time": 120
}, - "format": ""
}
Response samples
- 200
{- "data": {
- "id": 1,
- "enable": true,
- "outputTopic": "sample2",
- "properties": [ ],
- "tags": {
- "modbus": {
- "myDevice1": [
- "di0",
- "di1"
]
}, - "system": {
- "system": [
- "cpuUsage",
- "memoryUsage"
]
}
}, - "pollingInterval": 5,
- "sendOutThreshold": {
- "size": 4096,
- "time": 120
}, - "format": ""
}
}
delete message group setting.
delete message group setting.
Authorizations:
path Parameters
id required | integer message group id. |
Responses
Response samples
- 200
[- {
- "id": 1,
- "enable": true,
- "outputTopic": "sample2",
- "properties": [ ],
- "tags": {
- "modbus": {
- "myDevice1": [
- "di0",
- "di1"
]
}, - "system": {
- "system": [
- "cpuUsage",
- "memoryUsage"
]
}
}, - "pollingInterval": 5,
- "sendOutThreshold": {
- "size": 4096,
- "time": 120
}, - "format": ""
}
]
test custom payload.
test custom payload.
Authorizations:
Request Body schema: application/json
format | string |
Array of objects (Tag) [ items ] |
Responses
Request samples
- Payload
{- "format": "{ time : (now|todateiso8601), (.srcName) : { (.tagName) : .dataValue}}",
- "tags": [
- {
- "srcName": "system",
- "tagName": "cpuUsage",
- "dataType": "int32",
- "duration": 1000,
- "dataUnit": "%",
- "access": "ro"
}
]
}
Response samples
- 200
{- "data": {
- "system": {
- "cpuUsage": 60
}, - "time": "2019-09-27T11:42:34Z"
}
}
Response samples
- 200
{- "data": {
- "status": "connected",
- "provisioning": {
- "enable": true,
- "host": "a22j5sm6o3yzc5.iot.us-east-1.amazonaws.com",
- "port": 8883,
- "thingID": "MyThingsproEdge",
- "supportDM": true,
- "messageQOS": 0,
- "certificate": {
- "rootCaCertFile": "rootCA.crt",
- "caPkFile": "private.key",
- "caCertFile": "device.crt"
}
}
}
}
Update provisioning configuration.
Update provisioning configuration.
Authorizations:
Request Body schema:
object | |||||||||||||||||
|
Responses
Request samples
- Payload
{- "status": "connected",
- "provisioning": {
- "enable": true,
- "host": "a22j5sm6o3yzc5.iot.us-east-1.amazonaws.com",
- "port": 8883,
- "thingID": "MyThingsproEdge",
- "supportDM": true,
- "messageQOS": 0,
- "certificate": {
- "rootCaCertFile": "rootCA.crt",
- "caPkFile": "private.key",
- "caCertFile": "device.crt"
}
}
}
Response samples
- 200
{- "data": {
- "status": "connected",
- "provisioning": {
- "enable": true,
- "host": "a22j5sm6o3yzc5.iot.us-east-1.amazonaws.com",
- "port": 8883,
- "thingID": "MyThingsproEdge",
- "supportDM": true,
- "messageQOS": 0,
- "certificate": {
- "rootCaCertFile": "rootCA.crt",
- "caPkFile": "private.key",
- "caCertFile": "device.crt"
}
}
}
}
Response samples
- 200
{- "data": {
- "device": {
- "general": [
- {
- "reportedPath": "general",
- "desiredPath": "general"
}
], - "wan": [
- {
- "reportedPath": "wan",
- "desiredPath": "wan"
}
]
}
}
}
update shadow properties setting.
update shadow properties setting.
Authorizations:
Request Body schema: application/json
object | |||||||||||
|
Responses
Request samples
- Payload
{- "device": {
- "general": [
- {
- "reportedPath": "general",
- "desiredPath": "general"
}
], - "wan": [
- {
- "reportedPath": "wan",
- "desiredPath": "wan"
}
]
}
}
Response samples
- 200
{- "data": {
- "device": {
- "general": [
- {
- "reportedPath": "general",
- "desiredPath": "general"
}
], - "wan": [
- {
- "reportedPath": "wan",
- "desiredPath": "wan"
}
]
}
}
}
Response samples
- 200
{- "data": "ok"
}
Response samples
- 200
{- "data": {
- "enable": true,
- "targetDiskName": "System",
- "desiredDiskCacheSizeMB": 8,
- "timeToLiveSec": 7200,
- "dropBehavior": "oldest",
- "disks": [
- {
- "name": "System",
- "mount": "/",
- "device": "/dev/root",
- "total": 3206059008,
- "used": 6059008,
- "free": 3200000000
}
]
}
}
update store and forward setting.
update store and forward setting.
Authorizations:
Request Body schema: application/json
enable | boolean Default: false |
targetDiskName | string |
desiredDiskCacheSizeMB | integer |
timeToLiveSec | integer |
dropBehavior | string Enum: "oldest" "newest" |
Array of objects[ items ] |
Responses
Request samples
- Payload
{- "enable": true,
- "targetDiskName": "System",
- "desiredDiskCacheSizeMB": 8,
- "timeToLiveSec": 7200,
- "dropBehavior": "oldest"
}
Response samples
- 200
{- "data": {
- "enable": true,
- "targetDiskName": "System",
- "desiredDiskCacheSizeMB": 8,
- "timeToLiveSec": 7200,
- "dropBehavior": "oldest",
- "disks": [
- {
- "name": "System",
- "mount": "/",
- "device": "/dev/root",
- "total": 3206059008,
- "used": 6059008,
- "free": 3200000000
}
]
}
}
Response samples
- 200
[- {
- "id": 1,
- "enable": true,
- "outputTopic": "sample2",
- "properties": [ ],
- "tags": {
- "modbus": {
- "myDevice1": [
- "di0",
- "di1"
]
}, - "system": {
- "system": [
- "cpuUsage",
- "memoryUsage"
]
}
}, - "pollingInterval": 5,
- "sendOutThreshold": {
- "size": 4096,
- "time": 120
}, - "format": ""
}
]
create a message group.
create a message group.
Authorizations:
Request Body schema: application/json
enable required | boolean |
Array of objects[ items ] | |
required | object |
outputTopic required | string non-empty Default: "sample" |
pollingInterval required | integer [ 0 .. 86400 ] characters Default: 0 unit:second |
object | |
format | string [ 0 .. 4096 ] characters Default: "" jq filter string, use to change message format.
|
Responses
Request samples
- Payload
{- "id": 1,
- "enable": true,
- "outputTopic": "sample2",
- "properties": [ ],
- "tags": {
- "modbus": {
- "myDevice1": [
- "di0",
- "di1"
]
}, - "system": {
- "system": [
- "cpuUsage",
- "memoryUsage"
]
}
}, - "pollingInterval": 5,
- "sendOutThreshold": {
- "size": 4096,
- "time": 120
}, - "format": ""
}
Response samples
- 200
[- {
- "id": 1,
- "enable": true,
- "outputTopic": "sample2",
- "properties": [ ],
- "tags": {
- "modbus": {
- "myDevice1": [
- "di0",
- "di1"
]
}, - "system": {
- "system": [
- "cpuUsage",
- "memoryUsage"
]
}
}, - "pollingInterval": 5,
- "sendOutThreshold": {
- "size": 4096,
- "time": 120
}, - "format": ""
}
]
get message group setting.
get message group setting.
Authorizations:
path Parameters
id required | integer message group id. |
Responses
Response samples
- 200
{- "data": {
- "id": 1,
- "enable": true,
- "outputTopic": "sample2",
- "properties": [ ],
- "tags": {
- "modbus": {
- "myDevice1": [
- "di0",
- "di1"
]
}, - "system": {
- "system": [
- "cpuUsage",
- "memoryUsage"
]
}
}, - "pollingInterval": 5,
- "sendOutThreshold": {
- "size": 4096,
- "time": 120
}, - "format": ""
}
}
update message group setting.
update message group setting.
Authorizations:
path Parameters
id required | integer message group id. |
Request Body schema: application/json
enable required | boolean |
Array of objects[ items ] | |
required | object |
outputTopic required | string non-empty Default: "sample" |
pollingInterval required | integer [ 0 .. 86400 ] characters Default: 0 unit:second |
object | |
format | string [ 0 .. 4096 ] characters Default: "" jq filter string, use to change message format.
|
Responses
Request samples
- Payload
{- "id": 1,
- "enable": true,
- "outputTopic": "sample2",
- "properties": [ ],
- "tags": {
- "modbus": {
- "myDevice1": [
- "di0",
- "di1"
]
}, - "system": {
- "system": [
- "cpuUsage",
- "memoryUsage"
]
}
}, - "pollingInterval": 5,
- "sendOutThreshold": {
- "size": 4096,
- "time": 120
}, - "format": ""
}
Response samples
- 200
{- "data": {
- "id": 1,
- "enable": true,
- "outputTopic": "sample2",
- "properties": [ ],
- "tags": {
- "modbus": {
- "myDevice1": [
- "di0",
- "di1"
]
}, - "system": {
- "system": [
- "cpuUsage",
- "memoryUsage"
]
}
}, - "pollingInterval": 5,
- "sendOutThreshold": {
- "size": 4096,
- "time": 120
}, - "format": ""
}
}
delete message group setting.
delete message group setting.
Authorizations:
path Parameters
id required | integer message group id. |
Responses
Response samples
- 200
[- {
- "id": 1,
- "enable": true,
- "outputTopic": "sample2",
- "properties": [ ],
- "tags": {
- "modbus": {
- "myDevice1": [
- "di0",
- "di1"
]
}, - "system": {
- "system": [
- "cpuUsage",
- "memoryUsage"
]
}
}, - "pollingInterval": 5,
- "sendOutThreshold": {
- "size": 4096,
- "time": 120
}, - "format": ""
}
]
test custom payload.
test custom payload.
Authorizations:
Request Body schema: application/json
format | string |
Array of objects (Tag) [ items ] |
Responses
Request samples
- Payload
{- "format": "{ time : (now|todateiso8601), (.srcName) : { (.tagName) : .dataValue}}",
- "tags": [
- {
- "srcName": "system",
- "tagName": "cpuUsage",
- "dataType": "int32",
- "duration": 1000,
- "dataUnit": "%",
- "access": "ro"
}
]
}
Response samples
- 200
{- "data": {
- "system": {
- "cpuUsage": 60
}, - "time": "2019-09-27T11:42:34Z"
}
}
Response samples
- 200
{- "data": {
- "iotedge": {
- "version": "string",
- "status": "resetting",
- "since": "Mon 2016-10-07 09:49:16 CST",
- "match": true,
- "suggestion": "string",
- "modules": [
- {
- "status": "string",
- "config": "string",
- "description": "string",
- "name": "string",
- "match": true,
- "suggestion": "string"
}
]
}, - "provisioning": {
- "enable": false,
- "supportTwin": true,
- "source": "manual",
- "method": "tpm",
- "connectionString": "string",
- "scopeId": "string",
- "symmetricKey": "string",
- "identityCert": "string",
- "identityPk": "string",
- "registrationId": "string",
- "endorsementKey": "string"
}, - "downstreamCerts": {
- "mode": "default",
- "caCertFile": "string",
- "caPkFile": "string",
- "trustedCaFile": "string",
- "certificateInfo": {
- "issuer": "string",
- "notAfter": "string",
- "subject": {
- "cn": "string"
}
}
}
}
}
Update azure iotedge configuration.
Update azure iotedge configuration.
Authorizations:
Request Body schema: application/json
object IoT Edge runtime information | |
object | |
object |
Responses
Request samples
- Payload
{- "provisioning": {
- "enable": true
}
}
Response samples
- 200
{- "data": {
- "iotedge": {
- "version": "string",
- "status": "resetting",
- "since": "Mon 2016-10-07 09:49:16 CST",
- "match": true,
- "suggestion": "string",
- "modules": [
- {
- "status": "string",
- "config": "string",
- "description": "string",
- "name": "string",
- "match": true,
- "suggestion": "string"
}
]
}, - "provisioning": {
- "enable": false,
- "supportTwin": true,
- "source": "manual",
- "method": "tpm",
- "connectionString": "string",
- "scopeId": "string",
- "symmetricKey": "string",
- "identityCert": "string",
- "identityPk": "string",
- "registrationId": "string",
- "endorsementKey": "string"
}, - "downstreamCerts": {
- "mode": "default",
- "caCertFile": "string",
- "caPkFile": "string",
- "trustedCaFile": "string",
- "certificateInfo": {
- "issuer": "string",
- "notAfter": "string",
- "subject": {
- "cn": "string"
}
}
}
}
}
Response samples
- 200
- 400
{- "data": {
- "iotedge": {
- "version": "string",
- "status": "resetting",
- "since": "Mon 2016-10-07 09:49:16 CST",
- "match": true,
- "suggestion": "string",
- "modules": [
- {
- "status": "string",
- "config": "string",
- "description": "string",
- "name": "string",
- "match": true,
- "suggestion": "string"
}
]
}, - "provisioning": {
- "enable": false,
- "supportTwin": true,
- "source": "manual",
- "method": "tpm",
- "connectionString": "string",
- "scopeId": "string",
- "symmetricKey": "string",
- "identityCert": "string",
- "identityPk": "string",
- "registrationId": "string",
- "endorsementKey": "string"
}, - "downstreamCerts": {
- "mode": "default",
- "caCertFile": "string",
- "caPkFile": "string",
- "trustedCaFile": "string",
- "certificateInfo": {
- "issuer": "string",
- "notAfter": "string",
- "subject": {
- "cn": "string"
}
}
}
}
}
Import user certificates and update azure iotedge
Import user certificates and update azure iotedge configuration.
Authorizations:
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
- 200
{- "data": {
- "iotedge": {
- "version": "string",
- "status": "resetting",
- "since": "Mon 2016-10-07 09:49:16 CST",
- "match": true,
- "suggestion": "string",
- "modules": [
- {
- "status": "string",
- "config": "string",
- "description": "string",
- "name": "string",
- "match": true,
- "suggestion": "string"
}
]
}, - "provisioning": {
- "enable": false,
- "supportTwin": true,
- "source": "manual",
- "method": "tpm",
- "connectionString": "string",
- "scopeId": "string",
- "symmetricKey": "string",
- "identityCert": "string",
- "identityPk": "string",
- "registrationId": "string",
- "endorsementKey": "string"
}, - "downstreamCerts": {
- "mode": "default",
- "caCertFile": "string",
- "caPkFile": "string",
- "trustedCaFile": "string",
- "certificateInfo": {
- "issuer": "string",
- "notAfter": "string",
- "subject": {
- "cn": "string"
}
}
}
}
}
Response samples
- 200
{- "data": {
- "device": {
- "general": [
- {
- "reportedPath": "general",
- "desiredPath": "general"
}
], - "wan": [
- {
- "reportedPath": "wan",
- "desiredPath": "wan"
}
]
}
}
}
update twin properties setting.
update twin properties setting.
Authorizations:
Request Body schema: application/json
object | |||||||||||
|
Responses
Request samples
- Payload
{- "device": {
- "general": [
- {
- "reportedPath": "general",
- "desiredPath": "general"
}
], - "wan": [
- {
- "reportedPath": "wan",
- "desiredPath": "wan"
}
]
}
}
Response samples
- 200
{- "data": {
- "device": {
- "general": [
- {
- "reportedPath": "general",
- "desiredPath": "general"
}
], - "wan": [
- {
- "reportedPath": "wan",
- "desiredPath": "wan"
}
]
}
}
}
Response samples
- 200
{- "data": "ok"
}
Response samples
- 200
[- {
- "id": 1,
- "enable": true,
- "outputTopic": "sample2",
- "properties": [ ],
- "tags": {
- "modbus": {
- "myDevice1": [
- "di0",
- "di1"
]
}, - "system": {
- "system": [
- "cpuUsage",
- "memoryUsage"
]
}
}, - "pollingInterval": 5,
- "sendOutThreshold": {
- "size": 4096,
- "time": 120
}, - "format": ""
}
]
create a message group.
create a message group.
Authorizations:
Request Body schema: application/json
enable required | boolean |
Array of objects[ items ] | |
required | object |
outputTopic required | string non-empty Default: "sample" |
pollingInterval required | integer [ 0 .. 86400 ] characters Default: 0 unit:second |
object | |
format | string [ 0 .. 4096 ] characters Default: "" jq filter string, use to change message format.
|
Responses
Request samples
- Payload
{- "id": 1,
- "enable": true,
- "outputTopic": "sample2",
- "properties": [ ],
- "tags": {
- "modbus": {
- "myDevice1": [
- "di0",
- "di1"
]
}, - "system": {
- "system": [
- "cpuUsage",
- "memoryUsage"
]
}
}, - "pollingInterval": 5,
- "sendOutThreshold": {
- "size": 4096,
- "time": 120
}, - "format": ""
}
Response samples
- 200
[- {
- "id": 1,
- "enable": true,
- "outputTopic": "sample2",
- "properties": [ ],
- "tags": {
- "modbus": {
- "myDevice1": [
- "di0",
- "di1"
]
}, - "system": {
- "system": [
- "cpuUsage",
- "memoryUsage"
]
}
}, - "pollingInterval": 5,
- "sendOutThreshold": {
- "size": 4096,
- "time": 120
}, - "format": ""
}
]
get message group setting.
get message group setting.
Authorizations:
path Parameters
id required | integer message group id. |
Responses
Response samples
- 200
{- "data": {
- "id": 1,
- "enable": true,
- "outputTopic": "sample2",
- "properties": [ ],
- "tags": {
- "modbus": {
- "myDevice1": [
- "di0",
- "di1"
]
}, - "system": {
- "system": [
- "cpuUsage",
- "memoryUsage"
]
}
}, - "pollingInterval": 5,
- "sendOutThreshold": {
- "size": 4096,
- "time": 120
}, - "format": ""
}
}
update message group setting.
update message group setting.
Authorizations:
path Parameters
id required | integer message group id. |
Request Body schema: application/json
enable required | boolean |
Array of objects[ items ] | |
required | object |
outputTopic required | string non-empty Default: "sample" |
pollingInterval required | integer [ 0 .. 86400 ] characters Default: 0 unit:second |
object | |
format | string [ 0 .. 4096 ] characters Default: "" jq filter string, use to change message format.
|
Responses
Request samples
- Payload
{- "id": 1,
- "enable": true,
- "outputTopic": "sample2",
- "properties": [ ],
- "tags": {
- "modbus": {
- "myDevice1": [
- "di0",
- "di1"
]
}, - "system": {
- "system": [
- "cpuUsage",
- "memoryUsage"
]
}
}, - "pollingInterval": 5,
- "sendOutThreshold": {
- "size": 4096,
- "time": 120
}, - "format": ""
}
Response samples
- 200
{- "data": {
- "id": 1,
- "enable": true,
- "outputTopic": "sample2",
- "properties": [ ],
- "tags": {
- "modbus": {
- "myDevice1": [
- "di0",
- "di1"
]
}, - "system": {
- "system": [
- "cpuUsage",
- "memoryUsage"
]
}
}, - "pollingInterval": 5,
- "sendOutThreshold": {
- "size": 4096,
- "time": 120
}, - "format": ""
}
}
delete message group setting.
delete message group setting.
Authorizations:
path Parameters
id required | integer message group id. |
Responses
Response samples
- 200
[- {
- "id": 1,
- "enable": true,
- "outputTopic": "sample2",
- "properties": [ ],
- "tags": {
- "modbus": {
- "myDevice1": [
- "di0",
- "di1"
]
}, - "system": {
- "system": [
- "cpuUsage",
- "memoryUsage"
]
}
}, - "pollingInterval": 5,
- "sendOutThreshold": {
- "size": 4096,
- "time": 120
}, - "format": ""
}
]
test custom payload.
test custom payload.
Authorizations:
Request Body schema: application/json
format | string |
Array of objects (Tag) [ items ] |
Responses
Request samples
- Payload
{- "format": "{ time : (now|todateiso8601), (.srcName) : { (.tagName) : .dataValue}}",
- "tags": [
- {
- "srcName": "system",
- "tagName": "cpuUsage",
- "dataType": "int32",
- "duration": 1000,
- "dataUnit": "%",
- "access": "ro"
}
]
}
Response samples
- 200
{- "data": {
- "system": {
- "cpuUsage": 60
}, - "time": "2019-09-27T11:42:34Z"
}
}
Get Sparkplug configuration.
Get Sparkplug configuration.
Authorizations:
query Parameters
event | boolean Get runtime status, ex: {"brokerList":[{"id":1,"status":"connected"}]} |
Responses
Response samples
- 200
{- "data": {
- "enable": true,
- "enableDM": false,
- "nodeID": "gary",
- "groupID": "thingspro-edges",
- "uuid": "",
- "primaryHostID": "garyig",
- "handshakeTimeout": 10,
- "retryInterval": 10,
- "maxRetries": 3,
- "brokerList": [
- {
- "id": 1,
- "enable": true,
- "status": "connected",
- "lastConnectedTime": "May 20, 2020, 14:05",
- "server": "test.sparkplug.org",
- "port": 1883,
- "keepAliveSec": 10,
- "userName": "admin",
- "password": "password"
}
]
}
}
Update Sparkplug configuration.(BrokerList is read
Update Sparkplug configuration.(BrokerList is readOnly in this endpoint)
Authorizations:
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 |
Array of objects (Sparkplug broker configuration) [ items ] |
Responses
Request samples
- Payload
{- "enable": true,
- "enableDM": false,
- "nodeID": "gary",
- "groupID": "thingspro-edges",
- "uuid": "",
- "primaryHostID": "garyig",
- "handshakeTimeout": 10,
- "retryInterval": 10,
- "maxRetries": 3,
- "brokerList": [
- {
- "id": 1,
- "enable": true,
- "status": "connected",
- "lastConnectedTime": "May 20, 2020, 14:05",
- "server": "test.sparkplug.org",
- "port": 1883,
- "keepAliveSec": 10,
- "userName": "admin",
- "password": "password"
}
]
}
Response samples
- 200
{- "data": {
- "enable": true,
- "enableDM": false,
- "nodeID": "gary",
- "groupID": "thingspro-edges",
- "uuid": "",
- "primaryHostID": "garyig",
- "handshakeTimeout": 10,
- "retryInterval": 10,
- "maxRetries": 3,
- "brokerList": [
- {
- "id": 1,
- "enable": true,
- "status": "connected",
- "lastConnectedTime": "May 20, 2020, 14:05",
- "server": "test.sparkplug.org",
- "port": 1883,
- "keepAliveSec": 10,
- "userName": "admin",
- "password": "password"
}
]
}
}
Upload configurations
Authorizations:
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
- 200
- 400
{- "data": {
- "fileName": "2019-12-19-13-52-backup.zip",
- "fileSize": 46272
}
}
Response samples
- 200
{- "data": [
- {
- "id": 1,
- "enable": true,
- "status": "connected",
- "lastConnectedTime": "May 20, 2020, 14:05",
- "server": "test.sparkplug.org",
- "port": 1883,
- "keepAliveSec": 10,
- "userName": "admin",
- "password": "password"
}
]
}
Update Sparkplug brokers configuration.
Update Sparkplug brokers configuration.
Authorizations:
Request Body schema: application/json
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
- Payload
[- {
- "id": 1,
- "enable": true,
- "status": "connected",
- "lastConnectedTime": "May 20, 2020, 14:05",
- "server": "test.sparkplug.org",
- "port": 1883,
- "keepAliveSec": 10,
- "userName": "admin",
- "password": "password"
}
]
Response samples
- 200
{- "data": [
- {
- "id": 1,
- "enable": true,
- "status": "connected",
- "lastConnectedTime": "May 20, 2020, 14:05",
- "server": "test.sparkplug.org",
- "port": 1883,
- "keepAliveSec": 10,
- "userName": "admin",
- "password": "password"
}
]
}
Create a new Sparkplug broker configuration.
Create a new Sparkplug broker configuration.
Authorizations:
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
- Payload
{- "id": 1,
- "enable": true,
- "status": "connected",
- "lastConnectedTime": "May 20, 2020, 14:05",
- "server": "test.sparkplug.org",
- "port": 1883,
- "keepAliveSec": 10,
- "userName": "admin",
- "password": "password"
}
Response samples
- 200
{- "data": [
- {
- "id": 1,
- "enable": true,
- "status": "connected",
- "lastConnectedTime": "May 20, 2020, 14:05",
- "server": "test.sparkplug.org",
- "port": 1883,
- "keepAliveSec": 10,
- "userName": "admin",
- "password": "password"
}
]
}
Update Sparkplug broker configuration.
Update Sparkplug broker configuration.
Authorizations:
path Parameters
id required | integer broker id. |
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
- Payload
{- "id": 1,
- "enable": true,
- "status": "connected",
- "lastConnectedTime": "May 20, 2020, 14:05",
- "server": "test.sparkplug.org",
- "port": 1883,
- "keepAliveSec": 10,
- "userName": "admin",
- "password": "password"
}
Response samples
- 200
{- "data": {
- "id": 1,
- "enable": true,
- "status": "connected",
- "lastConnectedTime": "May 20, 2020, 14:05",
- "server": "test.sparkplug.org",
- "port": 1883,
- "keepAliveSec": 10,
- "userName": "admin",
- "password": "password"
}
}
Response samples
- 200
{- "data": "ok"
}
Response samples
- 200
{- "data": {
- "enable": true,
- "targetDiskName": "System",
- "desiredDiskCacheSizeMB": 8,
- "timeToLiveSec": 7200,
- "dropBehavior": "oldest",
- "bulkUpload": {
- "enable": false,
- "size": 128
}, - "disks": [
- {
- "name": "System",
- "mount": "/",
- "device": "/dev/root",
- "total": 3206059008,
- "used": 6059008,
- "free": 3200000000
}
]
}
}
update store and forward setting.
update store and forward setting.
Authorizations:
Request Body schema: application/json
enable | boolean Default: false |
targetDiskName | string |
desiredDiskCacheSizeMB | integer |
timeToLiveSec | integer |
dropBehavior | string Enum: "oldest" "newest" |
Array of objects[ items ] | |
object (Bluk Upload Configuration) Bulk data upload to server after device status change to connected. |
Responses
Request samples
- Payload
{- "enable": true,
- "targetDiskName": "System",
- "desiredDiskCacheSizeMB": 8,
- "timeToLiveSec": 7200,
- "dropBehavior": "oldest",
- "bulkUpload": {
- "enable": false,
- "size": 128
}
}
Response samples
- 200
{- "data": {
- "enable": true,
- "targetDiskName": "System",
- "desiredDiskCacheSizeMB": 8,
- "timeToLiveSec": 7200,
- "dropBehavior": "oldest",
- "bulkUpload": {
- "enable": false,
- "size": 128
}, - "disks": [
- {
- "name": "System",
- "mount": "/",
- "device": "/dev/root",
- "total": 3206059008,
- "used": 6059008,
- "free": 3200000000
}
]
}
}
get message groups setting.
get message groups setting.
Authorizations:
query Parameters
type | string Enum: "node" "device" |
Responses
Response samples
- 200
[- {
- "id": 1,
- "enable": true,
- "description": "my message group",
- "properties": [ ],
- "onChange": false,
- "minPublishInterval": 0,
- "samplingMode": "allValues",
- "customSamplingRate": false,
- "tags": {
- "modbus": {
- "myDevice1": [
- "di0",
- "di1"
]
}
}, - "pollingInterval": 0,
- "sendOutThreshold": {
- "mode": "byTime",
- "time": 60
}
}
]
create a message group.
create a message group.
Authorizations:
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
- Payload
{- "id": 1,
- "enable": true,
- "description": "my message group",
- "properties": [ ],
- "onChange": false,
- "minPublishInterval": 0,
- "samplingMode": "allValues",
- "customSamplingRate": false,
- "tags": {
- "modbus": {
- "myDevice1": [
- "di0",
- "di1"
]
}
}, - "pollingInterval": 0,
- "sendOutThreshold": {
- "mode": "byTime",
- "time": 60
}
}
Response samples
- 200
[- {
- "id": 1,
- "enable": true,
- "description": "my message group",
- "properties": [ ],
- "onChange": false,
- "minPublishInterval": 0,
- "samplingMode": "allValues",
- "customSamplingRate": false,
- "tags": {
- "modbus": {
- "myDevice1": [
- "di0",
- "di1"
]
}
}, - "pollingInterval": 0,
- "sendOutThreshold": {
- "mode": "byTime",
- "time": 60
}
}
]
get message group setting.
get message group setting.
Authorizations:
path Parameters
id required | integer message group id. |
Responses
Response samples
- 200
{- "data": {
- "id": 1,
- "enable": true,
- "description": "my message group",
- "properties": [ ],
- "onChange": false,
- "minPublishInterval": 0,
- "samplingMode": "allValues",
- "customSamplingRate": false,
- "tags": {
- "modbus": {
- "myDevice1": [
- "di0",
- "di1"
]
}
}, - "pollingInterval": 0,
- "sendOutThreshold": {
- "mode": "byTime",
- "time": 60
}
}
}
update message group setting.
update message group setting.
Authorizations:
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
- Payload
{- "id": 1,
- "enable": true,
- "description": "my message group",
- "properties": [ ],
- "onChange": false,
- "minPublishInterval": 0,
- "samplingMode": "allValues",
- "customSamplingRate": false,
- "tags": {
- "modbus": {
- "myDevice1": [
- "di0",
- "di1"
]
}
}, - "pollingInterval": 0,
- "sendOutThreshold": {
- "mode": "byTime",
- "time": 60
}
}
Response samples
- 200
{- "data": {
- "id": 1,
- "enable": true,
- "description": "my message group",
- "properties": [ ],
- "onChange": false,
- "minPublishInterval": 0,
- "samplingMode": "allValues",
- "customSamplingRate": false,
- "tags": {
- "modbus": {
- "myDevice1": [
- "di0",
- "di1"
]
}
}, - "pollingInterval": 0,
- "sendOutThreshold": {
- "mode": "byTime",
- "time": 60
}
}
}
delete message group setting.
delete message group setting.
Authorizations:
path Parameters
id required | integer message group id. |
Responses
Response samples
- 200
[- {
- "id": 1,
- "enable": true,
- "description": "my message group",
- "properties": [ ],
- "onChange": false,
- "minPublishInterval": 0,
- "samplingMode": "allValues",
- "customSamplingRate": false,
- "tags": {
- "modbus": {
- "myDevice1": [
- "di0",
- "di1"
]
}
}, - "pollingInterval": 0,
- "sendOutThreshold": {
- "mode": "byTime",
- "time": 60
}
}
]