Skip to main content
PATCH
/
organizations
/
{organization}
/
databases
/
{database}
/
branches
/
{branch}
/
bouncers
/
{name}
/
resizes
Upsert a bouncer resize request
curl --request PATCH \
  --url https://api.planetscale.com/v1/organizations/{organization}/databases/{database}/branches/{branch}/bouncers/{name}/resizes \
  --header 'Authorization: <api-key>' \
  --header 'Content-Type: application/json' \
  --data '{
  "bouncer_size": "<string>",
  "replicas_per_cell": 123,
  "parameters": {}
}'
{
  "id": "<string>",
  "state": "pending",
  "replicas_per_cell": 123,
  "parameters": {},
  "previous_replicas_per_cell": 123,
  "previous_parameters": {},
  "started_at": "<string>",
  "completed_at": "<string>",
  "created_at": "<string>",
  "updated_at": "<string>",
  "actor": {
    "id": "<string>",
    "display_name": "<string>",
    "avatar_url": "<string>"
  },
  "bouncer": {
    "id": "<string>",
    "name": "<string>",
    "created_at": "<string>",
    "updated_at": "<string>",
    "deleted_at": "<string>"
  },
  "sku": {
    "name": "<string>",
    "display_name": "<string>",
    "cpu": "<string>",
    "ram": 123,
    "sort_order": 123
  },
  "previous_sku": {
    "name": "<string>",
    "display_name": "<string>",
    "cpu": "<string>",
    "ram": 123,
    "sort_order": 123
  }
}

Authorizations

Authorization
string
header
required

Path Parameters

organization
string
required

The name of the organization that owns this resource

database
string
required

The name of the database that owns this resource

branch
string
required

The name of the branch that owns this resource

name
string
required

The name of the bouncer

Body

application/json
bouncer_size
string

The bouncer size SKU name (e.g., 'PGB_5', 'PGB_10', 'PGB_20', 'PGB_40', 'PGB_80', 'PGB_160'). Defaults to 'PGB_5'.

replicas_per_cell
number

The number of PgBouncers per availability zone. Defaults to 1.

parameters
object

Bouncer configuration parameters nested by namespace (e.g., {"pgbouncer": {"default_pool_size": "100"}}). Use the 'List cluster parameters' endpoint to retrieve available parameters. Only parameters with namespace 'pgbouncer' can be updated.

Response

Returns bouncer resize request

id
string
required

The ID of the bouncer resize

state
enum<string>
required

The state of the bouncer resize

Available options:
pending,
resizing,
canceled,
completed
replicas_per_cell
number
required

The number of replicas per cell for the bouncer after the resize

parameters
object
required

The bouncer parameters

previous_replicas_per_cell
number
required

The number of replicas per cell for the bouncer before the resize

previous_parameters
object
required

The previous bouncer parameters

started_at
string
required

The time the bouncer resize started

completed_at
string
required

The time the bouncer resize completed

created_at
string
required

The time the bouncer resize was created

updated_at
string
required

The time the bouncer resize was last updated

actor
object
required
bouncer
object
required
sku
object
required
previous_sku
object
required