Skip to content
Stand with Ukraine flag

Service RPC Methods

Service RPC methods are built-in gateway commands prefixed with gateway_ that let you check gateway health, list connected devices, schedule restarts, and manage provisioning - all from the ThingsBoard web UI without any connector configuration.

  1. Open the Dashboards tab.

  2. Add a new dashboard.

  3. Open the created dashboard, enter edit mode by clicking the pencil button in the bottom-right corner, then click Add new widget.

  4. Select the Control widgets bundle.

  5. Scroll down and select the RPC debug terminal widget.

  6. No entity has been assigned yet — click Create a new one.

  7. Fill in the required fields and select your gateway device as the entity.

  8. Apply all changes.

  9. The widget connects automatically. You can now send RPC requests to the gateway from the terminal.

Every command prefixed with gateway_ is interpreted as a service command directed at the gateway itself rather than at a connected device or connector.

Checks the connection to the gateway and confirms that RPC processing is active.

Terminal window
gateway_ping

Response:

{
"code": 200,
"resp": "pong"
}

Lists all devices currently connected through the gateway. The response is a key-value map where each key is the device name and the value identifies the connector it is connected through.

Terminal window
gateway_devices

Response:

{
"code": 200,
"resp": {
"Device Number One": "OPC-UA Connector"
}
}

Schedules a restart of the gateway service after a specified delay in seconds. The response is returned immediately after the task is added to the scheduler — before the restart actually occurs.

Terminal window
gateway_restart 60

Response:

{"success": true}

Schedules a full hardware reboot of the gateway machine after a specified delay in seconds.

Terminal window
gateway_reboot 60

Response (returned as soon as the task is scheduled, before the reboot):

{"success": true}

Removes the device credentials from the gateway’s config folder. If device provisioning is enabled, the gateway will automatically re-provision itself on the next startup.

Terminal window
gateway_remove_provisioned_credentials

Response:

{"code": 200, "resp": "Provisioned credentials file removed successfully."}