Skip to main content
GET
/
organizations
/
{organization}
/
databases
/
{database}
/
branches
/
{branch}
/
changes
/
{id}
Get a branch change request
curl --request GET \
  --url https://api.planetscale.com/v1/organizations/{organization}/databases/{database}/branches/{branch}/changes/{id} \
  --header 'Authorization: Bearer <token>'
{
  "id": "<string>",
  "restart": [
    123
  ],
  "state": "queued",
  "started_at": "<string>",
  "completed_at": "<string>",
  "created_at": "<string>",
  "updated_at": "<string>",
  "actor": {
    "id": "<string>",
    "display_name": "<string>",
    "avatar_url": "<string>"
  },
  "cluster_name": "<string>",
  "cluster_display_name": "<string>",
  "cluster_metal": true,
  "replicas": 123,
  "parameters": {},
  "previous_cluster_name": "<string>",
  "previous_cluster_display_name": "<string>",
  "previous_cluster_metal": true,
  "previous_replicas": 123,
  "previous_parameters": {},
  "minimum_storage_bytes": 123,
  "maximum_storage_bytes": 123,
  "storage_autoscaling": true,
  "storage_shrinking": true,
  "storage_type": "gp3",
  "storage_iops": 123,
  "storage_throughput_mibs": 123,
  "previous_minimum_storage_bytes": 123,
  "previous_maximum_storage_bytes": 123,
  "previous_storage_autoscaling": true,
  "previous_storage_shrinking": true,
  "previous_storage_type": "<string>",
  "previous_storage_iops": 123,
  "previous_storage_throughput_mibs": 123
}

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.

branch
string
required

Branch name from list_branches. Example: main.

id
string
required

The ID of the change request

Response

Returns a branch change request

id
string
required

The ID of the branch change request

restart
integer[]
required

The ports requiring a restart when changes are applied

state
enum<string>
required

The state of the branch change request

Available options:
queued,
pending,
resizing,
canceled,
completed
started_at
string
required

The time the branch change request started

completed_at
string
required

The time the branch change request completed

created_at
string
required

The time the branch change request was created

updated_at
string
required

The time the branch change request was last updated

actor
object
required
cluster_name
string
required

The SKU representing the branch cluster

cluster_display_name
string
required

The SKU representing the branch cluster for display

cluster_metal
boolean
required

Whether or not this is a metal database

replicas
integer
required

The total number of replicas

parameters
object
required

The branch parameters

previous_cluster_name
string
required

The previous SKU representing the branch cluster

previous_cluster_display_name
string
required

The previous SKU representing the branch cluster for display

previous_cluster_metal
boolean
required

Whether or not the previous SKU was a metal database

previous_replicas
integer
required

The previous total number of replicas

previous_parameters
object
required

The previous branch parameters

minimum_storage_bytes
integer
required

The minimum storage size in bytes

maximum_storage_bytes
integer
required

The maximum storage size in bytes

storage_autoscaling
boolean
required

Whether storage autoscaling is enabled

storage_shrinking
boolean
required

Whether storage shrinking is enabled when autoscaling is enabled

storage_type
enum<string>
required

The storage type (gp3 or io2)

Available options:
gp3,
io2,
pd_ssd
storage_iops
integer
required

The storage IOPS

storage_throughput_mibs
integer
required

The storage throughput in MiB/s

previous_minimum_storage_bytes
integer
required

The previous minimum storage size in bytes

previous_maximum_storage_bytes
integer
required

The previous maximum storage size in bytes

previous_storage_autoscaling
boolean
required

Whether storage autoscaling was previously enabled

previous_storage_shrinking
boolean
required

Whether storage shrinking was previously enabled

previous_storage_type
string
required

The previous storage type

previous_storage_iops
integer
required

The previous storage IOPS

previous_storage_throughput_mibs
integer
required

The previous storage throughput in MiB/s