During the current lapse in appropriations, EPA intends to keep the ENERGY STAR website, tools, and resources available, however they will not be updated regularly. Many services may not be available during this time.
Web Service Documentation / Categories / Property Services / Add Custom Metric
Updated on February 26, 2024
This web service adds a new custom metric based on the information provided in the XML request for a specified property. The property must already be shared with you. A maximum of 3 custom metrics per property can be defined.
25.0
POST
/property/(propertyId)/customMetrics/(customMetricSlot)
| Field Name | Value | Comments |
|---|---|---|
| Authorization | Basic credentials | |
| Content-Type | application/xml |
Yes
| Parameter Name | Description |
|---|---|
| customMetricSlot | Slot or position number (as displayed in the user interface) that identifies the custom metric. |
| propertyId | Id to the property |
| Request/Response | Schema Name |
|---|---|
| Request | customMetrics.xsd |
| Response | response.xsd |
The following example adds the custom metric (that displays first in the user interface) that belongs to a property that has an id of 14. The custom metric name is auto-generated if omitted.
POST /property/14/customMetrics/1<?xml version="1.0" encoding="UTF-8"?> <customMetric> <name>Site Energy Use per Computer</name> <numeratorMetricId>272</numeratorMetricId> <denominatorDetailTypeId>2</denominatorDetailTypeId> </customMetric>
The following example indicates that the custom metric was successfully created.
<?xml version="1.0" encoding="UTF-8"?>
<response status="Ok">
<links>
<link linkDescription="This is the GET url for this Custom Metric." link="/property/14/customMetrics/1" httpMethod="GET"/>
</links>
</response>
