db
Delete energy metrics
Changed onDeletes 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.
delete/db/metrics/energy
Request
- Base URLhttps://demo.evcc.io/api
- URLhttps://demo.evcc.io/api/db/metrics/energy
- Auth
- API key in cookie auth
- or HTTP bearer
Query parameters
fromstring date-time required
Example:2026-07-01T00:00:00Z
Start time, inclusive (RFC3339)
tostring date-time required
Example:2026-07-02T00:00:00Z
End time, exclusive (RFC3339)
group'forecast' | 'battery' | 'grid' | 'pv' | 'home' | 'loadpoint' | 'meter' | 'consumer' | 'temperature'
Example:forecast
Filter by entity group
namestring
Example:db:8
Filter by entity name
titlestring
Example:Battery
Filter by entity title
Headers
X-Admin-Passwordstring
Admin password
Admin password (required for session auth, not needed for API key)
Response
Success - number of deleted records
Example response
{
"deleted": 96
}Changes
- info
endpoint added
- info