Services relating to roofs of the Energy Asset Tool

Supported Formats

json, xml

GET /api/v1/roofs/:id
Retrieve the roof 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:09:43Z","id":1,"name":"Roof 1","roof_insulation_thickness":1.0,"roof_r_value":17.0,"roof_type_id":1,"roof_u_factor":1.0,"updated_at":"2013-07-26T16:09:43Z"}
<roof>
<building-id type="integer">11</building-id>
<created-at type="datetime">2013-06-28T21:58:22Z</created-at>
<id type="integer">11</id>
<name type="string">roof1</name>
<roof-insulation-thickness type="float" nil="true"/>
<roof-r-value type="float">20.0</roof-r-value>
<roof-type-id type="integer">4</roof-type-id>
<roof-u-factor type="float" nil="true"/>
<updated-at type="datetime">2013-06-28T21:58:22Z</updated-at>
</roof>

GET /api/v1/buildings/:building_id/roofs
Retrieve all roofs 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/roofs
Create a new roof. This will associate the roof with the building and return a Roof 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":"Roof 1","roof_insulation_thickness":1.0,"roof_r_value":17.0,"roof_type_id":1,"roof_u_factor":1.0}
<roof>
  <name type="string">Roof 2</name>
  <roof-insulation-thickness type="float">1.0</roof-insulation-thickness>
  <roof-r-value type="float">17.0</roof-r-value>
  <roof-type-id type="integer">1</roof-type-id>
  <roof-u-factor type="float">1.0</roof-u-factor>
</roof>

Params

Param name Description
roof_type_id
required

Roof Type ID. Specifies type of roof to create.

Validations:

  • Must be a Integer

roof_u_factor
optional

Roof U-Factor. Must be between 0.008 - 1.28

Validations:

  • Must be a Float

roof_r_value
optional

Roof R-Value. Must be between 1 to 100

Validations:

  • Must be a Float

roof_insulation_thickness
optional

Roof Insulation Thickness (inches). Must be between 1.0 to 38

Validations:

  • Must be a Float


PUT /api/v1/roofs/:id
Update an existing roof. 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
roof_type_id
required

Roof Type ID. Specifies type of roof to create.

Validations:

  • Must be a Integer

roof_u_factor
optional

Roof U-Factor. Must be between 0.008 - 1.28

Validations:

  • Must be a Float

roof_r_value
optional

Roof R-Value. Must be between 1 to 100

Validations:

  • Must be a Float

roof_insulation_thickness
optional

Roof Insulation Thickness (inches). Must be between 1.0 to 38

Validations:

  • Must be a Float


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