Reset database
POST
/db/reset
const url = 'https://demo.evcc.io/api/db/reset';const options = { method: 'POST', headers: {cookie: 'auth=<auth>', 'Content-Type': 'application/json'}, body: '{"sessions":true,"settings":true}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://demo.evcc.io/api/db/reset \ --header 'Content-Type: application/json' \ --cookie auth=<auth> \ --data '{ "sessions": true, "settings": true }'Selectively deletes sessions and/or settings from the database. Session users must supply the admin password in the X-Admin-Password header. API key holders via Bearer token are exempt. The instance restarts after a successful reset.
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)
Request Bodyrequired
Section titled “Request Bodyrequired”Media typeapplication/json
object
sessions
Delete all charging sessions
boolean
settings
Delete all settings, configs, and meters
boolean
Examplegenerated
{ "sessions": true, "settings": true}Responses
Section titled “Responses”Reset successful, instance is restarting
Unauthorized - Login and try again
Media typetext/plain
string