Services relating to water_heaters of the Energy Asset Tool

Supported Formats

json, xml

GET /api/v1/water_heaters/:id
Retrieve the water_heater 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:57:57Z","distribution_type_id":1,"fuel_type_id":1,"id":1,"name":"Water Heater 1","tank_insulation_r_value":16.0,"tank_insulation_thickness":2.2,"tank_volume":100.0,"updated_at":"2013-07-26T16:57:57Z","uses_heat_pump":false,"water_heater_efficiency":8.2}
<water-heater>
<building-id type="integer">37</building-id>
<created-at type="datetime">2013-07-03T21:20:39Z</created-at>
<distribution-type-id type="integer">5</distribution-type-id>
<fuel-type-id type="integer">1</fuel-type-id>
<id type="integer">17</id>
<name type="string">wh1</name>
<tank-insulation-r-value type="float" nil="true"/>
<tank-insulation-thickness type="float" nil="true"/>
<tank-volume type="float" nil="true"/>
<updated-at type="datetime">2013-07-03T21:20:39Z</updated-at>
<uses-heat-pump type="boolean">true</uses-heat-pump>
<water-heater-efficiency type="float" nil="true"/>
</water-heater>

GET /api/v1/buildings/:building_id/water_heaters
Retrieve all water_heaters 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/water_heaters
Create a new water_heater. This will associate the water_heater with the building and return a WaterHeater 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":"Water Heater 1","fuel_type_id":1,"distribution_type_id":1,"uses_heat_pump":"f","water_heater_efficiency":8.2,"tank_insulation_thickness":2.2,"tank_insulation_r_value":16.0,"tank_volume":100}
<water_heater>
  <name type="string">Water Heater 2</name>
  <fuel-type-id type="integer">1</fuel-type-id>
  <distribution-type-id type="integer">1</distribution-type-id>
  <uses-heat-pump>f</uses-heat-pump>
  <water-heater-efficiency type="float">8.2</water-heater-efficiency>
  <tank-insulation-thickness type="float">2.2</tank-insulation-thickness>
  <tank-insulation-r-value type="float">16.0</tank-insulation-r-value>
  <tank-volume type="integer">100</tank-volume>
</water_heater>

Params

Param name Description
fuel_type_id
required

Fuel Type

Validations:

  • Must be a Integer

distribution_type_id
required

Distribution Type

Validations:

  • Must be a Integer

water_heater_efficiency
optional

Water heater efficiency (percentage)

Validations:

  • Must be a Float

tank_insulation_thickness
optional

Tank insulation thickness (inches)

Validations:

  • Must be a Float

tank_insulation_r_value
optional

Tank insulation R-value (F*ft2*h/Btu)

Validations:

  • Must be a Float

tank_volume
optional

Tank volume (gallons)

Validations:

  • Must be a Float


PUT /api/v1/water_heaters/:id
Update an existing water_heater. 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
fuel_type_id
required

Fuel Type

Validations:

  • Must be a Integer

distribution_type_id
required

Distribution Type

Validations:

  • Must be a Integer

water_heater_efficiency
optional

Water heater efficiency (percentage)

Validations:

  • Must be a Float

tank_insulation_thickness
optional

Tank insulation thickness (inches)

Validations:

  • Must be a Float

tank_insulation_r_value
optional

Tank insulation R-value (F*ft2*h/Btu)

Validations:

  • Must be a Float

tank_volume
optional

Tank volume (gallons)

Validations:

  • Must be a Float


DELETE /api/v1/water_heaters/:id
Delete the water_heater 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.