API Reference

Outlets

Outlets are representations of each individual outlet on the PDU. They show information related to outlets. They are only available of PDU has banks which support either Outlet Switching and/or Outlet Current Metering.

Endpoints

GET    /api/outlets                              Returns list of all outlets
PUT    /api/outlets/:outlet_id                   Modifies individual outlet

Outlet Object

{
  "id": "1-16777225",
  "outletName": "Outlet 1",
  "pwrOnState": "ON",
  "outletIndex": 1,
  "receptacle": "NEMA 5-20R",
  "customRebootTimeEnabled": false,
  "customRebootTime": 5,
  "circuitVoltage": 116.80,
  "currentRms": 0.16,
  "state": "ON",
  "bankId": 16777225,
  "voltageDetection": true,
  "rebootStatus": "pendingOff",
  "relayHealth": "OK"
}
KeyTypeDescription
idstringUnique identifier for the Outlet.
outletNamestringUser defined outlet name
pwrOnStatestringInitial State of outlet on boot. Value is either "ON", "OFF", or "PREV"
outletIndexnumberWhich number outlet amongst total outlets
receptaclestringConnector type for outlet receptacle. Value is either "nema 5-15", "nema 5-20", "IEC 320 C13", or "IEC 320 C19"
customRebootTimeEnabledbooleantrue if the time for reboot looks at customRebootTime instead of global reboot time
customRebootTimenumberNumber of seconds for outlet reboot time if customRebootTimeEnabled is true
circuitVoltagenumberVoltage RMS of the circuit that the outlet is connected to.
currentRmsnumberKey will exist if current_monitoring_supported value is true. return number value in amps for current load for outlet.
statestring"ON", "OFF" are the available options. Only exists of outlet current metering supported
bankIdnumberUnique identifier for bank that outlet is associated with
rebootStatusstringIf outlet has been set to cycle/reboot, this value will be: pendingOff or pendingOn. Otherwise it will be none
voltageDetectionbooleanIs true if there is voltage detected on outlet. If state not equal to voltageDetection then there is potential hardware issues with the relay
relayHealthstringEither "OK" or "Failed". Compares state and voltageDetection and returns "OK" if they are equal

 
 

List All Outlets

Returns a list of all outlets that within any connected banks. Only available if outletSwitchingSupported or outletMeteringSupported are true.

GET    /api/outlets        Returns list of all outlets

Example Request

curl 'http://192.168.1.100/api/outlets' \
--header 'Authorization: Bearer j2d36cG2ciHKDDqFc3k'

Response

Expected response is an array of Outlet Objects

[
  {
    "id": "1-286331153",
    "outletName": "Outlet 1",
    "pwrOnState": "PREV",
    "outletIndex": 1,
    "receptacle": "IEC 60320 C19",
    "currentRms": 1.1,
    "state": "ON",
    "bankId": "286331153",
    "customRebootTimeEnabled": false,
    "customRebootTime": 12,
    "rebootStatus": "none",
    "voltageDetection": true,
    "relayHealth": "OK"
  },
  {
    "id": "2-286331153",
    "outletName": "Outlet 2",
    "pwrOnState": "PREV",
    "outletIndex": 2,
    "receptacle": "IEC 60320 C19",
    "currentRms": 1.1,
    "state": "ON",
    "bankId": "286331153",
    "customRebootTimeEnabled": false,
    "customRebootTime": 12,
    "rebootStatus": "none",
    "voltageDetection": true,
    "relayHealth": "OK"
  },
  ...
]

Modify Outlet

Endpoint to modify Outlet information, including the relay state to turn outlet on and off.

PUT    /api/outlets/:outlet_id                   Modifies individual outlet

Request

Follows Authentication Scheme.
All request parameters are optional, but at least one is required.

{
  "outletName": "NAS Server 1",
  "pwrOnState": "off",
  "state": "ON",
  "customRebootTimeEnabled": true,
  "customRebootTime": 10
}

outletName optional
Name string up to 100 characters.

pwrOnState optional
Power on State is the state of the relay for the specific outlet when the PDU powers on from an off/powerless state. Acceptable strings are "ON", "OFF", "PREV". "PREV" will set the relay to the state of the PDU when last lost power.

state optional
State represents the relay status. Acceptable strings are "ON", "OFF", and "REBOOT".

customRebootTimeEnabled optional
Setting to true will configure PDU to use customRebootTime when rebooting outlet.

customRebootTime optional
Number of seconds outlet will be off when rebooting and customRebootTimeEnabled is true

Example Request

curl 'http://192.168.1.100/api/outlets/1-858993459' \
  --header 'Authorization: Bearer j2d36cG2ciHKDDqFc3k' \
  --data '{ "outletName":"NAS Server 1", "pwrOnState":"off", "state":"on" }'

Response

Expected response is an updated Outlet Object

{
  "id": "1-286331153",
  "outletName": "Nas Server 1",
  "pwrOnState": "OFF",
  "outletIndex": 1,
  "receptacle": "IEC 60320 C19",
  "currentRms": 1.1,
  "state": "ON",
  "bankId": "286331153",
  "customRebootTimeEnabled": false,
  "customRebootTime": 12,
  "voltageDetection": true,
  "relayHealth": "OK"
}