A service token or OAuth token must have at least one of the following access or scopes in order to use this API endpoint:
Service Token Accesses
create_databases
OAuth Scopes
| Resource | Scopes |
|---|---|
| Organization | create_databases |
The name of the organization the database belongs to
Name of the database
The database cluster size name (e.g., 'PS_10', 'PS_80'). Use the 'List available cluster sizes' endpoint to get available options for your organization. /v1/organizations/:organization/cluster-size-skus
The region the database will be deployed in. If left blank, defaults to the organization's default region.
The number of replicas for the database. 0 for non-HA, 2+ for HA.
The kind of database to create.
mysql, postgresql For PostgreSQL databases, the PostgreSQL major version to use for the database. Defaults to the latest available major version.
Returns the created database
The ID of the database
The URL to the database API endpoint
The URL to retrieve this database's branches via the API
The total number of database branches
The total number of schema recommendations
The total number of database development branches
The total number of database production branches
The total number of ongoing issues within a database
If the database requires multiple admins for deletion
If the database is ready to be used
If the database has reached its backup restored branch limit
If the database has reached its development branch limit
The URL to see this database's branches in the web UI
Name of the database
State of the database
pending, importing, sleep_in_progress, sleeping, awakening, import_ready, ready If the database is sharded
Number of shards in the default branch
Number of read only regions in the default branch
Number of tables in the default branch schema
The default branch for the database
Whether an approval is required to deploy schema changes to this database
True if a branch is currently resizing
True if a branch has a queued resize request
Whether seeding branches with data is enabled for all branches
Whether foreign key constraints are enabled
Whether to automatically manage Rails migrations during deploy requests
Whether to restrict branch creation to one region
Whether raw SQL queries are collected
The database plan
True if query insights is enabled for the database
Whether web console is enabled for production branches
Table name to use for copying schema migration data
Framework used for applying migrations
When the database was created
When the database was last updated
When the default branch schema was last changed.
The kind of database
mysql, postgresql