Delete energy metrics
DELETE
/db/metrics/energy
const url = 'https://demo.evcc.io/api/db/metrics/energy?from=2026-07-01T00%3A00%3A00Z&to=2026-07-02T00%3A00%3A00Z&group=forecast&name=db%3A8&title=Battery';const options = {method: 'DELETE', headers: {cookie: 'auth=<auth>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request DELETE \ --url 'https://demo.evcc.io/api/db/metrics/energy?from=2026-07-01T00%3A00%3A00Z&to=2026-07-02T00%3A00%3A00Z&group=forecast&name=db%3A8&title=Battery' \ --cookie auth=<auth>Deletes recorded energy slots in the given time range, optionally narrowed by entity. Filter parameters match /history/energy, so the same request can be previewed there before deleting. Session users must supply the admin password in the X-Admin-Password header. API key holders via Bearer token are exempt.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Header Parameters
Section titled “Header Parameters”X-Admin-Password
Admin password
string
Admin password (required for session auth, not needed for API key)
Query Parameters
Section titled “Query Parameters”from
required
string format: date-time
Example
2026-07-01T00:00:00ZStart time, inclusive (RFC3339)
to
required
string format: date-time
Example
2026-07-02T00:00:00ZEnd time, exclusive (RFC3339)
group
string
Example
forecastFilter by entity group
name
string
Example
db:8Filter by entity name
title
string
Example
BatteryFilter by entity title
Responses
Section titled “Responses”Success - number of deleted records
Media typeapplication/json
object
deleted
integer
Example
{ "deleted": 96}Invalid parameters or database offline
Unauthorized - Login and try again
Media typetext/plain
string