Skip to content
EN | DE

Delete tariff metrics

DELETE
/db/metrics/tariffs
curl --request DELETE \
--url 'https://demo.evcc.io/api/db/metrics/tariffs?from=2026-07-01T00%3A00%3A00Z&to=2026-07-02T00%3A00%3A00Z&usage=grid' \
--cookie auth=<auth>

Deletes recorded tariff values in the given time range. Without usage the entire record is removed, otherwise only that usage is cleared and records left without any value are removed. Session users must supply the admin password in the X-Admin-Password header. API key holders via Bearer token are exempt.

X-Admin-Password

Admin password

string

Admin password (required for session auth, not needed for API key)

from
required
string format: date-time
Example
2026-07-01T00:00:00Z

Start time, inclusive (RFC3339)

to
required
string format: date-time
Example
2026-07-02T00:00:00Z

End time, exclusive (RFC3339)

usage
string
Allowed values: grid feedin co2 temperature
Example
co2

Limit deletion to a single tariff usage

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
Allowed values: Unauthorized