Database

Endpoints for checking database connectivity, viewing database info, and running backup/restore operations.

GET /db/health

Tests the database connection and returns status.

GET /db/health

Response

{ "service": "scripts", "status": "ok", "deployed_at": "...", "message": "Database connection successful", "database": "mydb" }
GET /db/list-db

Lists MySQL users and databases on the server.

GET /db/list-db
GET /db/:service

Returns database info for the named service.

GET /db/my-app
ParamInRequiredDescription
servicepathYesPM2 service / app name
POST /db/db-backup/:service

Creates a database backup for the named service.

POST /db/db-backup/my-app
ParamInRequiredDescription
servicepathYesPM2 service / app name
POST /db/db-restore/:service

Restores a database backup for the named service.

POST /db/db-restore/my-app
Content-Type: application/json

{ "file": "backup-2026-05-14.sql.gz" }
ParamInRequiredDescription
servicepathYesPM2 service / app name
filebody / queryYesBackup filename to restore