5.9.6. Communication Configuration Interface
The communication configuration interface is used to get or modify the task configuration. For details on communication configuration, see 3.6. Communication Configuration.
5.9.6.1. cloud-settings Get Cloud Platform Settings
Section titled “5.9.6.1. cloud-settings Get Cloud Platform Settings”This interface takes no request parameters.
GET /api/config/cloud-settingsResponse example
{ "enable": false, "serverAddress": "severAddress", "token": "tokenABCDEFG", "enableBroadcasting": false, "enableGatewayLinking": false, "gatewayLinks": "uid1,token1;uid2,token2;"}The response parameters are listed in the table below:
Cloud Platform Settings Parameters
Section titled “Cloud Platform Settings Parameters”| Parameter | Type | Description |
|---|---|---|
| enable | Bool | Enable the cloud platform. true = on, false = off. |
| serverAddress | String | Server address. Not returned if not set. |
| token | String | Gateway token. Not returned if not set. |
| enableBroadcasting | Bool | Enable broadcasting. true = on, false = off. When enabled, data is broadcast via the cloud platform. |
| enableGatewayLinking | Bool | Enable gateway linking. true = on, false = off. When enabled, data broadcast by the linked gateways specified on the cloud platform is received. |
| gatewayLinks | String | Linked gateways. Not returned if not set. |
5.9.6.2. update-cloud-settings Update Cloud Platform Settings
Section titled “5.9.6.2. update-cloud-settings Update Cloud Platform Settings”Updates the cloud platform settings and returns the updated settings.
POST /api/config/update-cloud-settingsRequest body example
{ "enable": true, "serverAddress": "severAddress", "token": "tokenABCDEFG", "enableBroadcasting": true, "enableGatewayLinking": true, "gatewayLinks": "uid1,token1;uid2,token2;"}For request parameters, see Cloud Platform Settings Parameters.
Response example
{ "enable": true, "serverAddress": "severAddress", "token": "tokenABCDEFG", "enableBroadcasting": true, "enableGatewayLinking": true, "gatewayLinks": "uid1,token1;uid2,token2;"}For response parameters, see Cloud Platform Settings Parameters.
5.9.6.3. modbus-settings Get MODBUS Settings
Section titled “5.9.6.3. modbus-settings Get MODBUS Settings”This interface takes no request parameters.
GET /api/config/modbus-settingsResponse example
{ "enable": false, "byte4Order": "DCBA", "byte8Order": "HGFEDCBA", "encoding": "GBK", "reverseString": false}The response parameters are listed in the table below:
MODBUS Settings Parameters
Section titled “MODBUS Settings Parameters”| Parameter | Type | Description |
|---|---|---|
| enable | Bool | Enable MODBUS. true = on, false = off. |
| byte4Order | String | 32-bit format. Supported formats include: ABCD, BADC, CDAB, DCBA, etc. |
| byte8Order | String | 64-bit format. Supported formats include: ABCDEFGH, BADCFEHG, GHEFCDAB, HGFEDCBA, etc. |
| encoding | String | Encoding, e.g. ASCII, UTF-8, GBK, etc. |
| reverseString | Bool | Reverse string. true = on, false = off. |
5.9.6.4. update-modbus-settings Update MODBUS Settings
Section titled “5.9.6.4. update-modbus-settings Update MODBUS Settings”Updates the MODBUS settings and returns the updated settings.
POST /api/config/update-modbus-settingsRequest body example
{ "enable": true, "byte4Order": "ABCD", "byte8Order": "ABCDEFGH", "encoding": "UTF-8", "reverseString": true}For request parameters, see MODBUS Settings Parameters.
Response example
{ "enable": true, "byte4Order": "ABCD", "byte8Order": "ABCDEFGH", "encoding": "UTF-8", "reverseString": true}For response parameters, see MODBUS Settings Parameters.
5.9.6.5. mqtt-settings Get MQTT Settings
Section titled “5.9.6.5. mqtt-settings Get MQTT Settings”This interface takes no request parameters.
GET /api/config/mqtt-settingsResponse example
{ "enable": false, "mode": "Default", "brokerAddress": "brokerAddress", "port": 1111, "clientID": "client", "username": "username", "password": "password", "dataReportTopic": "topic1", "rpcRequestTopic": "rpcReq", "rpcResponseTopic": "rpcRes", "encoding": "GBK", "allowAnonymous": false, "arrayToString": false, "publishOnValueChange": false, "publishAllOnValueChange": false, "timeoutReportingInterval": 0}The response parameters are listed in the table below:
MQTT Settings Parameters
Section titled “MQTT Settings Parameters”| Parameter | Type | Description |
|---|---|---|
| enable | Bool | Enable MQTT. true = on, false = off. |
| mode | String | Mode. See MQTT mode for details. |
| brokerAddress | String | Server address |
| port | Int32 | Server port |
| clientID | String | Client ID |
| username | String | Username |
| password | String | Password |
| dataReportTopic | String | Data report topic |
| rpcRequestTopic | String | RPC request topic |
| rpcResponseTopic | String | RPC response topic |
| encoding | String | Encoding, e.g. ASCII, UTF-8, GBK, etc. |
| allowAnonymous | Bool | Allow anonymous login. true = on, false = off. |
| arrayToString | Bool | Convert array to string. true = on, false = off. |
| publishOnValueChange | Bool | Write on value change. true = on, false = off. Default is false. |
| publishAllOnValueChange | Bool | Upload all content on change. Effective only when publish-on-value-change is enabled. Default is false, meaning only the changed portion is uploaded when a value changes. |
| timeoutReportingInterval | Int32 | Timeout reporting interval. Effective only when publish-on-value-change is enabled. If the time since the last upload exceeds this interval, data is uploaded once regardless of whether the value changed. Unit: seconds. Default is 0, meaning timeout reporting is disabled. |
| additionalInfo | Object | Mode-specific settings. Returned for Gewu mode and omitted for modes without additional settings. |
MQTT mode
Section titled “MQTT mode”| Option |
|---|
| Default |
| TB2 |
| Brm |
| IoTDA |
| WisIoT |
| MKT |
| GeWu |
| TB |
Gewu additionalInfo parameters
Section titled “Gewu additionalInfo parameters”| Parameter | Type | Description |
|---|---|---|
| gatewayProductKey | String | Product key of the gateway product. |
| gatewayDeviceKey | String | Gateway device key, 4-32 ASCII letters, digits, or underscores. |
| gatewayDeviceID | String | Gateway device ID, 10-32 ASCII letters, digits, or hyphens. |
| gatewayDeviceSecret | String | Gateway device secret. |
| gatewaySignMethod | Int32 | Signature method: 0 = HMAC-SHA256, 1 = HMAC-SM3. |
| gatewayOperator | Int32 | Carrier: 0 = none, 1 = China Unicom, 2 = China Mobile, 3 = China Telecom, 4 = China Broadnet. |
| machineProductKey | String | Product key of the machine product. |
| groupProductKey | String | Product key of the group product. |
5.9.6.6. update-mqtt-settings Update MQTT Settings
Section titled “5.9.6.6. update-mqtt-settings Update MQTT Settings”Updates the MQTT settings and returns the updated settings.
POST /api/config/update-mqtt-settingsRequest body example
{ "enable": true, "mode": "GeWu", "brokerAddress": "mqtt.example.com", "port": 1883, "publishOnValueChange": true, "publishAllOnValueChange": false, "timeoutReportingInterval": 0, "additionalInfo": { "gatewayProductKey": "gatewayProduct", "gatewayDeviceKey": "gateway_0001", "gatewayDeviceID": "gateway-device-0001", "gatewayDeviceSecret": "secret", "gatewaySignMethod": 0, "gatewayOperator": 1, "machineProductKey": "machineProduct", "groupProductKey": "groupProduct" }}For request parameters, see MQTT Settings Parameters.
Response example
{ "enable": true, "mode": "GeWu", "brokerAddress": "mqtt.example.com", "port": 1883, "publishOnValueChange": true, "publishAllOnValueChange": false, "timeoutReportingInterval": 0, "additionalInfo": { "gatewayProductKey": "gatewayProduct", "gatewayDeviceKey": "gateway_0001", "gatewayDeviceID": "gateway-device-0001", "gatewayDeviceSecret": "secret", "gatewaySignMethod": 0, "gatewayOperator": 1, "machineProductKey": "machineProduct", "groupProductKey": "groupProduct" }}For response parameters, see MQTT Settings Parameters.
5.9.6.7. database-settings Get Database Settings
Section titled “5.9.6.7. database-settings Get Database Settings”This interface takes no request parameters.
GET /api/config/database-settingsResponse example
For an InfluxDB v2.x type database, the response is as follows:
{ "enable": true, "type": "InfluxDB v2.x", "serverAddress": "192.168.100.101", "port": "12345", "username": "username", "password": "password", "bucket": "Bucket", "tablePrefix": "Prefix", "organization": "Organization", "dataRetentionPeriod": 0, "writeOnValueChange": true, "timeoutReportingInterval": 0}For a non-InfluxDB v2.x type database, the response is as follows:
{ "enable": true, "type": "MySQL", "serverAddress": "192.168.100.101", "port": "12345", "username": "username", "password": "password", "database": "Database", "tablePrefix": "Prefix", "storageMode": "User Defined", "dataRetentionPeriod": 0, "useLocalTime": false, "enablePrimaryKey": false, "writeOnValueChange": false, "timeoutReportingInterval": 0, "loggingModeTypes": [ "AlarmHistory", "AxialOverload", "CNCStatus", "Count", "CurrentToolNumber", "Cycle", "EnergyConsum", "Feed", "FeedAndSpindle", "GroupCount", "GroupCumulativeTime", "LaserPower", "Load", "LogHistory", "Offset", "PLC", "Position", "ProgramBlock", "ProgramInfo", "SpindleOverload", "TimeData", "ToolLife" ], "realTimeModeTypes": [ "AlarmLog", "GroupOEE", "OEE" ], "noActionModeTypes": []}The response parameters are listed in the table below:
Database Settings Parameters
Section titled “Database Settings Parameters”| Parameter | Type | Description |
|---|---|---|
| enable | Bool | Enable the database. true = on, false = off. |
| type | String | Type. See Database Types for details. |
| serverAddress | String | Server address |
| port | String | Server port |
| username | String | Username |
| password | String | Password |
| bucket | String | Database bucket. InfluxDB v2.x type only. |
| organization | String | Organization name. InfluxDB v2.x type only. |
| database | String | Database. Non-InfluxDB v2.x types only. |
| storageMode | String | Storage mode. Non-InfluxDB v2.x types only. See Database Storage Modes for details. |
| dataRetentionPeriod | Int32 | Data retention period (hours). Not returned when storageMode is Real Time; returned in all other cases (including InfluxDB v2.x). |
| loggingModeTypes | String[] | Effective when the storage mode is User Defined. See the <type> data classes in 4.2. Data Description for details. |
| noActionModeTypes | String[] | Effective when the storage mode is User Defined. See the <type> data classes in 4.2. Data Description for details. |
| realTimeModeTypes | String[] | Effective when the storage mode is User Defined. See the <type> data classes in 4.2. Data Description for details. |
| useLocalTime | Bool | Use local time. Non-InfluxDB v2.x types only. |
| enablePrimaryKey | Bool | Enable primary key. Non-InfluxDB v2.x types only. |
| tablePrefix | String | Table prefix |
| writeOnValueChange | Bool | Write on value change. true = on, false = off. |
| timeoutReportingInterval | Int32 | Timeout reporting interval. Effective when write-on-value-change is enabled. If the time since the last write exceeds this interval, data is uploaded once regardless of whether the value changed. Unit: seconds. Default is 0, meaning timeout writing is disabled. |
Database Types
Section titled “Database Types”| Option |
|---|
| InfluxDB v2.x |
| MySQL |
| SQL Server |
| PostgreSQL |
Database Storage Modes
Section titled “Database Storage Modes”| Option | Description |
|---|---|
| Logging | Logging |
| Real Time | Real time |
| User Defined | User defined |
5.9.6.8. update-database-settings Update Database Settings
Section titled “5.9.6.8. update-database-settings Update Database Settings”Updates the database settings and returns the updated settings.
POST /api/config/update-database-settingsRequest body example
{ "enable": true, "type": "SQL Server", "serverAddress": "192.168.100.201", "port": "23456", "username": "username2", "password": "password2", "database": "Database2", "tablePrefix": "Prefix2", "storageMode": "Real Time", "useLocalTime": true, "enablePrimaryKey": true, "writeOnValueChange": true, "timeoutReportingInterval": 60}For request parameters, see Database Settings Parameters.
Response example
{ "enable": true, "type": "SQL Server", "serverAddress": "192.168.100.201", "port": "23456", "username": "username2", "password": "password2", "database": "Database2", "tablePrefix": "Prefix2", "storageMode": "Real Time", "useLocalTime": true, "enablePrimaryKey": true, "writeOnValueChange": true, "timeoutReportingInterval": 60, "loggingModeTypes": [ "AlarmHistory", "AxialOverload", "CNCStatus", "Count", "CurrentToolNumber", "Cycle", "EnergyConsum", "Feed", "FeedAndSpindle", "GroupCount", "GroupCumulativeTime", "LaserPower", "Load", "LogHistory", "Offset", "PLC", "Position", "ProgramBlock", "ProgramInfo", "SpindleOverload", "TimeData", "ToolLife" ], "realTimeModeTypes": [ "AlarmLog", "GroupOEE", "OEE" ], "noActionModeTypes": []}For response parameters, see Database Settings Parameters.
5.9.6.9. gateway-file-server-settings Get Gateway File Server Settings
Section titled “5.9.6.9. gateway-file-server-settings Get Gateway File Server Settings”This interface takes no request parameters.
GET /api/config/gateway-file-server-settingsResponse example
{ "enable": false, "enableFtp": false, "enableSmb": false, "username": "dncuser", "password": "dncuser"}The response parameters are listed in the table below:
Gateway File Server Settings Parameters
Section titled “Gateway File Server Settings Parameters”| Parameter | Type | Description |
|---|---|---|
| enable | Bool | Enable the gateway file server. true = on, false = off. |
| enableFtp | Bool | Enable FTP. true = on, false = off. |
| enableSmb | Bool | Enable shared folder. true = on, false = off. |
| username | String | Username. Read-only, cannot be modified. |
| password | String | Password |
5.9.6.10. update-gateway-file-server-settings Update Gateway File Server Settings
Section titled “5.9.6.10. update-gateway-file-server-settings Update Gateway File Server Settings”Updates the gateway file server settings and returns the updated settings.
POST /api/config/update-gateway-file-server-settingsRequest body example
{ "enable": true, "enableFtp": true, "enableSmb": true, "username": "dncuser", "password": "password"}For request parameters, see Gateway File Server Settings Parameters.
Response example
{ "enable": true, "enableFtp": true, "enableSmb": true, "username": "dncuser", "password": "password"}For response parameters, see Gateway File Server Settings Parameters.
5.9.6.11. http-settings Get HTTP Settings
Section titled “5.9.6.11. http-settings Get HTTP Settings”This interface takes no request parameters.
GET /api/config/http-settingsResponse example
{ "enable": true, "enableIpWhiteList": true, "ipWhiteList": "192.168.100.200;192.168.100.201;"}The response parameters are listed in the table below:
HTTP Settings Parameters
Section titled “HTTP Settings Parameters”| Parameter | Type | Description |
|---|---|---|
| enable | Bool | Enable HTTP. true = on, false = off. |
| enableIpWhiteList | Bool | Enable IP whitelist. true = on, false = off. |
| ipWhiteList | String | Whitelist entries (separated by ;). Not returned if not set. |
5.9.6.12. update-http-settings Update HTTP Settings
Section titled “5.9.6.12. update-http-settings Update HTTP Settings”Updates the HTTP settings and returns the updated settings.
POST /api/config/update-http-settingsRequest body example
{ "enable": true, "enableIpWhiteList": true, "ipWhiteList": "192.168.100.200;192.168.100.201;"}For request parameters, see HTTP Settings Parameters.
Response example
{ "enable": true, "enableIpWhiteList": true, "ipWhiteList": "192.168.100.200;192.168.100.201;"}For response parameters, see HTTP Settings Parameters.
5.9.6.13. hub-settings Get Hub Settings
Section titled “5.9.6.13. hub-settings Get Hub Settings”This interface takes no request parameters.
GET /api/config/hub-settingsResponse example
{ "enable": false, "server": "serverAddress", "accessToken": "accessToken", "enableBroadcasting": false, "enableGatewayLinking": false, "gatewayLinks": "uid1,token1;uid2,token2;"}The response parameters are listed in the table below:
Hub Settings Parameters
Section titled “Hub Settings Parameters”| Parameter | Type | Description |
|---|---|---|
| enable | Bool | Enable Hub. true = on, false = off. |
| server | String | Server address. Not returned if not set. |
| accessToken | String | Gateway token. Not returned if not set. |
| enableBroadcasting | Bool | Enable broadcasting. true = on, false = off. When enabled, data is broadcast via the Hub. |
| enableGatewayLinking | Bool | Enable gateway linking. true = on, false = off. When enabled, data broadcast by the linked gateways specified under the Hub is received. |
| gatewayLinks | String | Linked gateways. Not returned if not set. |
5.9.6.14. update-hub-settings Update Hub Settings
Section titled “5.9.6.14. update-hub-settings Update Hub Settings”Updates the Hub settings and returns the updated settings.
POST /api/config/update-hub-settingsRequest body example
{ "enable": true, "server": "serverAddress", "accessToken": "accessToken", "enableBroadcasting": true, "enableGatewayLinking": false, "gatewayLinks": "uid1,token1;uid2,token2;"}For request parameters, see Hub Settings Parameters.
Response example
{ "enable": true, "server": "serverAddress", "accessToken": "accessToken", "enableBroadcasting": true, "enableGatewayLinking": false, "gatewayLinks": "uid1,token1;uid2,token2;"}For response parameters, see Hub Settings Parameters.
5.9.6.15. remote-access Get Remote Access Settings
Section titled “5.9.6.15. remote-access Get Remote Access Settings”This interface takes no request parameters.
GET /api/config/remote-accessResponse example
{ "host": "serverUrl", "hub": "XXXXXX-XXXXXX-XXXXXX-XXXXXX", "password": "password", "bridgeNetwork": "LAN1;", "state": "Established", "expiration": "2999-12-31T23:59:59"}The response parameters are listed in the table below:
Remote Access Settings Parameters
Section titled “Remote Access Settings Parameters”| Parameter | Type | Description |
|---|---|---|
| host | String | Remote server address. |
| hub | String | Site (read-only), defaults to the gateway UID. |
| password | String | Password. |
| bridgeNetwork | String | Bridge network, a semicolon-separated list: "" (no bridging), "LAN1;", "LAN2;" or "LAN1;LAN2;". |
| state | String | Connection state (read-only): Connecting, Negotiation, Retry (the above three are all “connecting” states), Auth (authenticating), Established (connected), Idle (not connected) |
| expiration | String | Expiration date (read-only), returned when state is not Idle (not connected). |
5.9.6.16. update-remote-access Update Remote Access Settings
Section titled “5.9.6.16. update-remote-access Update Remote Access Settings”Updates the remote access settings and returns the updated settings.
POST /api/config/update-remote-accessRequest body example
{ "host": "serverUrl2", "password": "password2", "bridgeNetwork": "LAN1;"}For request parameters, see Remote Access Settings Parameters.
Response example
{ "host": "serverUrl2", "hub": "XXXXXX-XXXXXX-XXXXXX-XXXXXX", "password": "password2", "bridgeNetwork": "LAN1;", "state": "Established", "expiration": "2999-12-31T23:59:59"}For response parameters, see Remote Access Settings Parameters.

