Provision a Managed Database
Add a managed database to a managed backend app (type managed or fullstack). Ngris creates a dedicated database with a least-privilege, per-app user, then delivers the connection details to the running backend as environment variables — you never handle a raw credential.
The app gets its own database, its own user, and a GRANT scoped to that one schema. The password reaches the app only as the encrypted DB_PASSWORD env var; it is never returned by the API. One managed database per application.
Injected environment variables
Once the database reaches ready, these variables appear in the app's env list and are delivered to the running backend on its next rollout:
3306 for MySQL / MariaDB.mysql://user:pass@host:3306/db). Also a masked secret.Response (202 Accepted)
Provisioning is asynchronous. The binding is created with status: "provisioning"; poll GET /database until it is ready. The response wraps the binding under database.
provisioning → ready (or failed).Errors
Get the Managed Database
Read the app's managed-database binding: its status and the connection identifiers (db_name, db_user, db_host). The password is never included — it lives only in the encrypted DB_PASSWORD env var delivered to the backend. Poll this after provisioning until status is ready.
Response (200 OK)
null when no database has been provisioned; otherwise the binding.provisioning, ready, or failed.