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 modifyConfiguration 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
}| Key | Type | Description |
|---|---|---|
| deviceName | string | Name for this PDU. Separate from hostname |
| globalRebootTime | number | Number 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"
}| Key | Type | Description |
|---|---|---|
| macAddr | string | Mac address string for network interface card |
| ipAssign | string | Either "dhcp" or "static" are valid strings. DHCP assignment will show IP through dhcpAssignedIp. Static IP is set with staticIp |
| staticIp | string | IP Address that the PDU will respond to if ipAssign is set to "static" |
| subnetMask | string | Subnet Mask that divides IP address into network address and host address |
| gatewayIp | string | IP Address of device on network which sends local network traffic to other networks |
| primaryDns | string | IP Address of Primary DNS Server |
| secondaryDns | string | IP Address of Secondary DNS Server |
| hostName | string | Label 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"
}| Key | Type | Description |
|---|---|---|
| dhcpAssignedIp | string | IP Address assigned by DHCP server. Only available if ipAssign is "dhcp" |
| dhcpPrimaryDns | string | Primary DNS assigned by DHCP server. Only available if ipAssign is "dhcp" |
| dhcpSecondaryDns | string | Secondary DNS by DHCP server. Only available if ipAssign is "dhcp" |
| dhcpGatewayIp | string | Gateway IP assigned by DHCP server. Only available if ipAssign is "dhcp" |
| dhcpSubnetMask | string | Subnet 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
}| Key | Type | Description |
|---|---|---|
| webEnabled | boolean | Turns on or off Webserver |
| webPort | number | Port to reach Webserver. Default port is 80 |
| webRedirectHttp | boolean | If true then any requests to http will be redirected to https |
| webSslEnabled | boolean | Enables web server on HTTPS. Uses webSslPort port |
| webSslPort | number | Port to reach HTTPS webserver. Default port is 443 |
| webApiPasswordEnabled | boolean | Enable or disable username-password access with every HTTP call. WARNING: Insecure |
| customSslCertEnabled | boolean | Set to true to use custom ssl cert and key instead of default. Requires customSslCertExists and customSslKeyExists to be true |
| customSslCertExists | boolean | true if user has successfully uploaded an SSL Certificate |
| customSslKeyExists | boolean | true if user has successfully uploaded an SSL Key |
SSH Settings
{
"sshEnabled": true,
"sshPort": 23,
"disableSshPassLogin": false,
"disableSshKeyLogin": false,
"sshIdleTimeout": 0
}| Key | Type | Description |
|---|---|---|
| sshEnabled | boolean | Turns on or off SSH Server |
| sshPort | number | Port to reach SSH Server. Default port is 22 |
| disableSshPassLogin | boolean | Disable or enable password based logins |
| disableSshKeyLogin | boolean | Disable or enable key based logins |
| sshIdleTimeout | number | Number of seconds before SSH server auto disconnects from idle connection |
...