Configuration

Configuration endpoint represents all network configuration, and other global configurations.

Endpoints

GET  /api/conf                      Returns current configuration
POST /api/conf                      Use any specified config values as an argument to modify

Configuration Object

{
  "hostName": "SynLink",
  "macAddr": "3A:D2:21:D3:82:45",
  "webPort": 80,
  "webSslPort": 443,
  "telnetPort": 23,
  "sshPort": 22,
  "ipAssign": "static",
  "globalRebootTime": 5,
  "webEnabled": true,
  "webSslEnabled": true,
  "webRedirectHttp": false,
  "customSslCertEnabled": false,
  "telnetEnabled": true,
  "sshEnabled": true,
  "subnetMask": "255.255.255.0",
  "gatewayIp": "192.168.1.1",
  "staticIp": "192.168.1.100",
  "primaryDns": "8.8.8.8",
  "secondaryDns": "8.8.4.4",
  "ntpEnabled": true,
  "ntpHost": "pool.ntp.org",
  "disableSshPassLogin": false,
  "disableSshKeyLogin": false,
  "usbFwupdateControlEnabled":false,
  "sshIdleTimeout": 0,
  "webIdleTimeout": 0,
  "webMaxUsers": 0,
  "deviceSequentialPowerUpDelay": 3,
  "webApiPasswordEnabled": false,
  "smtpServer": "",
  "smtpPort": 0,
  "smtpTlsEnabled": 0,
  "smtpAuthRequired": 0,
  "smtpUsername": "",
  "syslogServerIp": "",
  "enableRemoteTcpEncryptedLogging":false,
  "enableRemoteUserLogging":false,
  "enableRemoteEventLogging":false,
  "smtpPassword": "",
  "snmpv12Enabled": true,
  "snmpv12ReadString": "public",
  "snmpv12WriteString": "private",
  "snmp3AuthPass": "examplepassword",
  "snmp3PrivacyPass": "exampleprivacypass",
  "snmp3TrapAuthProtocol": "SHA",
  "snmp3TrapPrivacyProtocol": "AES",
  "snmp3TrapSecurity": "authPriv",
  "deviceName": "SynLink PDU",
  "lcdOrientation": 90,
  "lcdScreensaverTimeout": 60,
  "lcdBacklightBrightness": 2,
  "lcdScreensaverType": "power_info",
  "lcdBackgroundColor": "black",
  "lcdOutletControlEnabled": true,
  "lcdNetworkControlEnabled": true,
  "lcdRebootControlEnabled":false,
  "lcdFlushControlEnabled":false,
  "portAMode": "sensor",
  "portAComBaud": 115200,
  "portAModemBaud": 115200,
  "usbComBaud": 115200,
  "usbModemBaud":115200,
  "usbFwupdateControlEnabled":false,
  "daylightsavings": true,
  "timezone": "GMT+8",
  "customSslCertExists": false,
  "customSslKeyExists": false
}

Device Settings

{
  "deviceName": "Name for device not host name",
  "globalRebootTime": 5
}
KeyTypeDescription
deviceNamestringName for this PDU. Separate from hostname
globalRebootTimenumberNumber of seconds the outlet is flipped before flipping back on a power cycle

IP Settings

{
  "macAddr": "80:1F:12:41:ED:28",
  "ipAssign": "dhcp",
  "staticIp": "192.168.1.100",
  "subnetMask": "255.255.255.0",
  "gatewayIp": "192.168.1.1",
  "primaryDns": "8.8.8.8",
  "secondaryDns": "8.8.4.4",
  "hostName": "SP-3001CA-HA"
}
KeyTypeDescription
macAddrstringMac address string for network interface card
ipAssignstringEither "dhcp" or "static" are valid strings. DHCP assignment will show IP through dhcpAssignedIp. Static IP is set with staticIp
staticIpstringIP Address that the PDU will respond to if ipAssign is set to "static"
subnetMaskstringSubnet Mask that divides IP address into network address and host address
gatewayIpstringIP Address of device on network which sends local network traffic to other networks
primaryDnsstringIP Address of Primary DNS Server
secondaryDnsstringIP Address of Secondary DNS Server
hostNamestringLabel assigned to network connected device

The following attributes only apply when"ip_assign" is set to dhcp and a DHCP address has been properly assigned.

{
  "dhcpAssignedIp":"192.168.1.101",
  "dhcpPrimaryDns":"8.8.8.8",
  "dhcpSecondaryDns":"8.8.4.4",
  "dhcpGatewayIp":"192.168.1.1",
  "dhcpSubnetMask":"255.255.255.0"
}
KeyTypeDescription
dhcpAssignedIpstringIP Address assigned by DHCP server. Only available if ipAssign is "dhcp"
dhcpPrimaryDnsstringPrimary DNS assigned by DHCP server. Only available if ipAssign is "dhcp"
dhcpSecondaryDnsstringSecondary DNS by DHCP server. Only available if ipAssign is "dhcp"
dhcpGatewayIpstringGateway IP assigned by DHCP server. Only available if ipAssign is "dhcp"
dhcpSubnetMaskstringSubnet Mask assigned by DHCP server. Only available if ipAssign is "dhcp"

Web Settings

{
  "webEnabled": true,
  "webPort": 80,
  "webRedirectHttp": true,
  "webSslEnabled": true,
  "webSslPort": 443,
  "webApiPasswordEnabled": false,
  "customSslCertEnabled": false,
  "customSslCertExists": false,
  "customSslKeyExists": false
}
KeyTypeDescription
webEnabledbooleanTurns on or off Webserver
webPortnumberPort to reach Webserver. Default port is 80
webRedirectHttpbooleanIf true then any requests to http will be redirected to https
webSslEnabledbooleanEnables web server on HTTPS. Uses webSslPort port
webSslPortnumberPort to reach HTTPS webserver. Default port is 443
webApiPasswordEnabledbooleanEnable or disable username-password access with every HTTP call. WARNING: Insecure
customSslCertEnabledbooleanSet to true to use custom ssl cert and key instead of default. Requires customSslCertExists and customSslKeyExists to be true
customSslCertExistsbooleantrue if user has successfully uploaded an SSL Certificate
customSslKeyExistsbooleantrue if user has successfully uploaded an SSL Key

SSH Settings

{
  "sshEnabled": true,
  "sshPort": 23,
  "disableSshPassLogin": false,
  "disableSshKeyLogin": false,
  "sshIdleTimeout": 0
}
KeyTypeDescription
sshEnabledbooleanTurns on or off SSH Server
sshPortnumberPort to reach SSH Server. Default port is 22
disableSshPassLoginbooleanDisable or enable password based logins
disableSshKeyLoginbooleanDisable or enable key based logins
sshIdleTimeoutnumberNumber of seconds before SSH server auto disconnects from idle connection

...