Services relating to operations of the Energy Asset Tool

Supported Formats

json, xml

GET /api/v1/operations/:id
Retrieve the operation with the specific ID.

Supported Formats

json, xml

Errors

Code Description
401 Unauthorized - ensure token is being passed with each service call.
404 Unsupported operation
500 Unspecified error on server.

Examples

{"building_id":1,"created_at":"2013-07-26T16:02:19Z","id":1,"misc_electric_load":12.0,"misc_gas_load":12.0,"name":"Operation 1","saturday_close_time":"2100","saturday_open_time":"1000","saturdays_open":true,"setpoint_cooling":74,"setpoint_heating":74,"sunday_close_time":"2100","sunday_open_time":"1000","sundays_open":true,"total_occupants":100,"updated_at":"2013-07-26T16:02:19Z","weekday_close_time":"2100","weekday_open_time":"1000","weekdays_open":true}
<operation>
<building-id type="integer">49</building-id>
<created-at type="datetime">2013-07-09T21:07:54Z</created-at>
<id type="integer">20</id>
<misc-electric-load type="float">2.0</misc-electric-load>
<misc-gas-load type="float" nil="true"/>
<name type="string">op1</name>
<saturday-close-time>0000</saturday-close-time>
<saturday-open-time>0000</saturday-open-time>
<saturdays-open type="boolean">false</saturdays-open>
<setpoint-cooling type="integer">75</setpoint-cooling>
<setpoint-heating type="integer">72</setpoint-heating>
<sunday-close-time>0000</sunday-close-time>
<sunday-open-time>0000</sunday-open-time>
<sundays-open type="boolean">false</sundays-open>
<total-occupants type="integer" nil="true"/>
<updated-at type="datetime">2013-07-09T21:07:54Z</updated-at>
<weekday-close-time>2100</weekday-close-time>
<weekday-open-time>1000</weekday-open-time>
<weekdays-open type="boolean">true</weekdays-open>
</operation>

GET /api/v1/buildings/:building_id/operations
Retrieve all operations belonging to the building.

Supported Formats

json, xml

Errors

Code Description
401 Unauthorized - ensure token is being passed with each service call.
404 Unsupported operation
500 Unspecified error on server.

POST /api/v1/buildings/:building_id/operations
Create a new operation. This will associate the operation with the building and return a Operation object with unique ID assigned.

Supported Formats

json, xml

Errors

Code Description
401 Unauthorized - ensure token is being passed with each service call.
404 Unsupported operation
500 Unspecified error on server.

Examples

{"name":"Operation 1","misc_electric_load":12,"misc_gas_load":12,"weekdays_open":"t","weekday_open_time":1000,"weekday_close_time":2100,"total_occupants":100,"setpoint_heating":74,"setpoint_cooling":74,"saturdays_open":"t","saturday_open_time":1000,"saturday_close_time":2100,"sundays_open":"t","sunday_open_time":1000,"sunday_close_time":2100}
<operation>
  <name type="string">Operation 6</name>
  <misc-electric-load type="integer">12</misc-electric-load>
  <misc-gas-load type="integer">0.55</misc-gas-load>
  <weekdays-open>t</weekdays-open>
  <weekday-open-time type="integer">1000</weekday-open-time>
  <weekday-close-time type="integer">2100</weekday-close-time>
  <total-occupants type="integer">100</total-occupants>
  <setpoint-heating type="integer">74</setpoint-heating>
  <setpoint-cooling type="integer">74</setpoint-cooling>
  <saturdays-open>t</saturdays-open>
  <saturday-open-time type="integer">1000</saturday-open-time>
  <saturday-close-time type="integer">2100</saturday-close-time>
  <sundays-open>t</sundays-open>
  <sunday-open-time type="integer">1000</sunday-open-time>
  <sunday-close-time type="integer">2100</sunday-close-time>
</operation>

Params

Param name Description
misc_electric_load
optional

Miscellaneous electric load (Watts per square foot).

Validations:

  • Must be a Float

misc_gas_load
optional

Miscellaneous gas load.

Validations:

  • Must be a Float

total_occupants
optional

Total occupants.

Validations:

  • Must be a Integer

setpoint_heating
optional

Setpoint heating.

Validations:

  • Must be a Integer

setpoint_cooling
optional

Setpoint cooling.

Validations:

  • Must be a Integer

elevator_id
optional

ID of elevator to link to operations.

Validations:

  • Must be a Integer

weekdays_open
optional

True if open on weekdays, false if closed.

Validations:

  • Must be one of: true, false.

weekdays_open_time
optional

Time that building opens during weekday (e.g. 5:00am).

Validations:

  • Must be a String

weekdays_close_time
optional

Time that building closes during weekday (e.g. 6:00pm).

Validations:

  • Must be a String

saturday_open
optional

True if open on Saturdays, false if closed.

Validations:

  • Must be one of: true, false.

saturday_open_time
optional

Time that building opens during Saturdays (e.g. 5:00am).

Validations:

  • Must be a String

saturday_close_time
optional

Time that building closes during Saturdays (e.g. 6:00pm).

Validations:

  • Must be a String

sunday_open
optional

True if open on Sundays, false if closed.

Validations:

  • Must be one of: true, false.

sunday_open_time
optional

Time that building opens during Sundays (e.g. 5:00am).

Validations:

  • Must be a String

sunday_close_time
optional

Time that building closes during Sundays (e.g. 6:00pm).

Validations:

  • Must be a String


PUT /api/v1/operations/:id
Update an existing operation. Nothing is returned.

Supported Formats

json, xml

Errors

Code Description
401 Unauthorized - ensure token is being passed with each service call.
404 Unsupported operation
500 Unspecified error on server.

Params

Param name Description
misc_electric_load
optional

Miscellaneous electric load (Watts per square foot).

Validations:

  • Must be a Float

misc_gas_load
optional

Miscellaneous gas load.

Validations:

  • Must be a Float

total_occupants
optional

Total occupants.

Validations:

  • Must be a Integer

setpoint_heating
optional

Setpoint heating.

Validations:

  • Must be a Integer

setpoint_cooling
optional

Setpoint cooling.

Validations:

  • Must be a Integer

elevator_id
optional

ID of elevator to link to operations.

Validations:

  • Must be a Integer

weekdays_open
optional

True if open on weekdays, false if closed.

Validations:

  • Must be one of: true, false.

weekdays_open_time
optional

Time that building opens during weekday (e.g. 5:00am).

Validations:

  • Must be a String

weekdays_close_time
optional

Time that building closes during weekday (e.g. 6:00pm).

Validations:

  • Must be a String

saturday_open
optional

True if open on Saturdays, false if closed.

Validations:

  • Must be one of: true, false.

saturday_open_time
optional

Time that building opens during Saturdays (e.g. 5:00am).

Validations:

  • Must be a String

saturday_close_time
optional

Time that building closes during Saturdays (e.g. 6:00pm).

Validations:

  • Must be a String

sunday_open
optional

True if open on Sundays, false if closed.

Validations:

  • Must be one of: true, false.

sunday_open_time
optional

Time that building opens during Sundays (e.g. 5:00am).

Validations:

  • Must be a String

sunday_close_time
optional

Time that building closes during Sundays (e.g. 6:00pm).

Validations:

  • Must be a String


DELETE /api/v1/operations/:id
Delete the operation and disassociate it from the building. Nothing is returned.

Supported Formats

json, xml

Errors

Code Description
401 Unauthorized - ensure token is being passed with each service call.
404 Unsupported operation
500 Unspecified error on server.