Skip to main content
GET
Get a database

Authorizations

Authorization
string
header
required

The access token received from the authorization server in the OAuth 2.0 flow.

Path Parameters

organization
string
required

Organization name slug from list_organizations. Example: acme.

database
string
required

Database name slug from list_databases. Example: app-db.

Response

Returns a database

id
string
required

The ID of the database

url
string
required

The URL to the database API endpoint

branches_url
string
required

The URL to retrieve this database's branches via the API

branches_count
integer
required

The total number of database branches

open_schema_recommendations_count
integer
required

The total number of schema recommendations

development_branches_count
integer
required

The total number of database development branches

production_branches_count
integer
required

The total number of database production branches

multiple_admins_required_for_deletion
boolean
required

If the database requires multiple admins for deletion

ready
boolean
required

If the database is ready to be used

at_backup_restore_branches_limit
boolean
required

If the database has reached its backup restored branch limit

at_development_branch_usage_limit
boolean
required

If the database has reached its development branch limit

region
object
required
html_url
string
required

The URL to see this database's branches in the web UI

name
string
required

Name of the database

state
enum<string>
required

State of the database

Available options:
pending,
importing,
sleep_in_progress,
sleeping,
awakening,
import_ready,
ready
sharded
boolean
required

If the database is sharded

default_branch_shard_count
integer
required

Number of shards in the default branch

default_branch_read_only_regions_count
integer
required

Number of read only regions in the default branch

default_branch_table_count
integer
required

Number of tables in the default branch schema

default_branch
string
required

The default branch for the database

require_approval_for_deploy
boolean
required

Whether an approval is required to deploy schema changes to this database

resizing
boolean
required

True if a branch is currently resizing

resize_queued
boolean
required

True if a branch has a queued resize request

config_changing
boolean
required

True if a config change is in progress

config_change_queued
boolean
required

True if a config change is queued for maintenance window

allow_data_branching
boolean
required

Whether seeding branches with data is enabled for all branches

foreign_keys_enabled
boolean
required

Whether foreign key constraints are enabled

restrict_branch_region
boolean
required

Whether to restrict branch creation to one region

insights_raw_queries
boolean
required

Whether raw SQL queries are collected

plan
string
required

The database plan

insights_enabled
boolean
required

True if query insights is enabled for the database

production_branch_web_console
boolean
required

Whether web console is enabled for production branches

created_at
string
required

When the database was created

updated_at
string
required

When the database was last updated

schema_last_updated_at
string | null
required

When the default branch schema was last changed.

kind
enum<string>
required

The kind of database

Available options:
mysql,
postgresql
issues_count
integer | null

The total number of ongoing issues within a database

data_import
object | null
automatic_migrations
boolean | null

Whether to automatically manage Rails migrations during deploy requests.

migration_table_name
string | null

Table name to use for copying schema migration data.

migration_framework
string | null

Framework used for applying migrations.