Services relating to fixtures of the Energy Asset Tool

Supported Formats

json, xml

GET /api/v1/fixtures/:id
Retrieve the fixture 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-25T20:05:52Z","id":1,"lamp_type_id":1,"lamp_wattage":60,"mounting_type_id":1,"name","Fixture 1","number_of_lamps":20,"updated_at":"2013-07-25T20:05:52Z"}
<fixture>
<building-id type="integer">11</building-id>
<created-at type="datetime">2013-06-28T22:00:38Z</created-at>
<id type="integer">20</id>
<lamp-type-id type="integer">1</lamp-type-id>
<lamp-wattage type="integer">60</lamp-wattage>
<mounting-type-id type="integer">1</mounting-type-id>
<name type="string">fixture1</name>
<number-of-lamps type="integer">1</number-of-lamps>
<updated-at type="datetime">2013-06-28T22:00:38Z</updated-at>
</fixture>

GET /api/v1/buildings/:building_id/fixtures
Retrieve all fixtures 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/fixtures
Create a new fixture. This will associate the fixture with the building and return a Fixture 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":"Fixture 1","mounting_type_id":1,"lamp_type_id":1,"number_of_lamps":10,"lamp_wattage":60}
<fixture>
  <name type="string">Fixture 4</name>
  <mounting-type-id type="integer">1</mounting-type-id>
  <lamp-type-id type="integer">1</lamp-type-id>
  <number-of-lamps type="integer">10</number-of-lamps>
  <lamp-wattage type="integer">60</lamp-wattage>
</fixture>

Params

Param name Description
mounting_type_id
required

Mounting Type ID. Must be greater than or equal to 0

Validations:

  • Must be a Integer

lamp_type_id
required

Lamp Type ID. Specifies type of Lamp to create. Must be greater than or equal to 0

Validations:

  • Must be a Integer

lamp_wattage
required

Lamp Wattage. Must be less than 1500

Validations:

  • Must be a Integer

number_of_lamps
required

Number of Lamps in Fixture. Must be between 1-12

Validations:

  • Must be a Integer


PUT /api/v1/fixtures/:id
Update an existing fixture. 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.

Examples

{"number_of_lamps":5,"lamp_wattage":90}

Params

Param name Description
mounting_type_id
required

Mounting Type ID. Must be greater than or equal to 0

Validations:

  • Must be a Integer

lamp_type_id
required

Lamp Type ID. Specifies type of Lamp to create. Must be greater than or equal to 0

Validations:

  • Must be a Integer

lamp_wattage
required

Lamp Wattage. Must be less than 1500

Validations:

  • Must be a Integer

number_of_lamps
required

Number of Lamps in Fixture. Must be between 1-12

Validations:

  • Must be a Integer


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