databases

POST /v1/databases/{databaseId}/credentials

Reveal the database password.

All databases endpoints

Authentication

Send an API key as a bearer token. This endpoint does not state a specific permission in the specification, so give your key the least it needs and check the response rather than assuming.

This endpoint takes no organisation id. Your key already identifies the organisation it belongs to, and the response is scoped to it.

Try it

Replace anything in angle brackets with your own values, and the key placeholder with a key from your dashboard.

curl -X POST https://api.zinndigital.com/v1/databases/{databaseId}/credentials \
  -H "Authorization: Bearer zdk_live_…"

Signed in? The API console in your dashboard fills in your real organisation id and your own key, and runs the request against the live API so you can see the actual response. Open this endpoint in the API console

Details

Gated on `databases.credentials.reveal` — its own permission, held by no read-only role, because this is the one call that moves a secret opening every row the customer has. Every call is audit-logged. ⛔ **A POST rather than a GET on purpose.** A GET would put the credential in browser history, proxy logs and `Referer` headers.

Parameters

NameTypeRequiredWhat it is
databaseId (path)stringYes

Response

NameTypeRequiredWhat it is
usernamestringYes
passwordstringYes
hoststringYes
portintegerYes
database_namestringYes
enginestring<postgres, mysql>Yes
dsnstringYesA ready-to-use connection string **for this database's engine** — `postgresql://…?sslmode=verify-full` or `mysql://…?ssl-mode=VERIFY_IDENTITY`. Both spellings authenticate the s…

Errors this endpoint can return

401 · 403 · 404 · 422