powersync-docs/docs/api/systeme/configuration.md
Patrick Schurig 4a7a1bddf4
All checks were successful
Build & Deploy docs / build-deploy (push) Successful in 3m52s
api : référence régénérée depuis le banc en 1.15.2+etm71 (droits NymeaEnergy.* séparés, GetOptimizerProtocol)
Le badge PUBLIC de PermissionScopeNone devient AUTH : sur un transport
authentifié, nymea exige un token valide pour toute méthode sauf
JSONRPC.Hello, Authenticate et RequestPushButtonAuth
(jsonrpcserverimplementation.cpp, tag 1.15.2). « Lecture publique, aucun
token requis » était faux, en trois langues.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-20 08:49:15 +02:00

18 KiB

Configuration

Methods

Configuration.CreateAndDownloadBackup

ADMIN

Create a backup of the current configuration and generate a download entry for the dedicated transfer connection.

Parameters:

No parameters.

Returns:

Field Type Notes
configurationError ConfigurationError
downloadId String
fileName String
size Int

Configuration.CreateBackup

ADMIN

Create a backup of the current configuration. It will be stored in the configured destination directory. Also the maxCout configuration will be considered.

Parameters:

No parameters.

Returns:

Field Type Notes
configurationError ConfigurationError

Configuration.DeleteBackupFile

ADMIN

Delete an existing configuration backup file.

Parameters:

Field Type Notes
fileName String

Returns:

Field Type Notes
configurationError ConfigurationError

Configuration.DeleteMqttPolicy

ADMIN

Delete a MQTT policy from the broker.

Parameters:

Field Type Notes
clientId String

Returns:

Field Type Notes
configurationError ConfigurationError

Configuration.DeleteMqttServerConfiguration

ADMIN

Delete a MQTT Server interface of the server.

Parameters:

Field Type Notes
id String

Returns:

Field Type Notes
configurationError ConfigurationError

Configuration.DeleteTcpServerConfiguration

ADMIN

Delete a TCP interface of the server. Note: if you are deleting the configuration for the interface you are currently connected to, the connection will be dropped.

Parameters:

Field Type Notes
id String

Returns:

Field Type Notes
configurationError ConfigurationError

Configuration.DeleteTunnelProxyServerConfiguration

ADMIN

Delete a Tunnel Proxy Server interface of the server. Note: if you are deleting the configuration for the interface you are currently connected to, the connection will be dropped.

Parameters:

Field Type Notes
id String

Returns:

Field Type Notes
configurationError ConfigurationError

Configuration.DeleteWebServerConfiguration

ADMIN

Delete a WebServer interface of the server.

Parameters:

Field Type Notes
id String

Returns:

Field Type Notes
configurationError ConfigurationError

Configuration.DeleteWebSocketServerConfiguration

ADMIN

Delete a WebSocket Server interface of the server. Note: if you are deleting the configuration for the interface you are currently connected to, the connection will be dropped.

Parameters:

Field Type Notes
id String

Returns:

Field Type Notes
configurationError ConfigurationError

Configuration.DownloadBackupFile

ADMIN

Generate a download entry for an existing configuration backup file.

Parameters:

Field Type Notes
fileName String

Returns:

Field Type Notes
configurationError ConfigurationError
downloadId String optional
fileName String optional
size Int optional

Configuration.GetAvailableLanguages

AUTH

Returns a list of locale codes available for the server. i.e. en_US, de_AT

Parameters:

No parameters.

Returns:

Field Type Notes
languages String[]

Configuration.GetBackupFiles

ADMIN

Get the list of configuration backup files from the configured destination directory.

Parameters:

No parameters.

Returns:

Field Type Notes
backupFiles BackupFile[]

Configuration.GetConfigurations

AUTH

Get all configuration parameters of the server.

Parameters:

No parameters.

Returns:

Field Type Notes
backupConfigurations {'autoBackupEnabled': 'Bool', 'autoBackupInterval': 'Int', 'destinationDirectory': 'String', 'maxCount': 'Uint'}
basicConfiguration {'d:language': 'String', 'd:location': {'latitude': 'Double', 'longitude': 'Double', 'name': 'String'}, 'd:serverTime': 'Uint', 'd:timeZone': 'String', 'debugServerEnabled': 'Bool', 'serverName': 'String', 'serverUuid': 'Uuid'}
mqttServerConfigurations ServerConfiguration[]
tcpServerConfigurations ServerConfiguration[]
tunnelProxyServerConfigurations TunnelProxyServerConfiguration[]
webServerConfigurations WebServerConfiguration[]
webSocketServerConfigurations ServerConfiguration[]

Configuration.GetMqttPolicies

ADMIN

Get all MQTT broker policies.

Parameters:

No parameters.

Returns:

Field Type Notes
mqttPolicies MqttPolicy[]

Configuration.GetMqttServerConfigurations

ADMIN

Get all MQTT Server configurations.

Parameters:

No parameters.

Returns:

Field Type Notes
mqttServerConfigurations ServerConfiguration[]

Configuration.GetTimeZones

AUTH

Get the list of available timezones.

Parameters:

No parameters.

Returns:

Field Type Notes
timeZones String[]

Configuration.RestoreBackupFile

ADMIN

Restore an existing configuration backup file. Clients should warn the user before calling this method because the current configuration data will be wiped, the server will restart immediately afterwards and it will come back up using the restored backup.

Parameters:

Field Type Notes
fileName String

Returns:

Field Type Notes
configurationError ConfigurationError

Configuration.SetBackupConfiguration

ADMIN

Set the backup configuration. The destination directory is the location where the archives will be saved, the maxCount is the number of backups which will be kept. If maxCount is 0, all backups will be kept. The autoBackupEnabled property controls periodic configuration backups and autoBackupInterval defines the interval in hours.

Parameters:

Field Type Notes
autoBackupEnabled Bool
autoBackupInterval Int
destinationDirectory String
maxCount Uint

Returns:

Field Type Notes
configurationError ConfigurationError

Configuration.SetDebugServerEnabled

ADMIN

Enable or disable the debug server.

Parameters:

Field Type Notes
enabled String

Returns:

Field Type Notes
configurationError ConfigurationError

Configuration.SetLanguage

ADMIN

Sets the server language to the given language. See also: "GetAvailableLanguages"

Parameters:

Field Type Notes
language String

Returns:

Field Type Notes
configurationError ConfigurationError

Configuration.SetLocation

ADMIN

Sets the server location.

Parameters:

Field Type Notes
location {'latitude': 'Double', 'longitude': 'Double', 'name': 'String'}

Returns:

Field Type Notes
configurationError ConfigurationError

Configuration.SetMqttPolicy

ADMIN

Configure a MQTT broker policy. If the ID is an existing one, the existing policy will be modified, otherwise a new one will be added.

Parameters:

Field Type Notes
policy MqttPolicy

Returns:

Field Type Notes
configurationError ConfigurationError

Configuration.SetMqttServerConfiguration

ADMIN

Configure a MQTT Server interface on the MQTT broker. If the ID is an existing one, the existing config will be modified, otherwise a new one will be added. Setting authenticationEnabled to true will require MQTT clients to use credentials set in the MQTT broker policies.

Parameters:

Field Type Notes
configuration ServerConfiguration

Returns:

Field Type Notes
configurationError ConfigurationError

Configuration.SetServerName

ADMIN

Set the name of the server. Default is nymea.

Parameters:

Field Type Notes
serverName String

Returns:

Field Type Notes
configurationError ConfigurationError

Configuration.SetTcpServerConfiguration

ADMIN

Configure a TCP interface of the server. If the ID is an existing one, the existing config will be modified, otherwise a new one will be added. Note: if you are changing the configuration for the interface you are currently connected to, the connection will be dropped.

Parameters:

Field Type Notes
configuration ServerConfiguration

Returns:

Field Type Notes
configurationError ConfigurationError

Configuration.SetTimeZone

ADMIN

Set the time zone of the server. See also: "GetTimeZones"

Parameters:

Field Type Notes
timeZone String

Returns:

Field Type Notes
configurationError ConfigurationError

Configuration.SetTunnelProxyServerConfiguration

ADMIN

Configure a Tunnel Proxy Server interface of the server. If the ID is an existing one, the existing config will be modified, otherwise a new one will be added. Note: if you are changing the configuration for the interface you are currently connected to, the connection will be dropped.

Parameters:

Field Type Notes
configuration TunnelProxyServerConfiguration

Returns:

Field Type Notes
configurationError ConfigurationError

Configuration.SetWebServerConfiguration

ADMIN

Configure a WebServer interface of the server. If the ID is an existing one, the existing config will be modified, otherwise a new one will be added.

Parameters:

Field Type Notes
configuration WebServerConfiguration

Returns:

Field Type Notes
configurationError ConfigurationError

Configuration.SetWebSocketServerConfiguration

ADMIN

Configure a WebSocket Server interface of the server. If the ID is an existing one, the existing config will be modified, otherwise a new one will be added. Note: if you are changing the configuration for the interface you are currently connected to, the connection will be dropped.

Parameters:

Field Type Notes
configuration ServerConfiguration

Returns:

Field Type Notes
configurationError ConfigurationError

Configuration.UploadAndRestoreBackup

ADMIN

Create an upload session for a configuration backup archive. The uploaded file will be stored temporarily under /tmp, the current configuration will be wiped after the upload finishes and the server will restart immediately using the restored backup. Clients should warn the user before calling this method because all current configuration data will be lost.

Parameters:

Field Type Notes
fileName String
size Int

Returns:

Field Type Notes
configurationError ConfigurationError
fileName String optional
size Int optional
transferId String optional
transferToken String optional

Notifications

Configuration.BackupConfigurationChanged

Emitted whenever the backup configuration changes.

Parameters:

Field Type Notes
autoBackupEnabled Bool
autoBackupInterval Int
destinationDirectory String
maxCount Uint

Configuration.BackupFilesChanged

Emitted whenever the list of backup files changes.

Parameters:

Field Type Notes
backupFiles BackupFile[]

Configuration.BasicConfigurationChanged

Emitted whenever the basic configuration of this server changes.

Parameters:

Field Type Notes
basicConfiguration {'d:language': 'String', 'd:location': {'latitude': 'Double', 'longitude': 'Double', 'name': 'String'}, 'd:serverTime': 'Uint', 'd:timeZone': 'String', 'debugServerEnabled': 'Bool', 'serverName': 'String', 'serverUuid': 'Uuid'}

Configuration.MqttPolicyChanged

Emitted whenever a MQTT broker policy is changed.

Parameters:

Field Type Notes
policy MqttPolicy

Configuration.MqttPolicyRemoved

Emitted whenever a MQTT broker policy is removed.

Parameters:

Field Type Notes
clientId String

Configuration.MqttServerConfigurationChanged

Emitted whenever the MQTT broker configuration is changed.

Parameters:

Field Type Notes
mqttServerConfiguration ServerConfiguration

Configuration.MqttServerConfigurationRemoved

Emitted whenever a MQTT server configuration is removed.

Parameters:

Field Type Notes
id String

Configuration.TcpServerConfigurationChanged

Emitted whenever the TCP server configuration changes.

Parameters:

Field Type Notes
tcpServerConfiguration ServerConfiguration

Configuration.TcpServerConfigurationRemoved

Emitted whenever a TCP server configuration is removed.

Parameters:

Field Type Notes
id String

Configuration.TunnelProxyServerConfigurationChanged

Emitted whenever the tunnel proxy server configuration changes.

Parameters:

Field Type Notes
tunnelProxyServerConfiguration TunnelProxyServerConfiguration

Configuration.TunnelProxyServerConfigurationRemoved

Emitted whenever a tunnel proxy server configuration is removed.

Parameters:

Field Type Notes
id String

Configuration.WebServerConfigurationChanged

Emitted whenever the web server configuration changes.

Parameters:

Field Type Notes
webServerConfiguration WebServerConfiguration

Configuration.WebServerConfigurationRemoved

Emitted whenever a Web server configuration is removed.

Parameters:

Field Type Notes
id String

Configuration.WebSocketServerConfigurationChanged

Emitted whenever the web socket server configuration changes.

Parameters:

Field Type Notes
webSocketServerConfiguration ServerConfiguration

Configuration.WebSocketServerConfigurationRemoved

Emitted whenever a WebSocket server configuration is removed.

Parameters:

Field Type Notes
id String