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 / Reporting Services / Add Report Template
Updated on February 12, 2023
25.0
POST
/reports/templates
Field Name | Value | Comments |
---|---|---|
Authorization | Basic credentials | |
Content-Type | application/xml |
Yes
None
Request/Response | Schema Name |
---|---|
Request | reportTemplate.xsd |
Response | response.xsd |
The following example adds a report template.
POST /reports/templates<?xml version="1.0" encoding="UTF-8"?> <reportTemplate> <name>Energy Report 2022</name> <metrics> <id>448</id> <id>443</id> <id>449</id> <id>1301</id> <id>1264</id> <id>1265</id> </metrics> </reportTemplate>
The following example shows the results when you call this web service.
<?xml version="1.0" encoding="UTF-8"?>
<response status="Ok">
<links>
<link id="23441" httpMethod="GET" link="/reports/template/23441" linkDescription="This is the GET url for this Template." hint="Energy Report 2022"/>
<link id="2345" httpMethod="GET" link="/reports/2345" linkDescription="This is the GET url for this Report." hint="Energy Report 2022"/>
</links>
</response>
The following example shows the results when you call this web service and attempt to specify more than the allowed number of metrics.
<?xml version="1.0" encoding="UTF-8"?>
<response status="Error">
<errors>
<error errorNumber="-200" errorDescription="A maximum of 50 metrics is allowed."/>
</errors>
</response>