

### Download Backup Device Specific Configuration
Download a encrypted binary which contains all the settings of the PDU.
```endpoint
GET /api/system/backupCustomConfiguration Download configuration file to with current configuration
```
### Upload Backup Device Specific Configuration
Upload a previously downloaded encrypted binary which contains all the settings of the PDU.
```endpoint
POST /api/restoreCustomConfiguration Upload configuration file to override current configuration
```
### Download Custom Backup Configuration
Download a encrypted binary which contains a user specified set of settings of the PDU.
#### Example JSON
```json
{
// compatible between any SynLink PDUs
"networkSettings": true,
// compatible between any SynLink PDUs
"displayAndPortSettings": true,
// compatible only with similar models
"powerSettings": true, // if this is true, than compatibility is: model specific
// compatible only with similar models
"userSettings": true, // if this is true, than compatibility is: model specific
// compatible only with similar models
"automationSettings": true // if this is true, than compatibility is: model specific
}
```
```endpoint
POST /api/system/customConfiguration Download configuration file to with custom configuration
```
Two types of compatibility: **Model Compatible** and **SynLink Compatible**
**SynLink Compatible** is compatible with any
**Model Compatible** has to match the below compatibility fields
## __ __INTERNAL_ONLY__ __
### OUTPUT
```json
{
"compatibility": {
// if model specific these show up, otherwise, this is empty and compatible with any device
"numOutlets": 16,
"numInlets": 2,
"phase": "Single Phase",
"inletConfig": "dualcircuit",
"outletPwrMeasurementsSupported": true,
"outletSwitchingSupported": true
}
"conf": {
// network settings
"hostName": "sasdadsd",
"secondaryHostName": "SynLink_Backup_Interface",
"webPort": 80,
"webSslPort": 443,
"telnetPort": 23,
"sshPort": 22,
"autopingInterval": 1000,
"autopingTimeout": 1000,
"ipAssign": "dhcp",
"secondaryIpAssign": "static",
"webEnabled": true,
"webSslEnabled": false,
"webRedirectHttp": false,
"telnetEnabled": false,
"sshEnabled": true,
"subnetMask": "255.255.255.0",
"secondarySubnetMask": "255.255.255.0",
"gatewayIp": "192.168.1.1",
"secondaryGatewayIp": "192.168.2.1",
"staticIp": "192.168.1.100",
"secondaryStaticIp": "192.168.2.1",
"primaryDns": "8.8.8.8",
"secondaryDns": "8.8.4.4",
"ntpEnabled": true,
"ntpHost": "pool.ntp.org",
"disableSshPassLogin": false,
"disableSshKeyLogin": false,
"sshIdleTimeout": 0,
"remoteSyslogEnabled": false,
"enableRemoteUserLogging": false,
"enableRemoteEventLogging": false,
"syslogServerIp": "",
"webApiPasswordEnabled": false,
"smtpServer": "",
"smtpPort": 0,
"smtpTlsEnabled": 0,
"smtpAuthRequired": 0,
"smtpUsername": "",
"smtpPassword": "*****************",
"snmpv12Enabled": true,
"snmpv12ReadString": "public",
"snmpv12WriteString": "*****************",
"cloudEnabled": true,
"cloudUsername": "",
"cloudPostIntervalMs": 120000,
"primaryInterfaceStatus": "\"UP\"\n",
"userAuthenticationType": "local",
"localFallbackAuth": true,
"ldapServerHost": "",
"ldapPort": 389,
"ldapTlsPort": 636,
"ldapSecurity": "noSecurity",
"ldapBindDns": "",
"ldapBindPw": "*********",
"ldapBaseDns": "",
"ldapObjEntryClass": "inetOrgPerson",
"ldapLoginAttr": "uid",
"ldapEnableAnonBind": false,
"radiusServerHost": "",
"radiusAuthType": "chap",
"radiusAuthenticationPort": 1812,
"radiusAccountingPort": 1813,
"radiusSharedSecret": "",
"radiusTimeout": 10,
"radiusNumRetries": 3,
"snmpv3Enabled": 1,
"snmpPort": 161,
"snmp3TrapSecurity": "authPriv",
"snmp3TrapUserId": "",
"snmp3AuthPass": "*****************",
"snmp3TrapAuthProtocol": "SHA",
"snmp3PrivacyPass": "*****************",
"snmp3TrapPrivacyProtocol": "AES",
"snmpSysContact": "",
"snmpSysName": "SynLink PDU",
"snmpSysLocation": "",
"daylightsavings": true,
"timezone": "GMT+8",
// display/port settings
"secondaryNetworkInterfaceMode": "disabled",
"usbFwupdateControlEnabled": false,
"usbComBaud": 115200,
"usbModemBaud": 115200,
"portAMode": "sensor",
"portAComBaud": 115200,
"portAModemBaud": 115200,
"enableOutletSwitchLogs": true,
"lcdOrientation": 90,
"lcdScreensaverTimeout": 60,
"lcdBacklightBrightness": 2,
"lcdScreensaverType": "power_info",
"lcdBackgroundColor": "black",
"lcdEnabled": true,
"lcdOutletControlEnabled": false,
"lcdNetworkControlEnabled": true,
"lcdRebootControlEnabled": false,
"lcdFlushControlEnabled": false,
"deviceName": "Desktop 1U FSB",
"globalRebootTime": 5
},
"users": [ // user settings
{
"accessToken": "FSAJ987AKSJHD9JEB",
"sshKeys": ["ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQC9QVv/e0wRQ31oHi8Vbjx0j7oS4ZyLVMatsc9Uz7LTlNStQ1zbAta3ereMBJLEia510JMu+KLi9Czp1zlV5r9rgNdhwiHtXrjDoFvuICqQ82mQ+mk3FaoETxsDv+H41AVX4h1wHFaWFuVOPf8MMfXsnrxJzU9OlMumKkpUCOsOiWp9XNjwtUjRCA1yASngOWI6q9rGpM0oU/QGQ/+ADC12qhfm1iHywsUa2xAsTUQD13ydMVzuKGcpjswJMpBPxtH2lfqrgb3RZ2vczFvBhnjx3X+a8n84AMRE390ug9yV4EC6TfLYK73+AS94De7Hs+yGiu3avAQ2+U4FFeayjUJ9 kevin@xps"],
"username": "admin",
"id": "1",
"enabled": true,
"roleId": 1,
"userAuthType": 0,
"snmpv3Access": false,
"snmpv3Security": "",
"snmpv3User_id": "",
"snmpv3AuthProtocol": "SHA",
"snmpv3PrivProtocol": "AES",
"snmpv3AuthPass": "",
"snmpv3PrivPass": "",
"passwordHash": "Hashed password from /etc/shadow"
}
],
"roles": [
{
"id": 1, // important to preserve
"name": "Administrator",
"description": "All Permissions. At minimum need one administrator role at any time. Not Editable.",
"permissions": {
"viewInletStats": true,
"modifyInletStats": true,
"viewBankStats": true,
"modifyBankStats": true,
"viewEventActions": true,
"modifyEventActions": true,
"viewNetworkSettings": true,
"modifyNetworkSettings": true,
"modifyLcdSettings": true,
"modifyPortSettings": true,
"modifyFirmwareVersion": true,
"viewUsersList": true,
"modifyUsers": true,
"allowFactoryReset": true,
"allowPduRestart": true,
"modifyGlobalDeviceSettings": true,
"viewGlobalDeviceSettings": true,
"viewPortInfo": true,
"viewOutletGroups": true,
"modifyOutletGroups": true,
"viewOutlets": [ // convert outlet IDs to outlet Index
"1",
"2",
"3",
"4",
"5",
"6",
"7",
"8"
],
"modifyOutlets": [ // convert outlet IDs to outlet index
"1",
"2",
"3",
"4",
"5",
"6",
"7",
"8"
]
}
}
],
"outlets": [
{
"outletName": "Outlet 2",
"outletIndex": 0, // used to identify outlet ID
"customRebootTimeEnabled": false,
"customRebootTime": 5,
"pwrOnState": "ON"
}
],
"inlets": [
{
"inletName": "IEC-320 C20R Inlet",
"inletIndex": 0 // used to identify inlet ID
}
],
"banks": [
{
"bankName": "Bank 1"
}
],
"groups": [
{
"id": "1", // important to preserve
"groupName": "Group 1",
"groupRebootSequenceDelay": 0,
"outlets": [
0,
1 // outlet index used to identify outlet ID
]
}
],
"events": [
// event codes for inlets (13 to 29) will have to convert inlet ID to inlet index
// event codes for banks (30 to 42, 59) will have to convert bank ID to bank index
// event codes for outlets (45, 46) will have to convert outlet ID to outlet index
// https://synaccess.com/support/webapi#event-codes-table
{
"id": 1,
"name": "Example High Current Event for Bank #1",
"enabled": true,
"code": 31,
"params": [
"1", // converted bank ID to bank index
"16",
"10"
],
"actions": []
}
],
"actions": [
// action codes for outlets will have to convert outlet ID to outlet index
// https://synaccess.com/support/webapi#action-code-table
{
"id": 1, // IMPORTANT to preserve
"name": "Example Power Cycle for Outlet #1",
"enabled": true,
"code": 12,
"params": [
"1", // converted outlet ID to outlet index
"",
""
]
}
]
}
```
## __ __INTERNAL_ONLY_END__ __
### Upload Custom Backup Configuration
Upload a previously downloaded custom encrypted binary from the original, or separate PDU. Must follow compatibility rules for cross PDU upload.
```endpoint
POST /api/restoreCustomConfiguration Upload configuration file to override current configuration
```
1. unscramble json
2. check compatibility
3. If network settings
a. override network settings of specified ones
4. if display/port settings
a. override display/port settings of specified ones
5. If user settings
a. double check that the input file has users (just in case, otherwise it will be inaccessible)
b. remove all users, remove all roles, all ssh keys
c. insert users as specified in obj
d. insert roles as specified (preserving role Ids)
e. insert ssh keys as specified
6. IF outlet/inlet/circuit/groups settings,
7.