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
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
Create a database
POST /db/new
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.The database user that owns the new database. Its engine (MySQL, PostgreSQL or Redis) is used.
Response
400 or 403 when the workspace has reached its database limit.
Change the password
POST /db/{db_id}/password
Response
Delete a database
DELETE /db/{db_id}
Deletes the database and all of its data. This cannot be undone.
Response
