PATCH
/
organizations
/
{organization}
/
databases
/
{database}
/
throttler
Update database throttler configurations
curl --request PATCH \
  --url https://api.planetscale.com/v1/organizations/{organization}/databases/{database}/throttler \
  --header 'Authorization: <api-key>' \
  --header 'Content-Type: application/json' \
  --data '{
  "ratio": 123,
  "configurations": [
    "<string>"
  ]
}'
{
  "keyspaces": [
    "<string>"
  ],
  "configurable": {
    "id": "<string>",
    "name": "<string>",
    "created_at": "<string>",
    "updated_at": "<string>",
    "deleted_at": "<string>"
  },
  "configurations": [
    {
      "keyspace_name": "<string>",
      "ratio": 123
    }
  ]
}

Authorizations

Authorization
string
header
required

Path Parameters

organization
string
required

The name of the organization that the throttled deploy requests belong to

database
string
required

The name of the database that the throttled deploy requests belong to

Body

application/json
ratio
number

A throttler ratio between 0 and 95 that will apply to all keyspaces in the database. 0 effectively disables throttler, while 95 drastically slows down deploy request migrations

configurations
string[]

If specifying throttler ratios per keyspace, an array of { "keyspace_name": "mykeyspace", "ratio": 10 }, one for each eligible keyspace

Response

Database throttler configurations

keyspaces
string[]
required

Keyspaces that are eligible for throttler configuration in the configurable resource (database or deploy request)

configurable
object
required
configurations
object[]
required