v17

latestOpenAPI 3.0.1raw.githubusercontent.com2026-07-08165682.0 MB
Databases

Update database settings

Authorization

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 write_database

OAuth Scopes

ResourceScopes
Organizationwrite_databases
Databasewrite_database
patch/organizations/{organization}/databases/{database}

Path parameters

organizationstring required

Organization name slug from list_organizations. Example: acme.

databasestring required

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

Request body

new_namestring

The name to update the database to

automatic_migrationsboolean

Whether or not to copy migration data to new branches and in deploy requests. (Vitess only)

migration_frameworkstring

A migration framework to use on the database. (Vitess only)

migration_table_namestring

Name of table to use as migration table for the database. (Vitess only)

require_approval_for_deployboolean

Whether or not deploy requests must be approved by a database administrator other than the request creator

restrict_branch_regionboolean

Whether or not to limit branch creation to the same region as the one selected during database creation.

allow_data_branchingboolean

Whether or not data branching is allowed on the database. (Vitess only)

allow_foreign_key_constraintsboolean

Whether or not foreign key constraints are allowed on the database. (Vitess only)

insights_raw_queriesboolean

Whether or not full queries should be collected from the database

production_branch_web_consoleboolean

Whether or not the web console can be used on the production branch of the database

default_branchstring

The default branch of the database

Response

Returns the updated database

idstring required

The ID of the database

urlstring required

The URL to the database API endpoint

branches_urlstring required

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

branches_countinteger required

The total number of database branches

open_schema_recommendations_countinteger required

The total number of schema recommendations

development_branches_countinteger required

The total number of database development branches

production_branches_countinteger required

The total number of database production branches

issues_countinteger nullable

The total number of ongoing issues within a database

multiple_admins_required_for_deletionboolean required

If the database requires multiple admins for deletion

readyboolean required

If the database is ready to be used

at_backup_restore_branches_limitboolean required

If the database has reached its backup restored branch limit

at_development_branch_usage_limitboolean required

If the database has reached its development branch limit

html_urlstring required

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

namestring required

Name of the database

state'pending' | 'importing' | 'sleep_in_progress' | 'sleeping' | 'awakening' | 'import_ready' | 'ready' required

State of the database

shardedboolean required

If the database is sharded

default_branch_shard_countinteger required

Number of shards in the default branch

default_branch_read_only_regions_countinteger required

Number of read only regions in the default branch

default_branch_table_countinteger required

Number of tables in the default branch schema

default_branchstring required

The default branch for the database

require_approval_for_deployboolean required

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

resizingboolean required

True if a branch is currently resizing

resize_queuedboolean required

True if a branch has a queued resize request

config_changingboolean required

True if a config change is in progress

config_change_queuedboolean required

True if a config change is queued for maintenance window

allow_data_branchingboolean required

Whether seeding branches with data is enabled for all branches

foreign_keys_enabledboolean required

Whether foreign key constraints are enabled

automatic_migrationsboolean nullable

Whether to automatically manage Rails migrations during deploy requests.

restrict_branch_regionboolean required

Whether to restrict branch creation to one region

insights_raw_queriesboolean required

Whether raw SQL queries are collected

planstring required

The database plan

insights_enabledboolean required

True if query insights is enabled for the database

production_branch_web_consoleboolean required

Whether web console is enabled for production branches

migration_table_namestring nullable

Table name to use for copying schema migration data.

migration_frameworkstring nullable

Framework used for applying migrations.

created_atstring required

When the database was created

updated_atstring required

When the database was last updated

schema_last_updated_atstring nullable required

When the default branch schema was last changed.

kind'mysql' | 'postgresql' required

The kind of database