Skip to main content

Gateway API

This page lists commonly used GatewayRuntime, Studio, and Watchdog interfaces. Log in first and send a valid Bearer Token when calling protected interfaces.

Basic Rules

ItemDescription
GatewayRuntime default addresshttp://<gateway-IP>:6100
Studio default addresshttp://<Studio-IP>:5100
Watchdog default addresshttp://<gateway-IP>:6200
Data formatNormal interfaces use JSON. Import, upload, export, and download interfaces may use form files or file streams.
AuthenticationUse Bearer Token after login. Log in again when the Token expires or authorization fails.
Result checkCheck the returned status code and message to confirm whether the operation succeeded.

Studio and Watchdog listen on 0.0.0.0 by default, and the current version allows clients to use plain http://IP:port. Plain remote HTTP requires remote management and AllowInsecureRemoteHttp; Watchdog project deployment and process control also require RemoteDeploymentEnabled.

Studio And Watchdog Password Challenge

Studio and Watchdog do not accept a plaintext login or bootstrap password in the JSON request. Clients must use this current protocol:

  1. Call the application's password public-key endpoint and read keyId, publicKey, algorithm, nonce, and expiresAt.
  2. Verify that algorithm is RSA-OAEP-SHA256.
  3. Parse publicKey as a Base64-encoded RSA 2048 SubjectPublicKeyInfo DER key and encrypt the following UTF-8 JSON. Field casing is fixed.
{
"Password": "actual password",
"Nonce": "nonce from the challenge"
}
  1. Base64-encode the RSA-OAEP-SHA256 ciphertext. Send it as password, and send keyId as passwordKeyId in the login or bootstrap request.
  2. After login, send Authorization: Bearer <token> to protected endpoints.

A challenge expires after two minutes and can be consumed only once. The server invalidates it after either a successful or failed decryption attempt, so every retry must obtain a new challenge. The current protocol does not provide Basic Authentication, plaintext-password, RSA-OAEP-SHA1, or legacy-field fallbacks.

On a plain HTTP IP page, a browser client can use node-forge for RSA-OAEP-SHA256 and crypto.getRandomValues for the OAEP seed. Do not depend on crypto.subtle.importKey, which is commonly unavailable in that context.

HTTP security boundary

The one-time RSA challenge only adds protection to the login and bootstrap password fields; it does not replace TLS. Bearer tokens, bootstrap tokens, password-change requests, project packages, backups, and other application data are still unencrypted in transit over plain HTTP. Use HTTPS on public or untrusted networks.

GatewayRuntime Authentication

MethodPathPurpose
GET/api/auth/GetLoginPasswordPublicKeyGet the password encryption public key
POST/api/auth/LoginLog in
POST/api/auth/RefreshTokenRefresh Token
POST/api/auth/ChangePasswordChange the current password
POST/api/auth/LogoutLog out from the current session
POST/api/auth/LogoutAllLog out all sessions of the current user
POST/api/auth/MeGet current user information
POST/api/auth/GetMyMenusGet menus available to the current user
POST/api/auth/GetUserPermissionsGet current user permissions
GET/api/auth/GetOAuth2ProvidersGet OAuth2 providers
GET/api/auth/GetRuntimeConfigGet login page runtime configuration
POST/api/auth/OAuth2ExchangeExchange OAuth2 authorization code
POST/api/auth/OAuth2LinkLink OAuth2 account
POST/api/auth/OAuth2UnlinkUnlink OAuth2 account
POST/api/auth/GetOAuth2AccountsGet linked OAuth2 accounts

GatewayRuntime Overview And Metadata

MethodPathPurpose
GET/api/gatewayoverviewcontroller/getgatewaytotalGet channel, device, variable, and alarm totals
GET/api/gatewayoverviewcontroller/getcollectdevicesGet collection device overview
POST/api/gatewayoverviewcontroller/getchannelstatuspagelistQuery channel status page
POST/api/gatewayoverviewcontroller/getdevicestatuspagelistQuery device status page
POST/api/gatewayoverviewcontroller/getvariablestatuspagelistQuery variable status page
GET/api/gatewaysystemcontroller/getsysteminfoGet CPU, memory, disk, uptime, and system information
GET/api/gatewayprojectcontroller/getprojectinfoGet current project information
GET/api/gatewaymetadatacontroller/getpluginlistGet collection plugin list
GET/api/gatewaymetadatacontroller/getdataforwardpluginlistGet data forwarding plugin list
GET/api/gatewaymetadatacontroller/getchanneltypes?pluginName=<collect-plugin-full-name>Get channel types supported by a collection plugin; the device form uses this to decide whether Channel is required
GET/api/gatewaymetadatacontroller/getchannelselectlistGet channel options
GET/api/gatewaymetadatacontroller/getdeviceselectlistGet device options
GET/api/gatewaymetadatacontroller/getvariableselectlistGet variable options

Collection Configuration

ObjectMain PathsPurpose
Channel/api/channelcontroller/addchannel, updatechannel, deletechannel, batcheditchannel, copychannelAdd, edit, delete, batch edit, and copy channels
Channel import/export/api/channelcontroller/channelexcelexport, channelpageexcelexport, channelexcelimportImport and export channels with Excel
Device/api/devicecontroller/adddevice, updatedevice, deletedevice, batcheditdevice, copydeviceAdd, edit, delete, batch edit, and copy devices
Device import/export/api/devicecontroller/deviceexcelexport, devicepageexcelexport, deviceexcelimportImport and export devices with Excel
Variable/api/variablecontroller/addvariable, updatevariable, deletevariable, batcheditvariable, copyvariableAdd, edit, delete, batch edit, and copy variables
Variable import/export/api/variablecontroller/variableexcelexport, variableexcelimport, gatewaydataexcelexport, gatewaydataexcelimportImport and export variables or gateway configuration
Variable write/api/gatewaywritevariablecontroller/setvariablevalueWrite variable values

Data Forwarding

MethodPathPurpose
GET/api/gatewaydataforwardcontroller/getgroupsGet forwarding groups
GET/api/gatewaydataforwardcontroller/gettargetsGet forwarding targets
GET/api/gatewaydataforwardcontroller/getgroupvariablesGet variables in a forwarding group
GET/api/gatewaydataforwardcontroller/gettargetvariablepropertiesGet target variable properties
GET/api/gatewaydataforwardcontroller/getruntimeGet data forwarding runtime status
POST/api/gatewaydataforwardcontroller/addgroup, updategroup, deletegroup, restartgroupMaintain forwarding groups
POST/api/gatewaydataforwardcontroller/addtarget, updatetarget, deletetarget, restarttargetMaintain forwarding targets
POST/api/gatewaydataforwardcontroller/setgroupvariablesSave forwarding group variables
POST/api/gatewaydataforwardcontroller/upserttargetvariableproperty, deletetargetvariablepropertySave or delete target variable properties
POST/api/gatewaydataforwardcontroller/getgrouplog, gettargetlogQuery forwarding runtime logs
POST/api/gatewaydataforwardcontroller/exportgrouplog, exporttargetlogExport forwarding runtime logs
POST/api/gatewaydataforwardcontroller/dataforwardexcelexport, dataforwardexcelimportImport and export forwarding configuration

Forwarding group variables decide whether a variable belongs to a group. Target variable properties only describe how a specific target uses that variable; in manual range mode, call setgroupvariables before saving target variable properties.

Data And Alarm Query

MethodPathPurpose
POST/api/gatewayrealdatacontroller/GetRealDataRecordsByTargetQuery real-time data records
GET/api/gatewayrealdatacontroller/GetRealDataTargetNamesGet real-time data targets
POST/api/gatewayhisdatacontroller/GetHisDataRecordsByTargetQuery historical data records
POST/api/gatewayhisdatacontroller/GetHisNumberDataRecordsByTargetQuery historical numeric data
POST/api/gatewayhisdatacontroller/GetTypedHisDataRecordsByTarget, GetTypedHisNumberDataRecordsByTargetQuery typed historical records by UTC range, variable set, pagination, and allow-listed sorting
POST/api/gatewayhisdatacontroller/GetHisNumberSeriesByTargetQuery historical numeric series in Auto, Raw, Average, Minimum, Maximum, First, or Last mode
GET/api/gatewayhisdatacontroller/GetHisDataTargetNamesGet historical data targets
POST/api/customsqldatacontroller/GetCustomSqlDataByTargetQuery custom SQL historical data
GET/api/customsqldatacontroller/GetCustomSqlColumnsGet custom SQL columns
POST/api/gatewayrealalarmcontroller/getrealalarmvariablesQuery real-time alarms
POST/api/gatewayrealalarmcontroller/confirmalarmConfirm real-time alarms
POST/api/gatewayhisalarmcontroller/GetHisAlarmRecordsByTargetQuery historical alarms
GET/api/gatewayhisalarmcontroller/GetHisAlarmTargetNamesGet historical alarm targets

Typed history requests use UTC start/end times and are protected by limits for variable count, range, page size, series points, source rows, and export rows. Defaults are maintained in Configuration/HisDataQueryOptions.json. Integrations should paginate records or use numeric-series aggregation instead of requesting an entire large raw range at once.

MQTT Client and MQTT Server producers can access the same history capabilities through the default RpcHistory topic. Requests use RpcHistory/<32-digit-hex-request-id> and responses use RpcHistory/<request-id>/Response. The protocol supports targets, records, numeric series, historical alarms, alarm confirmation, and cancellation. Large responses are gzip-compressed and Base64-chunked, with request, response, chunk, concurrency, and timeout limits.

Rules, Scripts, And Nodes

ModuleMain PathsPurpose
Rule flows/api/gatewayruleenginecontroller/getruleflowspaged, saveruleflow, deleteruleflows, toggleflowenabledQuery, save, delete, enable, and disable rule flows
Rule runtime/api/gatewayruleenginecontroller/getruleenginestatus, getallflownodevalues, getruleenginelogQuery rule status, node values, and logs
Rule import/export/api/gatewayruleenginecontroller/ruleflowexcelexport, ruleflowexcelimportImport and export rules with Excel
Scripts/api/gatewayscriptcontroller/getscriptlist, createscript, deletescripts, compilescript, compileallscriptsQuery, create, delete, and compile scripts
Script metadata/api/gatewayscriptcontroller/getregisteredexpressionspaged, getexpressioncategories, getscriptcategoriesQuery registered expressions and categories
Custom nodes/api/gatewaycustomnodecontroller/getcustomnodespaged, createcustomnode, deletecustomnodes, compileallcustomnodesQuery, create, delete, and compile custom nodes
Editor assistance/api/completion/complete, codecheck, signaturehelp, hover, definition, formatcodeProvide code completion, checking, signature help, hover, definition, and formatting in script and node editors

Plugins, Certificates, And System Settings

ModuleMain PathsPurpose
Plugins/api/gatewayplugincontroller/getplugins, updatepluginenable, batchenableplugins, batchdisableplugins, syncpluginconfigsQuery, enable, disable, and sync plugins
Certificates/api/certificatecontroller/getcertificates, addcertificate, updatecertificate, deletecertificates, generatecertificateauthority, generateservercertificate, generateclientcertificate, exportcertificate, exportprivatecertificate, getcertificateselectlistShared TAdmin certificate query, upload, update, delete, generation, export, and selection
Alarm configuration/api/gatewayalarmconfigcontroller/GetAlarmConfig, UpdateAlarmConfigConfigure alarm recovery policy
Redundancy/api/gatewayredundantcontroller/getredundancyoptions, setredundancyoptions, switchredundantstateConfigure redundancy and switch redundancy state
Network/api/gatewaynetworkconfigcontroller/getnetworkconfigs, setnetworkconfigQuery and configure network cards
Time synchronization/api/gatewaytimecontroller/getsystemtime, setsystemtime, getntpconfig, setntpconfig, syncntptimeConfigure system time and NTP
System control/api/gatewayrestartcontroller/restartruntime, restartapplicationRestart runtime or application
Backup/api/backupcontroller/backupconfigdatabaseBack up the configuration database
PING/api/gatewaypingcontroller/pingtestTest network connectivity
Certificate API upgrade

Certificate management has moved to the shared TAdmin module. The old /api/gatewaycertificatecontroller/... controller is no longer the current API. Callers must migrate to /api/certificatecontroller/... and update action names such as generatecertificateauthority and deletecertificates, together with the certificate:* permission codes.

Logs

Log TypeMain Paths
Backend log/api/backendlogcontroller/getbackendlog, getallbackendlog, exportbackendlog, exportallbackendlog
Channel log/api/channelcontroller/getchannellog, updatechannelloglevel, exportchannellog
Device log/api/devicecontroller/getdevicelog, updatedeviceloglevel, exportdevicelog
Operation log/api/adminsystemlogcontroller/getoperatelog, /api/adminsystemlogcontroller/exportoperatelog
RPC log/api/rpclogcontroller/getrpclog, exportrpclog
SQL log/api/adminsystemlogcontroller/getsqllog, /api/adminsystemlogcontroller/exportsqllog
Audit log/api/adminauditlogcontroller/getloginaudit, getpermissionaudit, getusersecurityaudit, and related export interfaces

Permissions

ObjectMain PathsPurpose
Users/api/gatewayusercontroller/getusers, adduser, updateuser, setroles, resetpassword, lock, unlock, deleteuserMaintain users and assign roles
Sessions/api/gatewayusercontroller/getusersessions, revokesession, setsessionrevokedManage user sessions
Roles/api/gatewayrolecontroller/getroles, addrole, updaterole, copyrole, setpermissions, getpermissioncatalog, deleteroleMaintain roles and permissions
Menus/api/gatewaymenucontroller/getmenutree, savemenu, validatemenu, movemenu, setmenuenabled, setmenuvisible, deletemenuMaintain menu tree
Buttons/api/gatewaybuttoncontroller/getbuttons, addbutton, updatebutton, deletebuttonMaintain button permissions

Studio And Watchdog

Studio Authentication

MethodPathDescription
GET/api/auth/GetLoginPasswordPublicKeyIssue a two-minute, one-time RSA-OAEP-SHA256 password challenge.
GET/api/auth/BootstrapStatusQuery whether administrator bootstrap is required.
POST/api/auth/BootstrapBootstrap with token, passwordKeyId, and Base64 ciphertext password.
POST/api/auth/LoginLog in with name, passwordKeyId, and Base64 ciphertext password.
POST/api/auth/ChangePasswordChange the password using the Studio JWT Bearer and return a newly issued JWT.

Studio returns a JWT Bearer that expires after seven days. The one-time bootstrap token is stored at Data/studio_bootstrap.token under the runtime directory and is deleted after successful bootstrap. Bootstrap is allowed from an IP client when remote management is enabled.

Watchdog Authentication

MethodPathDescription
GET/api/watchdog/login/password-public-keyIssue a two-minute, one-time RSA-OAEP-SHA256 password challenge.
GET/api/watchdog/bootstrap/statusQuery whether administrator bootstrap is required.
POST/api/watchdog/bootstrapBootstrap with token, passwordKeyId, and Base64 ciphertext password.
POST/api/watchdog/loginLog in with username, passwordKeyId, and Base64 ciphertext password.
POST/api/watchdog/logoutRevoke the current Bearer session.

Watchdog returns accessToken, username, and expiresAt. The access token is a random opaque value valid for eight hours; only its SHA-256 digest is retained in server memory. Logout or a Watchdog restart invalidates it. The one-time bootstrap token is stored at Data/watchdog_bootstrap.token and is deleted after successful bootstrap.

ApplicationMain PathsPurpose
Studio authentication/api/auth/GetLoginPasswordPublicKey, BootstrapStatus, Bootstrap, Login, ChangePasswordOne-time password challenge, bootstrap, login, and password change
Studio projects/api/project/list, create, update, importQuery, create, edit, and import projects
Studio runtime/api/runtime/current-project, start, stop, gateway-version, app-versionQuery local runtime status and version
Studio Watchdog/api/watchdog/configs, config/save, upload, downloadConfigure Watchdog connections, upload projects, and download projects
Studio tunnel/api/tunnel/status, listeners, config, start, stopQuery and configure tunnel service
Watchdog authentication/api/watchdog/login/password-public-key, bootstrap/status, bootstrap, login, logoutOne-time password challenge, bootstrap, Bearer login, and logout
Watchdog status/api/watchdog/status, projects, logs, backupsDashboard, projects, logs, and backups
Watchdog projects/api/watchdog/project/upload, project/download/{name}, apply/{name}, project/{name}Upload, download, apply, and delete projects
Watchdog process/api/watchdog/restart, stopRestart or stop GatewayRuntime
Watchdog backup/api/watchdog/backup/create, backup/restore/{name}, backup/{name}Create, restore, and delete backups
Watchdog tunnel/api/watchdog/tunnel/status, activate/{name}, deactivate/{name}, activate-all, deactivate-allQuery and control tunnel clients
Watchdog settings/api/watchdog/options, change-passwordConfigure Watchdog and change password

Notes

  • Use the exact path and letter case shown in the table.
  • Import, export, upload, and download interfaces may return files or accept form files.
  • Management interfaces are controlled by menu, button, and API permissions. If the role lacks permission, the call may fail even when the Token is valid.