server
The server command manages the DisplayNet Server itself: power, service restarts, the front panel display, configuration backup, and database maintenance.
| Command Type | DisplayNet |
| Minimum Version | 2.x.x |
warning
All server subcommands require the Admin role.
Usage
server <subcommand> [<arguments>]
Subcommands
Power and services
| Subcommand | Description |
|---|---|
reboot | Immediately reboots the server host (restart is a legacy alias) |
poweroff | Immediately powers off the server host (shutdown is a legacy alias) |
apirestart | Restarts the DisplayNet API service |
applypending | Applies pending device claim/authentication configuration changes, restarting the SDVoE API when required. See claim |
Front panel display
| Subcommand | Description |
|---|---|
backlight <0-100> | Sets the front panel backlight brightness |
logo | Shows the logo on the front panel display |
netdisplay | Shows the hostname and network addresses on the front panel display |
nodisplay | Clears the front panel display |
Sessions and maintenance
| Subcommand | Description |
|---|---|
activity | Lists connected API clients: user, role, connection type, address, and login time |
backup <password> | Creates an encrypted backup of the server configuration |
restore <password> <data> | Restores the server configuration from an encrypted backup |
readbackup <password> <data> | Decrypts and inspects a backup payload without restoring it |
vacuum [<table>] | Runs VACUUM ANALYZE on the logging database in the background (all tables if omitted) |
dbstats | Reports logging database size and vacuum statistics per table |
cleartempthresholdnotificationcache | Clears the device temperature-threshold notification cache, so a device already over its TempThreshold notifies again |
Examples
Reboot the serverserver reboot
Dim the front panelserver backlight 30
See who is connectedserver activity
Return value
- server activity
- server dbstats
- Other subcommands
server activity{
"status": "SUCCESS",
"request_id": null,
"result": {
"user_activity": [
{
"userName": "DisplayNet",
"userRole": "User",
"connectionType": "WebSocket",
"connectionAddress": "127.0.0.1:52362",
"loginTime": "5/19/2023 6:26 PM"
},
{
"userName": "DNAdmin",
"userRole": "Admin",
"connectionType": "WebSocket",
"connectionAddress": "10.241.52.203:39622",
"loginTime": "6/2/2023 4:42 PM"
}
]
},
"error": null
}
server dbstats (tables truncated){
"status": "SUCCESS",
"request_id": null,
"result": {
"database_stats": [
{
"totalTables": 45,
"totalDatabaseSize": 6864896,
"totalDatabaseSizePretty": "6.5 MB",
"tablesNeedingVacuum": 3,
"tables": [
{
"tableName": "AppLogItems",
"liveTuples": 12091,
"deadTuples": 0,
"totalSizePretty": "4768 kB",
"vacuumScore": 0.0,
"needsVacuum": false
}
]
}
]
},
"error": null
}
server reboot{
"status": "SUCCESS",
"request_id": null,
"result": null,
"error": null
}
REST API
| Endpoint type | DisplayNet API command |
|---|---|
| Address | POST /api/displaynet/<operation>, or name the operation in the body of a POST /api/displaynet. See Sending commands. |
| Role | Admin |
| Subcommand | Operation | Parameters |
|---|---|---|
activity | server_activity | — |
apirestart | server_apirestart | — |
applypending | server_applypending | — |
backlight | server_backlight | value |
backup | server_backup | password |
cleartempthresholdnotificationcache | server_cleartempthresholdnotificationcache | — |
dbstats | server_dbstats | — |
freeall | server_freeall | — |
logo | server_logo | — |
netdisplay | server_netdisplay | — |
nodisplay | server_nodisplay | — |
poweroff | server_poweroff | — |
readbackup | server_readbackup | password data |
reboot | server_reboot | — |
restore | server_restore | password data |
vacuum | server_vacuum | [table] |
A parameter in brackets is optional.