Skip to content

Get database credentials

GET/v1/databases/{uid}/credentials

Returns secrets. The response contains the database password in plain text and connection strings with the password embedded. Treat it like the password itself: do not log it or store it in plain text.

Requires the secrets read permission (owner, admin or developer role). Viewers get 403. Works in any status, including while the database is still provisioning.

connection_string is the public endpoint and is an empty string for a private MySQL or Redis database. internal_connection_string only works from workloads running on RumptyCloud. ca_certificate is the PEM certificate to verify the server's TLS certificate (for example sslrootcert for PostgreSQL or --cacert for redis-cli).

After a successful password rotation, this returns the new password.

Authentication

Send your API key as Authorization: Bearer <token>. The request is scoped to the workspace in X-Workspace-Slug.

Path parameters

uidstringRequired

The database's uid.

Headers

X-Workspace-SlugstringRequired

Slug of the workspace the request acts on. You can also pass it as the workspace_slug query parameter.

Response

200

The database credentials.

successbooleanRequired

true when the request succeeded.

messagestringRequired

Human-readable status message.

dataobject

Secret. Contains the database password.

Show attributes
usernamestringRequired

Database user.

passwordstringRequired

The current database password, in plain text.

connection_stringstringRequired

Public connection URL including the password. Empty string when the database has no public hostname (private MySQL or Redis).

internal_connection_stringstring

Private connection URL including the password, for workloads running on RumptyCloud. Omitted when the internal host is not known yet.

ca_certificatestring

PEM certificate that clients can trust to verify the server. Omitted until it is available.

Errors

StatusMeaning
400The request was malformed or failed validation.
401The API key is missing, invalid, expired or revoked.
403You cannot access the workspace, your role does not allow this action, or the account is suspended.
404The resource does not exist or you cannot access it.

Errors use the standard error format.