Database branches

Enable safe migrations for a branch

post/organizations/{organization}/databases/{database}/branches/{branch}/safe-migrations

Path parameters

organizationstring required

The name of the organization the branch belongs to

databasestring required

The name of the database the branch belongs to

branchstring required

The name of the branch

Response

Returns the branch with safe migrations enabled

idstring required

The ID of the branch

namestring required

The name of the branch

created_atstring required

When the branch was created

updated_atstring required

When the branch was last updated

deleted_atstring nullable required

When the branch was deleted

restore_checklist_completed_atstring nullable required

When a user last marked a backup restore checklist as completed

schema_last_updated_atstring nullable required

When the schema for the branch was last updated

kind'mysql' | 'postgresql' required

The kind of branch

mysql_addressstring required

The MySQL address for the branch

mysql_edge_addressstring required

The address of the MySQL provider for the branch

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

The current state of the branch

direct_vtgateboolean required

True if the branch allows passwords to connect directly to a vtgate, bypassing load balancers

vtgate_sizestring required

The size of the vtgate cluster for the branch

vtgate_namestring nullable required

The public SKU representing the VTGate size

vtgate_countinteger required

The number of vtgate instances in the branch

vtgate_autoscalingboolean required

Whether VTGate autoscaling is enabled

vtgate_max_countinteger nullable required

The maximum number of VTGate instances when autoscaling is enabled

vtgate_target_cpu_utilizationinteger nullable required

The target CPU utilization for VTGate autoscaling

cluster_namestring required

The SKU representing the branch's cluster size

cluster_iopsinteger nullable required

IOPS for the cluster

readyboolean required

Whether or not the branch is ready to serve queries

schema_readyboolean required

Whether or not the schema is ready for queries

metalboolean required

Whether or not this is a metal database

productionboolean required

Whether or not the branch is a production branch

safe_migrationsboolean required

Whether or not the branch has safe migrations enabled

deletion_protectedboolean required

Whether deletion protection is enabled for the branch

shardedboolean required

Whether or not the branch is sharded

shard_countinteger required

The number of shards in the branch

keyspace_countinteger required

The number of keyspaces in the branch

stale_schemaboolean required

Whether or not the branch has a stale schema

private_edge_connectivityboolean required

True if private connections are enabled

has_replicasboolean required

True if the branch has replica servers

has_read_only_replicasboolean required

True if the branch has read-only replica servers

html_urlstring required

Planetscale app URL for the branch

urlstring required

Planetscale API URL for the branch

parent_branchstring nullable required

The name of the parent branch from which the branch was created

vtgate_optionsobject required

VTGate configuration options

Changes

Changed in 6 of the 24 revisions of this API.910

    • removed the required property deletion_protection_managed from the response with the 200 status

      response-required-property-removed

    • added the required property deletion_protected to the response with the 200 status

      response-required-property-added

    • added the required property deletion_protection_managed to the response with the 200 status

      response-required-property-added

    • added the required property vtgate_autoscaling to the response with the 200 status

      response-required-property-added

    • added the required property vtgate_max_count to the response with the 200 status

      response-required-property-added

    • added the required property vtgate_name to the response with the 200 status

      response-required-property-added

    • added the required property vtgate_target_cpu_utilization to the response with the 200 status

      response-required-property-added

    This revision also has 1 change that name no endpoint, such as unreferenced schemas being removed. See the revision's changelog

    • added the required property keyspace_count to the response with the 200 status

      response-required-property-added

    • the response property actor became nullable for the status 200

      response-property-became-nullable

    • the response property cluster_iops became nullable for the status 200

      response-property-became-nullable

    • the response property deleted_at became nullable for the status 200

      response-property-became-nullable

    • the response property parent_branch became nullable for the status 200

      response-property-became-nullable

    • the response property restore_checklist_completed_at became nullable for the status 200

      response-property-became-nullable

    • the response property restored_from_branch became nullable for the status 200

      response-property-became-nullable

    • the response property restored_from_branch/deleted_at became nullable for the status 200

      response-property-became-nullable

    • the response property schema_last_updated_at became nullable for the status 200

      response-property-became-nullable

    • added the required property region/mysql_supported to the response with the 200 status

      response-required-property-added

    • added the required property region/postgresql_supported to the response with the 200 status

      response-required-property-added

    • added the required property vtgate_options to the response with the 200 status

      response-required-property-added