API Reference

Banks

Banks are representation of groups of outlets. Banks are often referred to as circuits as well. Each bank has it's own energy measurement capabilities. Individual Outlet Current Measurements or/and individual Outlet Switching are optional additions. Otherwise energy information can be found in Inlets.

Endpoints

GET    /api/banks                                Returns all banks
PUT    /api/banks/:bank_id                       Modifies individual bank

Bank Object

{
  "id": "286331153",
  "inletId": "I1-1000016",
  "firmwareVersion": "010100",
  "hardwareVersion": "010105",
  "outletSwitchingSupported": true,
  "outletMeteringSupported": true,
  "currentRms": 0.807,
  "voltageRms": 119.900,
  "lineFrequency": 60.138,
  "powerFactor": 0.810,
  "activePower": 0.009,
  "apparentPower": 0.930,
  "energyAccumulation": 42.21,
  "bankName": "Bank 1",
  "bankLines": "L1-L2",
  "circuitBreakerClosed": true,
  "hasCircuitBreakerProtection": true
}
KeyTypeDescription
idstringUnique identifier for the bank
inletIdstringID of inlet which the bank is behind
firmwareVersionstringVersion for bank firmware
hardwareVersionstringVersion for hardware for bank
outletSwitchingSupportedbooleantrue if bank outlets support individual outlet switching
outletMeteringSupportedbooleantrue if bank outlets support individual outlet current metering
currentRmsnumberThe instantaneous current measured at the inlet in Amps
voltageRmsnumberInstantaneous voltage reading at inlet and all outlets in volts
lineFrequencynumberLine Frequency measurement valid from 45-65 GHz
powerFactornumberPower Factor reading. Value is signed value representing polarity of power factor
activePowernumberActive Power measured in KW (kiloWatts). Power consumed by electrical resistance
apparentPowernumberPower which is actually consumed or utilized
energyAccumulationnumberNumber of kilowatt hours accumulated. Can be used as billing unit for energy delivered
bankNamestringUser defined name for Bank
bankLinesstringSpecific Lines or line configuration which this bank is utilizing
circuitBreakerClosedbooleanState of circuit breakers. true if circuit breaker is closed and providing power correctly.

List All Banks

Returns a list of all banks that the controller has connected to.

GET /api/banks    Returns all banks

Example Request

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

Response

Expected response is an array of Bank Objects

[
  {
    "id": 286331153,
    "firmwareVersion": "1.0.1",
    "hardwareVersion": "1.0.0",
    "outletSwitchingSupported": true,
    "outletMeteringSupported": true,
    "currentRms": 0.807,
    "voltageRms": 119.900,
    "lineFrequency": 60.138,
    "powerFactor": 0.810,
    "activePower": -0.009,
    "apparentPower": 0.930,
    "energyAccumulation": 42,
    "bankName": "Bank 1",
    "bankLines": "L1-L2",
    "circuitBreakerClosed": true,
    "hasCircuitBreakerProtection": true
  },
  ...
]

Modify Bank Info

The only value changeable for banks is a custom name field for banks.

PUT    /api/banks/:bank_id                       Modifies individual bank

Request

Follows Authentication Scheme.

{
  "bankName": "Critical Equipment Bank"
}

bankName required
Name string up to 100 characters.

Example Request
curl 'http://192.168.1.100/api/banks/286331153' \
  -H 'Authorization: Bearer j2d36cG2ciHKDDqFc3k' \
  --data '{"bankName":"Critical Equipment Bank"}'

Response

Expected response is newly modified Bank Object

{
  "id": 286331153,
  "firmwareVersion": "1.0.0",
  "hardwareVersion": "1.0.1",
  "outletSwitchingSupported": true,
  "outletMeteringSupported": true,
  "currentRms": 0.807,
  "voltageRms": 119.900,
  "lineFrequency": 60.138,
  "powerFactor": 0.810,
  "activePower": -0.009,
  "apparentPower": 0.930,
  "energyAccumulation": 42,
  "bankName": "Bank 1",
  "bankLines": "L1-L2",
  "circuitBreakerClosed": true,
  "hasCircuitBreakerProtection": true
}