Skip to main content
A database belongs to a database user (MySQL, PostgreSQL or Redis), and the user decides its engine. Create database users in the dashboard; the API creates databases for existing users. db_id is the database’s UUID (db_uid in responses).

List databases

GET /db/list
Response
Passwords are never part of the list. Read them with Get credentials.

List database users

GET /db/accounts
Response

Get credentials

GET /db/{db_id}/credentials Returns the connection details, including the password. Use a key with only this scope, limited to the database it needs.
Response
Never print or log the password. Connections from outside your Servbase apps must use TLS.

Create a database

POST /db/new
string
required
The database name. Servbase adds your workspace’s prefix and, if the name is taken, a number (for example u7f3_shop_staging_2). Use the db_name in the response.
string
required
The database user that owns the new database. Its engine (MySQL, PostgreSQL or Redis) is used.
Response
Creating a database fails with 400 or 403 when the workspace has reached its database limit.

Change the password

POST /db/{db_id}/password
string
required
8 to 256 characters, without control characters.
Response
Apps connected to the database are not updated automatically: change their variables and restart them.

Delete a database

DELETE /db/{db_id} Deletes the database and all of its data. This cannot be undone.
Response