Usages – Request building peakUsages

 
 

Searching the building PeakUsage during its designated period.

get/buildings/:buildingId/peakUsages

Permission: User

curl -G http://building-api.encoredtech.com/1.1/buildings/54de704e9261aeb489d3f9529b540be1044710b7/peakUsages    
     -H "Authorization: --" 
     -d 'period=hourly&start=1447254000000&end=1447340400000'

Header

Field Type Description
Authorization String Basic Auth Use
Basic api_key

URL Param

Field Type Description
buildingId String siteID

Query String

Field Type Description
period String Unit of usage check (hourly, daily, monthly)
start Number Timestamp on a start date, inclusive (ms)
end Number Timestamp on a end date, exclusive (ms)

Success 200

Field Type Description
usages Object[] Usages
  timestamp Number Time Stamp on a particular date (ms)
  peakUsage Number Usage of peak electricity (mWh)
HTTP/1.1 200 OK
[
     {
        "timestamp": 1447167600000,
        "peakUsage": 339000

     },
     {
        "timestamp": 1447168500000,
        "peakUsage": 295000
     }
 ]

400

Field Description
InvalidHeaderError Error is returned in following cases:
– ‘Authorization’ Header is missed
InvalidContentError Error is returned in following cases:
– Required paramters are missed
– Parameter is not valid
– Other errors in Parameter

403

Field Description
NotAuthorizeError Invalid apikey

404

Field Description
ResourceNotFoundError Requested Resource does not exist

500

Field Description
InternalError Other Server Errors
HTTP/1.1 400 Bad Request
{
    "code": "InvalidHeader",
    "message": "Authorization Header is missed"
}

Usages – Request realtime usage

 
 

Searching the building usage in real time at the time of request.

get/buildings/:buildingId/realtimeUsage

Permission: User

- Searching the whole building usage in real time
  curl -G http://building-api.encoredtech.com/1.1/buildings/54de704e9261aeb489d3f9529b540be1044710b7/realtimeUsage         
      -H "Authorization: --"

Header

Field Type Description
Authorization String Basic Auth Use
Basic api_key

URL Param

Field Type Description
buildingId String siteID

Query String

Field Type Description
tag optional String Just in case you don’t have tag ID (searching intersection tag, tag could be searched only if it’s less than 20)

Success 200

Field Type Description
usage Object  
  key Object total or tag
    timestamp Number Timestamp on a particular date (ms)
    voltage Number Voltage (mV)
    current Number Electric Current (mA)
    activePower Number Active Power (mW)
    apparentPower Number Apparent Power (mVA)
    reactivePower Number Reactive Power (mVar)
    powerFactor Number Power Factor
    wattHour Number Accumulation Power (mWh)
HTTP/1.1 200 OK
{
    "total" : {
        "timestamp": 1390961400000,
        "voltage": 100000,
        "current": 1000,
        "activePower": 100000,
        "apparentPower": 100000,
        "reactivePower": 100000,
        "powerFactor": 1000,
        "wattHour": 0
    }
 }

400

Field Description
InvalidHeaderError Error is returned in following cases:
– ‘Authorization’ Header is missed
InvalidContentError Error is returned in following cases:
– Required paramters are missed
– Parameter is not valid
– Other errors in Parameter

403

Field Description
NotAuthorizeError Invalid apikey

404

Field Description
ResourceNotFoundError Requested Resource does not exist

500

Field Description
InternalError Other Server Errors
HTTP/1.1 400 Bad Request
{
    "code": "InvalidHeader",
    "message": "Authorization Header is missed"
}

Usages – Request usages

 
 

Searching the building electricity usage every 15min/hourly /daily/monthly

get/buildings/:buildingId/usages

Permission: User

- Searching the whole building usages
  curl -G http://building-api.encoredtech.com/1.1/buildings/54de704e9261aeb489d3f9529b540be1044710b7/usages                  
      -d 'period=hourly&start=1393772400000&end=1393783200000'
      -H "Authorization: --"

Header

Field Type Description
Authorization String Basic Auth Use
Basic api_key

URL Param

Field Type Description
buildingId String siteID

Query String

Field Type Description
period String Unit of usage check(15min, hourly, daily, monthly)
start Number TimeStamp on a start date, inclusive (ms)
end Number Time Stamp on a end date, exclusive (ms)
tag optional String Just in case you don’t have tag ID (^ searching intersection tag, tag could be searched only if it’s less than 20)

Success 200

Field Type Description
usages Object  
  key Object[] total or tag
    timestamp Number Timestamp on a particular date (ms)
    unitPeriodUsage Number Unit period usage (mWh)
    unitPeriodBill Number Unit period bill (원)
HTTP/1.1 200 OK
{
    "total" :
    [
         {
             "timestamp" : 1393772400000,
             "unitPeriodUsage": 8024000,
             "unitPeriodBill": 0
         },
         {
             "timestamp" : 1393776000000,
             "unitPeriodUsage": 7056000,
             "unitPeriodBill": 0
         },
         {
             "timestamp": 1393779600000,
             "unitPeriodUsage": 9086050,
             "unitPeriodBill":
         }
    ]
 }

400

Field Description
InvalidHeaderError Error is returned in following cases:
– ‘Authorization’ Header is missed
InvalidContentError Error is returned in following cases:
– Required paramters are missed
– Parameter is not valid
– Other errors in Parameter

403

Field Description
NotAuthorizeError Invalid apikey

404

Field Description
ResourceNotFoundError Requested Resource does not exist

500

Field Description
InternalError Other Server Errors
HTTP/1.1 400 Bad Request
{
    "code": "InvalidHeader",
    "message": "Authorization Header is missed"
}