Certain SynLink Models include Dry Contact Relay Outputs. Relay outputs refer to the dry contact relays in the back of the PDUs behind the Green Phoenix Connectors. Models with Dry Contact Relay Outputs have NC-NO (normally closed-normally opened) and common connectors.
Endpoints
GET /api/relayOutputs Returns list of all relayOutputs
PUT /api/relayOutput/:relay_output_id Modifies individual outletDry Contact Relay Output Object
{
"id": "R1-1000010",
"relayName": "Relay 1",
"state": "ON",
"relayIndex": 1,
"customRebootTimeEnabled": false,
"customRebootTime": 5,
}
| Key | Type | Description |
|---|---|---|
| id | string | Unique identifier for the Dry Contact Relay Output. |
| relayName | string | User defined relay name |
| state | string | "ON", "OFF" are the available options. |
| relayIndex | number | Which number relay amongst total relays |
| customRebootTimeEnabled | boolean | true if the time for reboot looks at customRebootTime instead of global reboot time |
| customRebootTime | number | Number of seconds for relay reboot time if customRebootTimeEnabled is true |
List all Relay Outputs
Returns a list of all relay outputs on PDU. Only select PDUs have relay outputs.
GET /api/relayOutputs Returns list of all relayOutputsExample Request
curl 'http://192.168.1.100/api/relayOutputs' \
--header 'Authorization: Bearer j2d36cG2ciHKDDqFc3k'Response
Expected response is an array of Relay Output Objects
[
{
"id": "R1-1000010",
"relayName": "Relay 1",
"state": "ON",
"relayIndex": 1,
"customRebootTimeEnabled": false,
"customRebootTime": 5,
},
{
"id": "R2-1000010",
"relayName": "Relay 2",
"state": "ON",
"relayIndex": 2,
"customRebootTimeEnabled": false,
"customRebootTime": 5,
},
...
]Modify Relay Output
Endpoint to modify relay output information, including the relay state.
PUT /api/relayOutput/:relay_output_id Modifies individual outletRequest
Follows Authentication Scheme.
All request parameters are optional, but at least one is required.
{
"relayName": "Power Supply Number 1",
"state": "OFF",
"customRebootTimeEnabled": true,
"customRebootTime": 10,
}relayName optional
Name string up to 100 characters.
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 relay output.
customRebootTime optional
Number of seconds relay output will be off when rebooting and customRebootTimeEnabled is true
Example Request
curl 'http://192.168.1.100/api/relayOutput/R1-1000010' \
--header 'Authorization: Bearer j2d36cG2ciHKDDqFc3k' \
--data '{ "relayName":"Power Supply Number 1", "state":"ON" }'Response
Expected response is an updated Relay Output Object
{
"id": "R1-1000010",
"relayName": "Power Supply Number 1",
"relayIndex": 1,
"state": "ON",
"customRebootTimeEnabled": false,
"customRebootTime": 12,
}