Services relating to block_fixtures of the Energy Asset Tool. This describes the relationship between a block and fixture.

Supported Formats

json, xml

GET /api/v1/block_fixtures/:id
Retrieve the block_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

{"block_id":2,"fixture_id":2,"has_occupancy_controls":null,"id":2,"number_of_fixtures":6,"percent_served":null,"uses_percent_served":false}
<block-fixture>
<block-id type="integer">2</block-id>
<fixture-id type="integer">2</fixture-id>
<has-occupancy-controls type="boolean" nil="true"/>
<id type="integer">2</id>
<number-of-fixtures type="integer">6</number-of-fixtures>
<percent-served type="float" nil="true"/>
<uses-percent-served type="boolean">false</uses-percent-served>
</block-fixture>

GET /api/v1/blocks/:block_id/block_fixtures
Retrieve all block_fixtures belonging to the block.

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

response:  {"block_id":2,"fixture_id":1,"has_occupancy_controls":true,"id":2,"number_of_fixtures":100,"percent_served":2.2,"uses_percent_served":true}

POST /api/v1/blocks/:block_id/block_fixtures
Create a new block_fixture. This will associate the block_fixture with the block and return a BlockFixture object with unique ID assigned.

Also see Fixtures belonging to the building that can be associated with this block..

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

{"uses_percent_served":"t","percent_served":2.2,"number_of_fixtures":100,"has_occupancy_controls":"t","fixture_id":1}
<block_fixture>
  <uses-percent-served>t</uses-percent-served>
  <percent-served type="float">2.2</percent-served>
  <number-of-fixtures type="integer">100</number-of-fixtures>
  <has-occupancy-controls>t</has-occupancy-controls>
  <fixture-id type="integer">1</fixture-id>
</block_fixture>

Params

Param name Description
fixture_id
required

ID of fixture being assigned to block.

Validations:

  • Must be a Integer

uses_percent_served
optional

True if describing block with percentage that fixtures serve. False if using number_of_fixtures.

Validations:

  • Must be one of: true, false.

percent_served
optional

Percentage of block served by fixtures.

Validations:

  • Must be a Integer

number_of_fixtures
optional

Number of fixtures in block (uses_percent_served must be false).

Validations:

  • Must be a Integer

has_occupancy_controls
optional

True if occupancy controls are used, false otherwise.

Validations:

  • Must be one of: true, false.

has_daylight_controls
optional

DEPRECATED: Use Surfaces.daylight_controls

Validations:

  • Must be one of: .


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

Params

Param name Description
fixture_id
required

ID of fixture being assigned to block.

Validations:

  • Must be a Integer

uses_percent_served
optional

True if describing block with percentage that fixtures serve. False if using number_of_fixtures.

Validations:

  • Must be one of: true, false.

percent_served
optional

Percentage of block served by fixtures.

Validations:

  • Must be a Integer

number_of_fixtures
optional

Number of fixtures in block (uses_percent_served must be false).

Validations:

  • Must be a Integer

has_occupancy_controls
optional

True if occupancy controls are used, false otherwise.

Validations:

  • Must be one of: true, false.

has_daylight_controls
optional

DEPRECATED: Use Surfaces.daylight_controls

Validations:

  • Must be one of: .


DELETE /api/v1/block_fixtures/:id
Delete the block_fixture and disassociate it from the block. 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.