Databases
Start, stop or restart a database
Start, stop or restart a DBHost PostgreSQL database through the API. Stop blocks new connections and ends sessions; data is kept.
POST
Start, stop or restart a database
Starts, stops or restarts one database. The request waits until the action
has finished and returns the new status. Selected-database keys can use this
route for databases they are assigned to; full-account keys for any database
you own. API access requires a Pro or Business plan.
The action is recorded in the database’s activity log.
Applications lose their open connections on
stop and restart. Stopping a
database does not delete it or its backups.
Request body
Response
200 OK
Errors
During maintenance the body is
{"error":"MAINTENANCE","message":"..."}
instead of the standard error envelope.
The dashboard has the same controls in the database’s operations menu; see
Databases. The CLI equivalent is
dbhost databases start|stop|restart <id>.