---
canonical_url: "https://docs.composio.dev/toolkits/planetscale"
markdown_url: "https://docs.composio.dev/toolkits/planetscale.md"
product: "platform"
version: null
last_updated: null
---

# PlanetScale

Manage PlanetScale organizations, databases, branches, deploy requests, backups, workflows, insights, and infrastructure through delegated OAuth access.

- **Category:** databases
- **Auth:** OAUTH2
- **Composio-managed OAuth available?** No
- **Tools:** 245
- **Triggers:** 0
- **Slug:** `PLANETSCALE`
- **Version:** 00000000_00

## Tools

### Add a member to a team

**Slug:** `PLANETSCALE_ADD_ORGANIZATION_TEAM_MEMBER`

Add a member to a team.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `team` | string | Yes | The slug of the team |
| `user_id` | string | Yes | The ID of the organization member to add to the team |
| `organization` | string | Yes | The name of the organization |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Assign shards to a Neki shard configuration profile

**Slug:** `PLANETSCALE_ASSIGN_SHARD_CONFIGURATION_PROFILE_SHARDS`

Assign shards to a Neki shard configuration profile. Sharded Neki PostgreSQL databases only; non-sharded branches may return 404.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `branch` | string | Yes | Branch name from `list_branches`. Example: `main`. |
| `database` | string | Yes | Database name slug from `list_databases`. Example: `app-db`. |
| `shard_ids` | array | Yes | The IDs of the shards to assign |
| `organization` | string | Yes | Organization name slug from `list_organizations`. Example: `acme`. |
| `configuration_profile` | string | Yes | Name from `list_shard_configuration_profiles`. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Add shards to a Neki shard configuration profile

**Slug:** `PLANETSCALE_BULK_CREATE_SHARD_CONFIGURATION_PROFILE_SHARDS`

Add shards to a Neki shard configuration profile. Sharded Neki PostgreSQL databases only; non-sharded branches may return 404.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `count` | integer | Yes | The number of shards to add |
| `branch` | string | Yes | Branch name from `list_branches`. Example: `main`. |
| `database` | string | Yes | Database name slug from `list_databases`. Example: `app-db`. |
| `organization` | string | Yes | Organization name slug from `list_organizations`. Example: `acme`. |
| `configuration_profile` | string | Yes | Name from `list_shard_configuration_profiles`. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Cancel a change request for a Neki admin

**Slug:** `PLANETSCALE_CANCEL_ADMIN_CHANGE_REQUEST`

Cancel a change request for a Neki admin. Sharded Neki PostgreSQL databases only; non-sharded branches may return 404. This is destructive: confirm the target before calling.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `id` | string | Yes | The ID of the change request |
| `branch` | string | Yes | Branch name from `list_branches`. Example: `main`. |
| `database` | string | Yes | Database name slug from `list_databases`. Example: `app-db`. |
| `organization` | string | Yes | Organization name slug from `list_organizations`. Example: `acme`. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Cancel a resize request

**Slug:** `PLANETSCALE_CANCEL_BOUNCER_RESIZE_REQUEST`

Cancel a resize request. PostgreSQL databases only. This is destructive: confirm the target before calling.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `branch` | string | Yes | Branch name from `list_branches`. Example: `main`. |
| `bouncer` | string | Yes | The name of the bouncer |
| `database` | string | Yes | Database name slug from `list_databases`. Example: `app-db`. |
| `organization` | string | Yes | Organization name slug from `list_organizations`. Example: `acme`. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Cancel a change request

**Slug:** `PLANETSCALE_CANCEL_BRANCH_CHANGE_REQUEST`

Cancel a branch resize change request. Vitess/MySQL databases only. This is destructive: confirm the target before calling.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `branch` | string | Yes | Branch name from `list_branches`. Example: `main`. |
| `database` | string | Yes | Database name slug from `list_databases`. Example: `app-db`. |
| `organization` | string | Yes | Organization name slug from `list_organizations`. Example: `acme`. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Cancel a queued deploy request

**Slug:** `PLANETSCALE_CANCEL_DEPLOY_REQUEST`

Cancel a queued deploy request. Vitess/MySQL databases only; PlanetScale returns 405 for PostgreSQL resources. This changes operational state and may not be safely reversible.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `number` | integer | Yes | The number of the deploy request |
| `database` | string | Yes | The name of the deploy request's database |
| `organization` | string | Yes | The name of the deploy request's organization |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Cancel a change request for a Neki branch

**Slug:** `PLANETSCALE_CANCEL_NEKI_CHANGE_REQUEST`

Cancel a change request for a Neki branch. Sharded Neki PostgreSQL databases only; non-sharded branches may return 404. This is destructive: confirm the target before calling.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `id` | string | Yes | The ID of the change request |
| `branch` | string | Yes | Branch name from `list_branches`. Example: `main`. |
| `database` | string | Yes | Database name slug from `list_databases`. Example: `app-db`. |
| `organization` | string | Yes | Organization name slug from `list_organizations`. Example: `acme`. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Cancel a change request for a Neki router

**Slug:** `PLANETSCALE_CANCEL_ROUTER_CHANGE_REQUEST`

Cancel a change request for a Neki router. Sharded Neki PostgreSQL databases only; non-sharded branches may return 404. This is destructive: confirm the target before calling.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `id` | string | Yes | The ID of the change request |
| `branch` | string | Yes | Branch name from `list_branches`. Example: `main`. |
| `router` | string | Yes | Name from `list_routers`. |
| `database` | string | Yes | Database name slug from `list_databases`. Example: `app-db`. |
| `organization` | string | Yes | Organization name slug from `list_organizations`. Example: `acme`. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Cancel a change request for a Neki shard configuration profile

**Slug:** `PLANETSCALE_CANCEL_SHARD_CONFIGURATION_PROFILE_CHANGE_REQUEST`

Cancel a change request for a Neki shard configuration profile. Sharded Neki PostgreSQL databases only; non-sharded branches may return 404. This is destructive: confirm the target before calling.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `id` | string | Yes | The ID of the change request |
| `branch` | string | Yes | Branch name from `list_branches`. Example: `main`. |
| `database` | string | Yes | Database name slug from `list_databases`. Example: `app-db`. |
| `organization` | string | Yes | Organization name slug from `list_organizations`. Example: `acme`. |
| `configuration_profile` | string | Yes | Name from `list_shard_configuration_profiles`. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Cancel a change request for a Neki sidecar

**Slug:** `PLANETSCALE_CANCEL_SIDECAR_CHANGE_REQUEST`

Cancel a change request for a Neki sidecar. Sharded Neki PostgreSQL databases only; non-sharded branches may return 404. This is destructive: confirm the target before calling.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `id` | string | Yes | The ID of the change request |
| `branch` | string | Yes | Branch name from `list_branches`. Example: `main`. |
| `sidecar` | string | Yes | ID from `list_sidecars`, or the configuration profile name. |
| `database` | string | Yes | Database name slug from `list_databases`. Example: `app-db`. |
| `organization` | string | Yes | Organization name slug from `list_organizations`. Example: `acme`. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Check deploy request storage

**Slug:** `PLANETSCALE_CHECK_DEPLOY_REQUEST_STORAGE`

Checks whether the deploy request's target branch cluster has enough storage to safely deploy the schema changes. Vitess/MySQL databases only; PlanetScale returns 405 for PostgreSQL resources.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `number` | integer | Yes | The number of the deploy request |
| `database` | string | Yes | The name of the deploy request's database |
| `organization` | string | Yes | The name of the deploy request's organization |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Close a deploy request

**Slug:** `PLANETSCALE_CLOSE_DEPLOY_REQUEST`

Close a deploy request. Vitess/MySQL databases only; PlanetScale returns 405 for PostgreSQL resources.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `number` | integer | Yes | The number of the deploy request |
| `database` | string | Yes | The name of the deploy request's database |
| `organization` | string | Yes | The name of the deploy request's organization |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Complete an errored deploy

**Slug:** `PLANETSCALE_COMPLETE_ERRORED_DEPLOY`

Complete an errored deploy. Vitess/MySQL databases only; PlanetScale returns 405 for PostgreSQL resources. This changes operational state and may not be safely reversible.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `number` | integer | Yes | The number of the deploy request |
| `database` | string | Yes | The name of the deploy request's database |
| `organization` | string | Yes | The name of the deploy request's organization |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Complete a gated deploy request

**Slug:** `PLANETSCALE_COMPLETE_GATED_DEPLOY_REQUEST`

Complete a gated deploy request. Vitess/MySQL databases only; PlanetScale returns 405 for PostgreSQL resources. This changes operational state and may not be safely reversible.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `number` | integer | Yes | The number of the deploy request |
| `database` | string | Yes | The name of the deploy request's database |
| `organization` | string | Yes | The name of the deploy request's organization |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Complete a revert

**Slug:** `PLANETSCALE_COMPLETE_REVERT`

Complete a revert. Vitess/MySQL databases only; PlanetScale returns 405 for PostgreSQL resources. This changes operational state and may not be safely reversible.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `number` | integer | Yes | The number of the deploy request |
| `database` | string | Yes | The name of the deploy request's database |
| `organization` | string | Yes | The name of the deploy request's organization |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Open the SSO configuration portal

**Slug:** `PLANETSCALE_CONFIGURE_ORGANIZATION_SSO`

Return a URL for configuring the identity provider. Requires at least one verified domain.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `organization` | string | Yes | Organization name slug from `list_organizations`. Example: `acme`. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Create a backup

**Slug:** `PLANETSCALE_CREATE_BACKUP`

Create a backup.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `name` | string | No | Name for the backup |
| `branch` | string | Yes | The name of the branch |
| `database` | string | Yes | The name of the database the branch belongs to |
| `emergency` | boolean | No | Whether the backup is an immediate backup that may affect database performance. Emergency backups are only supported for PostgreSQL databases. |
| `organization` | string | Yes | The name of the organization the branch belongs to |
| `retention_unit` | string ("hour" | "day" | "week" | "month" | "year") | No | Unit for the retention period of the backup |
| `retention_value` | integer | No | Value between `1` and `1000` for the retention period of the backup (i.e retention_value `6` and retention_unit `hour` means 6 hours) |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Create a backup policy

**Slug:** `PLANETSCALE_CREATE_BACKUP_POLICY`

Create a backup policy.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `name` | string | No | The name of the backup policy |
| `target` | string ("production" | "development") | No | Whether the policy is for production or development branches |
| `database` | string | Yes | Database name slug from `list_databases`. Example: `app-db`. |
| `organization` | string | Yes | Organization name slug from `list_organizations`. Example: `acme`. |
| `schedule_day` | integer | No | Day of the week that the backup is scheduled. 0 is Sunday, 6 is Saturday |
| `schedule_time` | string | Yes | Required time of day for the backup schedule in HH:MM format. |
| `schedule_week` | integer | No | Week of the month that the backup is scheduled. 0 is the first week, 3 is the fourth week |
| `frequency_unit` | string ("hour" | "day" | "week" | "month") | No | The unit for the frequency of the backup policy |
| `retention_unit` | string ("hour" | "day" | "week" | "month" | "year") | No | The unit for the retention period of the backup policy |
| `frequency_value` | integer | No | A number value for the frequency of the backup policy |
| `retention_value` | integer | No | A number value for the retention period of the backup policy |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Create a bouncer

**Slug:** `PLANETSCALE_CREATE_BOUNCER`

Create a bouncer. PostgreSQL databases only.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `name` | string | No | The bouncer name |
| `branch` | string | Yes | Branch name from `list_branches`. Example: `main`. |
| `target` | string ("primary" | "replica" | "replica_az_affinity") | No | Server type to target: primary, replica, or replica_az_affinity. Primary is the usual choice. |
| `database` | string | Yes | Database name slug from `list_databases`. Example: `app-db`. |
| `bouncer_size` | string | No | The size SKU for the bouncer |
| `organization` | string | Yes | Organization name slug from `list_organizations`. Example: `acme`. |
| `replicas_per_cell` | integer | No | The number of replica servers per cell |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Create a branch

**Slug:** `PLANETSCALE_CREATE_BRANCH`

Create a branch.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `kind` | string ("mysql" | "postgresql" | "neki") | No | The kind of branch to create. Required when create_database_if_missing is set. |
| `name` | string | Yes | The name of the branch to create |
| `region` | string | No | The region to create the branch in. If not provided, the branch will be created in the default region for its database. |
| `storage` | object | No | PlanetScale body parameter `storage`. |
| `database` | string | Yes | The name of the database the branch belongs to |
| `replicas` | integer | No | For PostgreSQL backup restores and point-in-time recovery, the number of additional replicas from 0 to 8, subject to the target cluster size. 0 creates a single-node branch. If omitted, the target cluster size's minimum is used. |
| `backup_id` | string | No | If provided, restores the backup's schema and data to the new branch. Must have `restore_production_branch_backup(s)` or `restore_backup(s)` access to do this. |
| `seed_data` | string | No | If provided, restores the last successful backup's schema and data to the new branch. Must have `restore_production_branch_backup(s)` or `restore_backup(s)` access to do this, in addition to Data Branching™ being enabled for the branch. |
| `cluster_size` | string | No | The database cluster size. Required if a backup_id is provided (unless keyspace_cluster_sizes covers every keyspace), optional otherwise. Options: PS_10, PS_20, PS_40, ..., PS_2800 |
| `organization` | string | Yes | The name of the organization the branch belongs to |
| `router_sizes` | array | No | For Neki backup restores, per-router size and replica count. Each entry is { "name": "default", "router_size": "NKR_20", "replicas_per_cell": 1 }. Omitted routers inherit the source size and replica count. |
| `major_version` | string | No | For PostgreSQL and Neki databases, the PostgreSQL major version to use for the branch. Defaults to the major version of the parent branch if it exists or the database's default branch major version. Ignored for branches restored from backups. |
| `parent_branch` | string | No | The name of the parent branch. Defaults to the database's default branch if not provided. |
| `restore_point` | string | No | Restore from a point-in-time recovery timestamp (e.g. 2023-01-01T00:00:00Z). Available only for PostgreSQL databases. |
| `deletion_protected` | boolean | No | Whether deletion protection is enabled for the branch |
| `keyspace_cluster_sizes` | array | No | For MySQL backup restores, per-keyspace cluster sizes. Each entry is { "keyspace_name": "main", "cluster_size": "PS_40" }. When provided, each restored keyspace must have a size here or via cluster_size. |
| `create_database_if_missing` | boolean | No | Create a new database for the branch if the database does not exist. Defaults to false. |
| `configuration_profile_sizes` | array | No | For Neki backup restores, per-configuration-profile cluster size and replica count. Each entry is { "name": "default", "cluster_size": "PS_40", "replicas": 2 }. Omitted profiles inherit the source size and replica count. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Create a log signature

**Slug:** `PLANETSCALE_CREATE_BRANCH_LOG_SIGNATURE`

Creates a signed token that can be used to access branch logs.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `branch` | string | Yes | Branch name from `list_branches`. Example: `main`. |
| `database` | string | Yes | Database name slug from `list_databases`. Example: `app-db`. |
| `organization` | string | Yes | Organization name slug from `list_organizations`. Example: `acme`. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Create a database

**Slug:** `PLANETSCALE_CREATE_DATABASE`

Create a database.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `kind` | string ("mysql" | "postgresql" | "neki") | No | The kind of database to create. |
| `name` | string | Yes | Name of the database |
| `region` | string | No | The region the database will be deployed in. If left blank, defaults to the organization's default region. |
| `storage` | object | No | PlanetScale body parameter `storage`. |
| `replicas` | integer | No | The number of replicas for the database. 0 for non-HA, 2+ for HA. |
| `cluster_size` | string | Yes | The database cluster size name (e.g., 'PS_10', 'PS_80'). Use the 'List available cluster sizes' endpoint to get available options for your organization. /v1/organizations/:organization/cluster-size-skus |
| `organization` | string | Yes | Organization name slug from `list_organizations`. Example: `acme`. |
| `major_version` | string | No | For PostgreSQL and Neki databases, the PostgreSQL major version to use for the database. Defaults to the latest available major version. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Create an IP restriction entry

**Slug:** `PLANETSCALE_CREATE_DATABASE_POSTGRES_CIDR`

Create an IP restriction entry. PostgreSQL databases only.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `role` | string | No | The PostgreSQL role to restrict access to. Leave empty or omit to allow access for all roles. |
| `cidrs` | array | Yes | List of IPv4 CIDR ranges (e.g., ['192.168.1.0/24', '192.168.1.1/32']). Must contain at least one valid IPv4 address or range. |
| `schema` | string | No | The PostgreSQL schema to restrict access to. Leave empty or omit to allow access to all schemas. |
| `database` | string | Yes | The name of the database |
| `description` | string | No | An optional description for the IP restriction rule. |
| `organization` | string | Yes | The name of the organization the database belongs to |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Create a deploy request

**Slug:** `PLANETSCALE_CREATE_DEPLOY_REQUEST`

Create a deploy request. Vitess/MySQL databases only; PlanetScale returns 405 for PostgreSQL resources.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `notes` | string | No | Notes about the deploy request |
| `branch` | string | Yes | The name of the branch the deploy request is created from |
| `database` | string | Yes | The name of the deploy request's database |
| `into_branch` | string | Yes | The name of the branch the deploy request will be merged into |
| `auto_cutover` | boolean | No | Whether or not to enable auto_cutover for the deploy request. When enabled, will auto cutover to the new schema as soon as it is ready. |
| `organization` | string | Yes | The name of the deploy request's organization |
| `auto_delete_branch` | boolean | No | Whether or not to enable auto_delete_branch for the deploy request. When enabled, will delete the branch once the DR successfully completes. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Create an Insights agent run

**Slug:** `PLANETSCALE_CREATE_INSIGHTS_AGENT_RUN`

Create an Insights agent run.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `type` | string ("review_slow_queries" | "implement_schema_recommendation") | Yes | The work the Insights agent should perform |
| `branch` | string | Yes | Branch name from `list_branches`. Example: `main`. |
| `database` | string | Yes | Database name slug from `list_databases`. Example: `app-db`. |
| `organization` | string | Yes | Organization name slug from `list_organizations`. Example: `acme`. |
| `schema_numbers` | array | No | The schema recommendation numbers to implement |
| `query_patterns_attributes` | array | No | The slow query patterns to review |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Start SSO domain verification

**Slug:** `PLANETSCALE_CREATE_ORGANIZATION_SSO_DOMAIN`

Enable SSO if needed and return a URL for verifying an email domain.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `organization` | string | Yes | Organization name slug from `list_organizations`. Example: `acme`. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Create an organization team

**Slug:** `PLANETSCALE_CREATE_ORGANIZATION_TEAM`

Create an organization team.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `name` | string | Yes | The name of the team |
| `description` | string | No | A description of the team's purpose |
| `organization` | string | Yes | The name of the organization |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Create a password

**Slug:** `PLANETSCALE_CREATE_PASSWORD`

Create a password. Vitess/MySQL databases only; PlanetScale returns 405 for PostgreSQL resources.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `ttl` | integer | No | Time to live (in seconds) for the password. The password will be invalid when TTL has passed |
| `name` | string | No | Optional name of the password |
| `role` | string ("reader" | "writer" | "admin" | "readwriter") | No | The database role of the password (i.e. admin) |
| `cidrs` | array | No | List of IP addresses or CIDR ranges that can use this password |
| `branch` | string | Yes | The name of the branch the password belongs to |
| `replica` | boolean | No | Whether the password is for a read replica |
| `database` | string | Yes | The name of the database the password belongs to |
| `organization` | string | Yes | The name of the organization the password belongs to |
| `direct_vtgate` | boolean | No | Whether the password connects directly to a VTGate |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Create a billing payment method setup

**Slug:** `PLANETSCALE_CREATE_PAYMENT_METHOD_SETUP`

Create a hosted checkout session for adding or replacing an organization's payment method.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `organization` | string | Yes | Organization name slug from `list_organizations`. Example: `acme`. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Create a new query patterns report

**Slug:** `PLANETSCALE_CREATE_QUERY_PATTERNS_REPORT`

Create a new query patterns report.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `branch` | string | Yes | The name of the branch |
| `database` | string | Yes | The name of the database the branch belongs to |
| `organization` | string | Yes | The name of the organization the branch belongs to |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Create a read-only replica

**Slug:** `PLANETSCALE_CREATE_READ_ONLY_REPLICA`

Create a read-only replica.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `name` | string | Yes | The read-only replica name |
| `branch` | string | Yes | Branch name from `list_branches`. Example: `main`. |
| `region` | string | Yes | The region slug for the read-only replica |
| `storage` | object | No | PlanetScale body parameter `storage`. |
| `database` | string | Yes | Database name slug from `list_databases`. Example: `app-db`. |
| `replicas` | integer | No | The number of instances serving reads. Defaults to 1. |
| `cluster_size` | string | No | The cluster size SKU name. Defaults to the primary cluster size. |
| `organization` | string | Yes | Organization name slug from `list_organizations`. Example: `acme`. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Create role credentials

**Slug:** `PLANETSCALE_CREATE_ROLE`

Create role credentials. PostgreSQL databases only.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `ttl` | integer | No | Time to live in seconds |
| `name` | string | No | The name of the role |
| `branch` | string | Yes | Branch name from `list_branches`. Example: `main`. |
| `database` | string | Yes | Database name slug from `list_databases`. Example: `app-db`. |
| `organization` | string | Yes | Organization name slug from `list_organizations`. Example: `acme`. |
| `inherited_roles` | array | No | Roles to inherit from |
| `with_replication` | boolean | No | Whether the role should have the REPLICATION attribute |
| `require_where_on_delete` | string | No | Require WHERE clause on DELETE statements |
| `require_where_on_update` | string | No | Require WHERE clause on UPDATE statements |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Create a router for a Neki branch

**Slug:** `PLANETSCALE_CREATE_ROUTER`

Create a router for a Neki branch. Sharded Neki PostgreSQL databases only; non-sharded branches may return 404.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `name` | string | Yes | The name of the router group. Letters, digits, dashes, and underscores; 1-64 characters; cannot start or end with a dash or underscore. `new`, `primary`, and `replica` are reserved. Clients connect through the group by appending it to the username, e.g. `user&#124;my-router`. |
| `branch` | string | Yes | Branch name from `list_branches`. Example: `main`. |
| `database` | string | Yes | Database name slug from `list_databases`. Example: `app-db`. |
| `router_size` | string | No | The router size SKU, e.g. `NKR_1`. Defaults to the service's default size. |
| `organization` | string | Yes | Organization name slug from `list_organizations`. Example: `acme`. |
| `replicas_per_cell` | integer | No | The number of router instances per availability zone. Defaults to the service's default count. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Add shards to a Neki branch

**Slug:** `PLANETSCALE_CREATE_SHARD`

Add shards to a Neki branch. Sharded Neki PostgreSQL databases only; non-sharded branches may return 404.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `branch` | string | Yes | Branch name from `list_branches`. Example: `main`. |
| `database` | string | Yes | Database name slug from `list_databases`. Example: `app-db`. |
| `organization` | string | Yes | Organization name slug from `list_organizations`. Example: `acme`. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Create a shard configuration profile for a Neki branch

**Slug:** `PLANETSCALE_CREATE_SHARD_CONFIGURATION_PROFILE`

Create a shard configuration profile for a Neki branch. Sharded Neki PostgreSQL databases only; non-sharded branches may return 404.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `name` | string | Yes | The name of the shard configuration profile |
| `branch` | string | Yes | Branch name from `list_branches`. Example: `main`. |
| `storage` | object | No | PlanetScale body parameter `storage`. |
| `database` | string | Yes | Database name slug from `list_databases`. Example: `app-db`. |
| `replicas` | integer | No | The number of replicas for the shard configuration profile |
| `cluster_size` | string | No | The cluster size for the shard configuration profile |
| `organization` | string | Yes | Organization name slug from `list_organizations`. Example: `acme`. |
| `postgres_major_version` | string | No | The PostgreSQL major version for the shard configuration profile |
| `postgres_minor_version` | string | No | The PostgreSQL minor version for the shard configuration profile. Requires postgres_major_version when specified. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Add a shard to a Neki shard configuration profile

**Slug:** `PLANETSCALE_CREATE_SHARD_CONFIGURATION_PROFILE_SHARD`

Add a shard to a Neki shard configuration profile. Sharded Neki PostgreSQL databases only; non-sharded branches may return 404.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `branch` | string | Yes | Branch name from `list_branches`. Example: `main`. |
| `database` | string | Yes | Database name slug from `list_databases`. Example: `app-db`. |
| `display_name` | string | No | The display name of the shard |
| `organization` | string | Yes | Organization name slug from `list_organizations`. Example: `acme`. |
| `configuration_profile` | string | Yes | Name from `list_shard_configuration_profiles`. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Create a switchover

**Slug:** `PLANETSCALE_CREATE_SWITCHOVER`

Moves the primary of a Postgres branch. On a branch with replicas the primary steps down and a replica is promoted in its place. A branch running a single instance has nothing to promote, so that instance is restarted where it stands and the branch is unreachable while it comes back. Read `method` on the response to see which one the branch got. A branch accepts one switchover at a time. A switchover that ends in the `failed` state has an unconfirmed outcome: the primary may still have moved, and nothing is rolled back. PostgreSQL databases only. This changes operational state and may not be safely reversible.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `branch` | string | Yes | Branch name from `list_branches`. Example: `main`. |
| `database` | string | Yes | Database name slug from `list_databases`. Example: `app-db`. |
| `candidate` | string | No | The exact `name` of the replica returned by the branch's Postgres infrastructure endpoint to promote. Omit to let the operator select an eligible replica. Only applies to branches with replicas. |
| `organization` | string | Yes | Organization name slug from `list_organizations`. Example: `acme`. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Create a traffic budget

**Slug:** `PLANETSCALE_CREATE_TRAFFIC_BUDGET`

Create a traffic budget. PostgreSQL databases only.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `mode` | string ("enforce" | "warn" | "off") | No | The mode of the traffic budget |
| `name` | string | No | Name of the traffic budget |
| `rate` | integer | No | The rate at which capacity refills, as a percentage of server resources (0-100). Unlimited when not set. |
| `burst` | integer | No | The maximum capacity a single query can consume, measured as a percentage of seconds of full server usage (0-6000). Unlimited when not set. |
| `rules` | array | No | Array of traffic rules to apply to the budget |
| `branch` | string | Yes | Branch name from `list_branches`. Example: `main`. |
| `capacity` | integer | No | The maximum capacity that can be banked, measured as a percentage of seconds of full server usage (0-6000). Unlimited when not set. |
| `database` | string | Yes | Database name slug from `list_databases`. Example: `app-db`. |
| `concurrency` | integer | No | The percentage of available worker processes this policy can use (0-100). Unlimited when not set. |
| `organization` | string | Yes | Organization name slug from `list_organizations`. Example: `acme`. |
| `warning_threshold` | integer | No | A percentage of capacity, burst, or concurrency thresholds to emit warnings for enforced budgets (0-100). |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Create a traffic rule

**Slug:** `PLANETSCALE_CREATE_TRAFFIC_RULE`

Create a traffic rule. PostgreSQL databases only.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `kind` | string ("match" | "each") | No | Kind of rule |
| `tags` | array | No | Optional array of tags for this rule. Each rules take exactly one tag. |
| `branch` | string | Yes | Branch name from `list_branches`. Example: `main`. |
| `database` | string | Yes | Database name slug from `list_databases`. Example: `app-db`. |
| `keyspace` | string | No | The keyspace to apply a query pattern rule to |
| `budget_id` | string | Yes | The ID of the traffic budget |
| `fingerprint` | string | No | Query pattern fingerprint to apply rule to |
| `organization` | string | Yes | Organization name slug from `list_organizations`. Example: `acme`. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Create a webhook

**Slug:** `PLANETSCALE_CREATE_WEBHOOK`

Create a webhook.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `url` | string | Yes | The URL the webhook will send events to |
| `events` | array | No | The events this webhook should subscribe to |
| `enabled` | boolean | No | Whether the webhook should be enabled |
| `database` | string | Yes | The name of the database |
| `organization` | string | Yes | The name of the organization |
| `authorization_header` | string | No | The value to send in the Authorization header |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Delete a backup

**Slug:** `PLANETSCALE_DELETE_BACKUP`

Delete a backup. This is destructive: confirm the target before calling.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `id` | string | Yes | The ID of the backup |
| `branch` | string | Yes | The name of the branch |
| `database` | string | Yes | The name of the database the branch belongs to |
| `organization` | string | Yes | The name of the organization the branch belongs to |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Delete a backup policy

**Slug:** `PLANETSCALE_DELETE_BACKUP_POLICY`

Delete a backup policy. This is destructive: confirm the target before calling.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `id` | string | Yes | The ID of the backup policy |
| `database` | string | Yes | Database name slug from `list_databases`. Example: `app-db`. |
| `organization` | string | Yes | Organization name slug from `list_organizations`. Example: `acme`. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Delete a bouncer

**Slug:** `PLANETSCALE_DELETE_BOUNCER`

Delete a bouncer. PostgreSQL databases only. This is destructive: confirm the target before calling.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `branch` | string | Yes | Branch name from `list_branches`. Example: `main`. |
| `bouncer` | string | Yes | The name of the bouncer |
| `database` | string | Yes | Database name slug from `list_databases`. Example: `app-db`. |
| `organization` | string | Yes | Organization name slug from `list_organizations`. Example: `acme`. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Delete a branch

**Slug:** `PLANETSCALE_DELETE_BRANCH`

Delete a branch. This is destructive: confirm the target before calling.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `branch` | string | Yes | The name of the branch |
| `database` | string | Yes | The name of the database the branch belongs to |
| `organization` | string | Yes | The name of the organization the branch belongs to |
| `delete_descendants` | boolean | No | If true, recursively delete all descendant branches along with this branch |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Delete a database

**Slug:** `PLANETSCALE_DELETE_DATABASE`

Delete a database. This is destructive: confirm the target before calling.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `database` | string | Yes | Database name slug from `list_databases`. Example: `app-db`. |
| `organization` | string | Yes | Organization name slug from `list_organizations`. Example: `acme`. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Delete an IP restriction entry

**Slug:** `PLANETSCALE_DELETE_DATABASE_POSTGRES_CIDR`

Delete an IP restriction entry. PostgreSQL databases only. This is destructive: confirm the target before calling.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `id` | string | Yes | The ID of the IP restriction entry |
| `database` | string | Yes | The name of the database |
| `organization` | string | Yes | The name of the organization the database belongs to |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Delete the current billing payment method

**Slug:** `PLANETSCALE_DELETE_ORGANIZATION_BILLING_PAYMENT_METHOD`

Delete the current payment method for an organization. This is destructive: confirm the target before calling.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `organization` | string | Yes | Organization name slug from `list_organizations`. Example: `acme`. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Delete an SSO domain

**Slug:** `PLANETSCALE_DELETE_ORGANIZATION_SSO_DOMAIN`

Delete a verified or pending SSO domain. This is destructive: confirm the target before calling.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `id` | string | Yes | The public ID of the organization domain |
| `organization` | string | Yes | Organization name slug from `list_organizations`. Example: `acme`. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Delete an organization team

**Slug:** `PLANETSCALE_DELETE_ORGANIZATION_TEAM`

Delete an organization team. This is destructive: confirm the target before calling.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `team` | string | Yes | The slug of the team |
| `organization` | string | Yes | The name of the organization |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Delete a password

**Slug:** `PLANETSCALE_DELETE_PASSWORD`

Delete a password. Vitess/MySQL databases only; PlanetScale returns 405 for PostgreSQL resources. This is destructive: confirm the target before calling.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `id` | string | Yes | The ID of the password |
| `branch` | string | Yes | The name of the branch the password belongs to |
| `database` | string | Yes | The name of the database the password belongs to |
| `organization` | string | Yes | The name of the organization the password belongs to |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Delete a query patterns report

**Slug:** `PLANETSCALE_DELETE_QUERY_PATTERNS_REPORT`

Delete a query patterns report. This is destructive: confirm the target before calling.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `id` | string | Yes | The ID of the query patterns report |
| `branch` | string | Yes | The name of the branch |
| `database` | string | Yes | The name of the database the branch belongs to |
| `organization` | string | Yes | The name of the organization the branch belongs to |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Delete a read-only replica

**Slug:** `PLANETSCALE_DELETE_READ_ONLY_REPLICA`

Delete a read-only replica. This is destructive: confirm the target before calling.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `branch` | string | Yes | Branch name from `list_branches`. Example: `main`. |
| `database` | string | Yes | Database name slug from `list_databases`. Example: `app-db`. |
| `organization` | string | Yes | Organization name slug from `list_organizations`. Example: `acme`. |
| `read_only_replica` | string | Yes | The name of the read-only replica |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Delete role credentials

**Slug:** `PLANETSCALE_DELETE_ROLE`

Delete role credentials. PostgreSQL databases only. This is destructive: confirm the target before calling.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `id` | string | Yes | The ID of the role |
| `branch` | string | Yes | Branch name from `list_branches`. Example: `main`. |
| `database` | string | Yes | Database name slug from `list_databases`. Example: `app-db`. |
| `successor` | string | No | The optional role to reassign ownership to before dropping. Accepts the role's ID, or its username with or without the branch ID suffix. |
| `organization` | string | Yes | Organization name slug from `list_organizations`. Example: `acme`. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Delete a router from a Neki branch

**Slug:** `PLANETSCALE_DELETE_ROUTER`

Delete a router from a Neki branch. Sharded Neki PostgreSQL databases only; non-sharded branches may return 404. This is destructive: confirm the target before calling.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `branch` | string | Yes | Branch name from `list_branches`. Example: `main`. |
| `router` | string | Yes | Name from `list_routers`. |
| `database` | string | Yes | Database name slug from `list_databases`. Example: `app-db`. |
| `organization` | string | Yes | Organization name slug from `list_organizations`. Example: `acme`. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Remove a shard from a Neki branch

**Slug:** `PLANETSCALE_DELETE_SHARD`

Remove a shard from a Neki branch. Sharded Neki PostgreSQL databases only; non-sharded branches may return 404. This is destructive: confirm the target before calling.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `id` | string | Yes | The ID of the shard |
| `branch` | string | Yes | Branch name from `list_branches`. Example: `main`. |
| `database` | string | Yes | Database name slug from `list_databases`. Example: `app-db`. |
| `organization` | string | Yes | Organization name slug from `list_organizations`. Example: `acme`. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Delete a shard configuration profile for a Neki branch

**Slug:** `PLANETSCALE_DELETE_SHARD_CONFIGURATION_PROFILE`

Delete a shard configuration profile for a Neki branch. Sharded Neki PostgreSQL databases only; non-sharded branches may return 404. This is destructive: confirm the target before calling.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `branch` | string | Yes | Branch name from `list_branches`. Example: `main`. |
| `database` | string | Yes | Database name slug from `list_databases`. Example: `app-db`. |
| `organization` | string | Yes | Organization name slug from `list_organizations`. Example: `acme`. |
| `configuration_profile` | string | Yes | Name from `list_shard_configuration_profiles`. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Remove a shard from a Neki shard configuration profile

**Slug:** `PLANETSCALE_DELETE_SHARD_CONFIGURATION_PROFILE_SHARD`

Remove a shard from a Neki shard configuration profile. Sharded Neki PostgreSQL databases only; non-sharded branches may return 404. This is destructive: confirm the target before calling.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `id` | string | Yes | The ID of the shard |
| `branch` | string | Yes | Branch name from `list_branches`. Example: `main`. |
| `database` | string | Yes | Database name slug from `list_databases`. Example: `app-db`. |
| `organization` | string | Yes | Organization name slug from `list_organizations`. Example: `acme`. |
| `configuration_profile` | string | Yes | Name from `list_shard_configuration_profiles`. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Remove shards from a Neki shard configuration profile

**Slug:** `PLANETSCALE_DELETE_SHARD_CONFIGURATION_PROFILE_SHARDS`

Remove shards from a Neki shard configuration profile. Sharded Neki PostgreSQL databases only; non-sharded branches may return 404. This is destructive: confirm the target before calling.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `branch` | string | Yes | Branch name from `list_branches`. Example: `main`. |
| `database` | string | Yes | Database name slug from `list_databases`. Example: `app-db`. |
| `shard_ids` | array | Yes | The IDs of the shards to remove |
| `organization` | string | Yes | Organization name slug from `list_organizations`. Example: `acme`. |
| `configuration_profile` | string | Yes | Name from `list_shard_configuration_profiles`. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Delete a traffic budget

**Slug:** `PLANETSCALE_DELETE_TRAFFIC_BUDGET`

Delete a traffic budget. PostgreSQL databases only. This is destructive: confirm the target before calling.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `id` | string | Yes | The ID of the traffic budget |
| `branch` | string | Yes | Branch name from `list_branches`. Example: `main`. |
| `database` | string | Yes | Database name slug from `list_databases`. Example: `app-db`. |
| `organization` | string | Yes | Organization name slug from `list_organizations`. Example: `acme`. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Delete a traffic rule

**Slug:** `PLANETSCALE_DELETE_TRAFFIC_RULE`

Delete a traffic rule. PostgreSQL databases only. This is destructive: confirm the target before calling.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `id` | string | Yes | The ID of the traffic rule |
| `branch` | string | Yes | Branch name from `list_branches`. Example: `main`. |
| `database` | string | Yes | Database name slug from `list_databases`. Example: `app-db`. |
| `budget_id` | string | Yes | The ID of the traffic budget |
| `organization` | string | Yes | Organization name slug from `list_organizations`. Example: `acme`. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Delete a webhook

**Slug:** `PLANETSCALE_DELETE_WEBHOOK`

Delete a webhook. This is destructive: confirm the target before calling.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `id` | string | Yes | The ID of the webhook |
| `database` | string | Yes | The name of the database |
| `organization` | string | Yes | The name of the organization |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Demote a branch

**Slug:** `PLANETSCALE_DEMOTE_BRANCH`

Demotes a branch from production to development. Vitess/MySQL databases only; PlanetScale returns 405 for PostgreSQL resources. This changes operational state and may not be safely reversible.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `branch` | string | Yes | The name of the branch |
| `database` | string | Yes | The name of the database the branch belongs to |
| `organization` | string | Yes | The name of the organization the branch belongs to |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Disable organization SSO

**Slug:** `PLANETSCALE_DISABLE_ORGANIZATION_SSO`

Disable SSO and directory sync for the organization. This is destructive: confirm the target before calling.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `organization` | string | Yes | Organization name slug from `list_organizations`. Example: `acme`. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Disable directory sync

**Slug:** `PLANETSCALE_DISABLE_ORGANIZATION_SSO_DIRECTORY`

Disable directory sync for the organization. Non-admin directory members are removed. This is destructive: confirm the target before calling.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `organization` | string | Yes | Organization name slug from `list_organizations`. Example: `acme`. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Disable safe migrations for a branch

**Slug:** `PLANETSCALE_DISABLE_SAFE_MIGRATIONS`

Disable safe migrations for a branch. Vitess/MySQL databases only; PlanetScale returns 405 for PostgreSQL resources. This is destructive: confirm the target before calling.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `branch` | string | Yes | The name of the branch |
| `database` | string | Yes | The name of the database the branch belongs to |
| `organization` | string | Yes | The name of the organization the branch belongs to |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Dismiss a schema recommendation

**Slug:** `PLANETSCALE_DISMISS_SCHEMA_RECOMMENDATION`

Dismiss a schema recommendation.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `number` | integer | Yes | Schema recommendation sequence number. Example: `42`. |
| `reason` | string | No | The reason for dismissing the recommendation (max 500 characters) |
| `database` | string | Yes | Database name slug from `list_databases`. Example: `app-db`. |
| `organization` | string | Yes | Organization name slug from `list_organizations`. Example: `acme`. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Enable organization SSO

**Slug:** `PLANETSCALE_ENABLE_ORGANIZATION_SSO`

Enable the SSO add-on and return a URL for verifying an email domain. This changes operational state and may not be safely reversible.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `organization` | string | Yes | Organization name slug from `list_organizations`. Example: `acme`. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Open the directory sync portal

**Slug:** `PLANETSCALE_ENABLE_ORGANIZATION_SSO_DIRECTORY`

Return a URL for configuring directory sync. Requires SSO to be enabled.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `organization` | string | Yes | Organization name slug from `list_organizations`. Example: `acme`. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Enable safe migrations for a branch

**Slug:** `PLANETSCALE_ENABLE_SAFE_MIGRATIONS`

Enable safe migrations for a branch. Vitess/MySQL databases only; PlanetScale returns 405 for PostgreSQL resources.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `branch` | string | Yes | The name of the branch |
| `database` | string | Yes | The name of the database the branch belongs to |
| `organization` | string | Yes | The name of the organization the branch belongs to |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Enable force cutover for a deploy request

**Slug:** `PLANETSCALE_FORCE_CUTOVER_DEPLOY_REQUEST`

Enable force cutover for a deploy request. Vitess/MySQL databases only; PlanetScale returns 405 for PostgreSQL resources. This changes operational state and may not be safely reversible.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `number` | integer | Yes | The number of the deploy request |
| `database` | string | Yes | The name of the deploy request's database |
| `organization` | string | Yes | The name of the deploy request's organization |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Get the admin for a Neki branch

**Slug:** `PLANETSCALE_GET_ADMIN`

Get the admin for a Neki branch. Sharded Neki PostgreSQL databases only; non-sharded branches may return 404.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `branch` | string | Yes | Branch name from `list_branches`. Example: `main`. |
| `database` | string | Yes | Database name slug from `list_databases`. Example: `app-db`. |
| `organization` | string | Yes | Organization name slug from `list_organizations`. Example: `acme`. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Get a change request for a Neki admin

**Slug:** `PLANETSCALE_GET_ADMIN_CHANGE_REQUEST`

Get a change request for a Neki admin. Sharded Neki PostgreSQL databases only; non-sharded branches may return 404.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `id` | string | Yes | The ID of the change request |
| `branch` | string | Yes | Branch name from `list_branches`. Example: `main`. |
| `database` | string | Yes | Database name slug from `list_databases`. Example: `app-db`. |
| `organization` | string | Yes | Organization name slug from `list_organizations`. Example: `acme`. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Get a backup

**Slug:** `PLANETSCALE_GET_BACKUP`

Get a backup.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `id` | string | Yes | The ID for the backup |
| `branch` | string | Yes | The name of the branch |
| `database` | string | Yes | The name of the database the branch belongs to |
| `organization` | string | Yes | The name of the organization the branch belongs to |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Get a backup policy

**Slug:** `PLANETSCALE_GET_BACKUP_POLICY`

Get a backup policy.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `id` | string | Yes | The ID of the backup policy |
| `database` | string | Yes | Database name slug from `list_databases`. Example: `app-db`. |
| `organization` | string | Yes | Organization name slug from `list_organizations`. Example: `acme`. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Get a bouncer

**Slug:** `PLANETSCALE_GET_BOUNCER`

Get a bouncer. PostgreSQL databases only.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `branch` | string | Yes | Branch name from `list_branches`. Example: `main`. |
| `bouncer` | string | Yes | The name of the bouncer |
| `database` | string | Yes | Database name slug from `list_databases`. Example: `app-db`. |
| `organization` | string | Yes | Organization name slug from `list_organizations`. Example: `acme`. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Get a branch

**Slug:** `PLANETSCALE_GET_BRANCH`

Get a branch.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `branch` | string | Yes | Branch name from `list_branches`. Example: `main`. |
| `database` | string | Yes | Database name slug from `list_databases`. Example: `app-db`. |
| `organization` | string | Yes | Organization name slug from `list_organizations`. Example: `acme`. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Retrieve a branch anomaly

**Slug:** `PLANETSCALE_GET_BRANCH_ANOMALY`

Retrieve a branch anomaly.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `id` | string | Yes | The anomaly ID |
| `branch` | string | Yes | Branch name from `list_branches`. Example: `main`. |
| `database` | string | Yes | Database name slug from `list_databases`. Example: `app-db`. |
| `organization` | string | Yes | Organization name slug from `list_organizations`. Example: `acme`. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Get a branch change request

**Slug:** `PLANETSCALE_GET_BRANCH_CHANGE_REQUEST`

Get a branch change request. PostgreSQL databases only.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `id` | string | Yes | The ID of the change request |
| `branch` | string | Yes | Branch name from `list_branches`. Example: `main`. |
| `database` | string | Yes | Database name slug from `list_databases`. Example: `app-db`. |
| `organization` | string | Yes | Organization name slug from `list_organizations`. Example: `acme`. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Get table storage metrics by keyspace

**Slug:** `PLANETSCALE_GET_BRANCH_KEYSPACE_TABLE_METRICS`

Get table storage metrics by keyspace.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `branch` | string | Yes | Branch name from `list_branches`. Example: `main`. |
| `database` | string | Yes | Database name slug from `list_databases`. Example: `app-db`. |
| `organization` | string | Yes | Organization name slug from `list_organizations`. Example: `acme`. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Get time-series metrics

**Slug:** `PLANETSCALE_GET_BRANCH_METRICS`

Retrieve time-series metrics for a database branch. ```sh curl --get \ --header "Authorization: $PLANETSCALE_SERVICE_TOKEN" \ --data-urlencode "metrics=queries" \ --data-urlencode "period=15m" \ "https://api.planetscale.com/v1/organizations/acme/databases/app-db/branches/main/metrics" ``` Each series contains its metric name, display label, identifying labels, and sampled `[Unix timestamp, value]` points: ```json { "type": "MetricSeries", "start_date": "2026-09-09T17:00:00Z", "end_date": "2026-09-09T17:15:00Z", "interval": 60, "series": [ { "type": "TimeSeries", "metric": "queries", "label": "Queries", "labels": { "tablet_type": "primary" }, "points": [[1788973200, 42.0]] } ] } ```.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `to` | string | No | End of a custom time range as an ISO 8601 timestamp |
| `pod` | string | No | Filter by pod |
| `from` | string | No | Start of a custom time range as an ISO 8601 timestamp |
| `pods` | array | No | Filter by pods |
| `role` | string | No | Filter by Postgres role |
| `query` | string | No | Search terms to filter the metrics |
| `shard` | string | No | Filter by shard |
| `steps` | integer | No | Number of data points to return |
| `branch` | string | Yes | Branch name from `list_branches`. Example: `main`. |
| `period` | string ("15m" | "1h" | "3h" | "6h" | "12h" | "1d" | "2d" | "7d" | "8d") | No | Named time period to retrieve. Defaults to 12h. |
| `router` | string | No | Filter by router |
| `metrics` | array | No | Metric names to retrieve. Pass as `metrics[]=name` (repeat for multiple), `metrics=name`, or a comma-separated list (`metrics=name,other`). Time range is `period` (for example `15m`) or ISO 8601 `from`/`to`. |
| `rule_id` | string | No | Filter by traffic rule ID |
| `database` | string | Yes | Database name slug from `list_databases`. Example: `app-db`. |
| `keyspace` | string | No | Filter by keyspace |
| `budget_id` | string | No | Filter by traffic budget ID |
| `container` | string | No | Filter by container |
| `query_ids` | array | No | Filter by query pattern IDs |
| `fingerprint` | string | No | Filter by query fingerprint |
| `tablet_type` | string ("primary" | "replica" | "rdonly") | No | Filter by tablet type |
| `organization` | string | Yes | Organization name slug from `list_organizations`. Example: `acme`. |
| `shard_config_profile` | string | No | Filter by shard configuration profile name |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Retrieve a branch query

**Slug:** `PLANETSCALE_GET_BRANCH_QUERY`

Retrieve a branch query.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `id` | string | Yes | ID of an individual query execution returned as `items[].id` by `GET_BRANCH_QUERY_ERROR`. `LIST_BRANCH_QUERIES` returns query-summary IDs, which this endpoint does not accept. |
| `branch` | string | Yes | Branch name from `list_branches`. Example: `main`. |
| `database` | string | Yes | Database name slug from `list_databases`. Example: `app-db`. |
| `organization` | string | Yes | Organization name slug from `list_organizations`. Example: `acme`. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### List queries for an error fingerprint

**Slug:** `PLANETSCALE_GET_BRANCH_QUERY_ERROR`

List queries for an error fingerprint.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `to` | string | No | End time for filtering queries (ISO 8601 timestamp) |
| `from` | string | No | Start time for filtering queries (ISO 8601 timestamp) |
| `branch` | string | Yes | Branch name from `list_branches`. Example: `main`. |
| `period` | string ("15m" | "1h" | "3h" | "6h" | "12h" | "1d" | "2d" | "7d" | "8d") | No | Time period for filtering queries |
| `database` | string | Yes | Database name slug from `list_databases`. Example: `app-db`. |
| `per_page` | integer | No | If provided, specifies the number of returned results |
| `fingerprint` | string | Yes | The error fingerprint |
| `next_cursor` | string | No | Continuation cursor returned by the previous call; omit for the first page. |
| `organization` | string | Yes | Organization name slug from `list_organizations`. Example: `acme`. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Get time-series metrics for SQL queries

**Slug:** `PLANETSCALE_GET_BRANCH_QUERY_METRICS`

Get time-series metrics for SQL queries.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `to` | string | No | End of a custom time range as an ISO 8601 timestamp |
| `from` | string | No | Start of a custom time range as an ISO 8601 timestamp |
| `query` | string | No | Search terms to filter the metrics |
| `steps` | integer | No | Number of data points to return |
| `branch` | string | Yes | Branch name from `list_branches`. Example: `main`. |
| `period` | string ("15m" | "1h" | "3h" | "6h" | "12h" | "1d" | "2d" | "7d" | "8d") | No | Named time period to retrieve. Defaults to 12h. |
| `metrics` | array | No | Metric names to retrieve. Pass as `metrics[]=name` (repeat for multiple), `metrics=name`, or a comma-separated list (`metrics=name,other`). Time range is `period` (for example `15m`) or ISO 8601 `from`/`to`. |
| `rule_id` | string | No | Filter by traffic rule ID |
| `database` | string | Yes | Database name slug from `list_databases`. Example: `app-db`. |
| `keyspace` | string | No | Keyspace for the query fingerprint |
| `budget_id` | string | No | Filter by traffic budget ID |
| `query_ids` | array | No | Query pattern IDs to retrieve metrics for |
| `fingerprint` | string | No | Filter by query fingerprint |
| `tablet_type` | string ("primary" | "replica" | "rdonly") | No | Filter by tablet type |
| `organization` | string | Yes | Organization name slug from `list_organizations`. Example: `acme`. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Retrieve a query tag

**Slug:** `PLANETSCALE_GET_BRANCH_QUERY_TAG`

Retrieve a query tag.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `to` | string | No | End time for filtering tag values (ISO 8601 timestamp) |
| `tag` | string | Yes | The tag name |
| `from` | string | No | Start time for filtering tag values (ISO 8601 timestamp) |
| `branch` | string | Yes | Branch name from `list_branches`. Example: `main`. |
| `period` | string ("15m" | "1h" | "3h" | "6h" | "12h" | "1d" | "2d" | "7d" | "8d") | No | Time period for filtering tag values |
| `database` | string | Yes | Database name slug from `list_databases`. Example: `app-db`. |
| `keyspace` | string | No | Filter by keyspace |
| `fingerprint` | string | No | Filter to tag values on queries with this fingerprint |
| `tablet_type` | string ("primary" | "replica" | "rdonly") | No | Filter by tablet type |
| `organization` | string | Yes | Organization name slug from `list_organizations`. Example: `acme`. |
| `values_limit` | integer | No | Maximum number of values returned (1-100) |
| `literal_values_only` | boolean | No | Only return literal tag values, excluding overflow and collapsed values |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Get a branch resize request

**Slug:** `PLANETSCALE_GET_BRANCH_RESIZE_REQUEST`

Get a branch resize request.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `branch` | string | Yes | The name of the branch |
| `resize` | string | Yes | The ID of the branch resize request |
| `database` | string | Yes | The name of the database the branch belongs to |
| `organization` | string | Yes | The name of the organization the branch belongs to |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Get a branch schema

**Slug:** `PLANETSCALE_GET_BRANCH_SCHEMA`

Get a branch schema. Vitess/MySQL databases only; PlanetScale returns 405 for PostgreSQL resources.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `branch` | string | Yes | The name of the branch |
| `database` | string | Yes | The name of the database the branch belongs to |
| `keyspace` | string | No | Return the schema for a single Vitess keyspace |
| `namespace` | string | No | Return the schema for a PostgreSQL catalog namespace in `<database>.<schema>` format (e.g. public.schema1) |
| `organization` | string | Yes | The name of the organization the branch belongs to |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Get table storage metrics

**Slug:** `PLANETSCALE_GET_BRANCH_TABLE_METRICS`

Get table storage metrics.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `branch` | string | Yes | Branch name from `list_branches`. Example: `main`. |
| `database` | string | Yes | Database name slug from `list_databases`. Example: `app-db`. |
| `organization` | string | Yes | Organization name slug from `list_organizations`. Example: `acme`. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Get time-series metrics grouped by query tags

**Slug:** `PLANETSCALE_GET_BRANCH_TAG_METRICS`

Get time-series metrics grouped by query tags.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `to` | string | No | End of a custom time range as an ISO 8601 timestamp |
| `from` | string | No | Start of a custom time range as an ISO 8601 timestamp |
| `query` | string | No | Search terms to filter the metrics |
| `steps` | integer | No | Number of data points to return |
| `branch` | string | Yes | Branch name from `list_branches`. Example: `main`. |
| `period` | string ("15m" | "1h" | "3h" | "6h" | "12h" | "1d" | "2d" | "7d" | "8d") | No | Named time period to retrieve. Defaults to 12h. |
| `metrics` | array | No | Metric names to retrieve. Pass as `metrics[]=name` (repeat for multiple), `metrics=name`, or a comma-separated list (`metrics=name,other`). Time range is `period` (for example `15m`) or ISO 8601 `from`/`to`. |
| `rule_id` | string | No | Filter by traffic rule ID |
| `database` | string | Yes | Database name slug from `list_databases`. Example: `app-db`. |
| `tag_sets` | array | No | Tag sets to retrieve metrics for |
| `budget_id` | string | No | Filter by traffic budget ID |
| `tablet_type` | string ("primary" | "replica" | "rdonly") | No | Filter by tablet type |
| `organization` | string | Yes | Organization name slug from `list_organizations`. Example: `acme`. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Get current user

**Slug:** `PLANETSCALE_GET_CURRENT_USER`

Get the user associated with the current OAuth access token.

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Get a database

**Slug:** `PLANETSCALE_GET_DATABASE`

Get a database.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `database` | string | Yes | Database name slug from `list_databases`. Example: `app-db`. |
| `organization` | string | Yes | Organization name slug from `list_organizations`. Example: `acme`. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Get an IP restriction entry

**Slug:** `PLANETSCALE_GET_DATABASE_POSTGRES_CIDR`

Get an IP restriction entry. PostgreSQL databases only.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `id` | string | Yes | The ID of the IP restriction entry |
| `database` | string | Yes | The name of the database |
| `organization` | string | Yes | The name of the organization the database belongs to |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Get database throttler configurations

**Slug:** `PLANETSCALE_GET_DATABASE_THROTTLER`

Get database throttler configurations. Vitess/MySQL databases only; PlanetScale returns 405 for PostgreSQL resources.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `database` | string | Yes | The name of the database that the throttled deploy requests belong to |
| `organization` | string | Yes | The name of the organization that the throttled deploy requests belong to |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Get the data topology for a Neki branch

**Slug:** `PLANETSCALE_GET_DATA_TOPOLOGY`

Get the data topology for a Neki branch. Sharded Neki PostgreSQL databases only; non-sharded branches may return 404.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `branch` | string | Yes | Branch name from `list_branches`. Example: `main`. |
| `database` | string | Yes | Database name slug from `list_databases`. Example: `app-db`. |
| `organization` | string | Yes | Organization name slug from `list_organizations`. Example: `acme`. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Get the default postgres role

**Slug:** `PLANETSCALE_GET_DEFAULT_ROLE`

Get the default postgres role. PostgreSQL databases only.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `branch` | string | Yes | Branch name from `list_branches`. Example: `main`. |
| `database` | string | Yes | Database name slug from `list_databases`. Example: `app-db`. |
| `organization` | string | Yes | Organization name slug from `list_organizations`. Example: `acme`. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Get the default shard configuration profile for a Neki branch

**Slug:** `PLANETSCALE_GET_DEFAULT_SHARD_CONFIGURATION_PROFILE`

Get the default shard configuration profile for a Neki branch. Sharded Neki PostgreSQL databases only; non-sharded branches may return 404.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `branch` | string | Yes | Branch name from `list_branches`. Example: `main`. |
| `database` | string | Yes | Database name slug from `list_databases`. Example: `app-db`. |
| `organization` | string | Yes | Organization name slug from `list_organizations`. Example: `acme`. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Get a deployment

**Slug:** `PLANETSCALE_GET_DEPLOYMENT`

Get the deployment for a deploy request. Vitess/MySQL databases only; PlanetScale returns 405 for PostgreSQL resources.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `number` | integer | Yes | The number of the deploy request |
| `database` | string | Yes | The name of the deploy request's database |
| `organization` | string | Yes | The name of the deploy request's organization |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Get the deploy queue

**Slug:** `PLANETSCALE_GET_DEPLOY_QUEUE`

The deploy queue returns the current list of deploy requests in the order they will be deployed. Vitess/MySQL databases only; PlanetScale returns 405 for PostgreSQL resources.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `database` | string | Yes | The name of the deploy request's database |
| `per_page` | integer | No | If provided, specifies the number of returned results |
| `next_cursor` | string | No | Continuation cursor returned by the previous call; omit for the first page. |
| `organization` | string | Yes | The name of the deploy request's organization |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Get a deploy request

**Slug:** `PLANETSCALE_GET_DEPLOY_REQUEST`

Get a deploy request. Vitess/MySQL databases only; PlanetScale returns 405 for PostgreSQL resources.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `number` | integer | Yes | The number of the deploy request |
| `database` | string | Yes | The name of the deploy request's database |
| `organization` | string | Yes | The name of the deploy request's organization |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Get deploy request throttler configurations

**Slug:** `PLANETSCALE_GET_DEPLOY_REQUEST_THROTTLER`

Get deploy request throttler configurations. Vitess/MySQL databases only; PlanetScale returns 405 for PostgreSQL resources.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `number` | integer | Yes | The number of the deploy request |
| `database` | string | Yes | The name of the deploy request's database |
| `organization` | string | Yes | The name of the deploy request's organization |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Get an Insights agent run

**Slug:** `PLANETSCALE_GET_INSIGHTS_AGENT_RUN`

Get an Insights agent run.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `id` | string | Yes | The Insights agent run ID |
| `branch` | string | Yes | Branch name from `list_branches`. Example: `main`. |
| `database` | string | Yes | Database name slug from `list_databases`. Example: `app-db`. |
| `organization` | string | Yes | Organization name slug from `list_organizations`. Example: `acme`. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Get current metric values

**Slug:** `PLANETSCALE_GET_INSTANT_BRANCH_METRICS`

Get current metric values.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `pod` | string | No | Filter by pod |
| `role` | string | No | Filter by Postgres role |
| `shard` | string | No | Filter by shard |
| `branch` | string | Yes | Branch name from `list_branches`. Example: `main`. |
| `metrics` | array | No | Metric names to retrieve. Pass as `metrics[]=name` (repeat for multiple), `metrics=name`, or a comma-separated list (`metrics=name,other`). |
| `database` | string | Yes | Database name slug from `list_databases`. Example: `app-db`. |
| `container` | string | No | Filter by container |
| `organization` | string | Yes | Organization name slug from `list_organizations`. Example: `acme`. |
| `shard_config_profile` | string | No | Filter by shard configuration profile name |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Get current tablet metrics

**Slug:** `PLANETSCALE_GET_INSTANT_TABLET_METRICS`

Get current tablet metrics.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `shard` | string | No | Filter by shard |
| `branch` | string | Yes | Branch name from `list_branches`. Example: `main`. |
| `metrics` | array | No | Metric names to retrieve. Pass as `metrics[]=name` (repeat for multiple), `metrics=name`, or a comma-separated list (`metrics=name,other`). |
| `database` | string | Yes | Database name slug from `list_databases`. Example: `app-db`. |
| `keyspace` | string | No | Filter by keyspace |
| `organization` | string | Yes | Organization name slug from `list_organizations`. Example: `acme`. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Get an invoice

**Slug:** `PLANETSCALE_GET_INVOICE`

Get an invoice.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `id` | string | Yes | Invoice public ID from `list_invoices`. Example: `aabb12123434`. |
| `organization` | string | Yes | Organization name slug from `list_organizations`. Example: `acme`. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Get invoice line items

**Slug:** `PLANETSCALE_GET_INVOICE_LINE_ITEMS`

Get the line items for an invoice.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `id` | string | Yes | Invoice public ID from `list_invoices`. Example: `aabb12123434`. |
| `per_page` | integer | No | If provided, specifies the number of returned results |
| `next_cursor` | string | No | Continuation cursor returned by the previous call; omit for the first page. |
| `organization` | string | Yes | Organization name slug from `list_organizations`. Example: `acme`. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Get a maintenance schedule

**Slug:** `PLANETSCALE_GET_MAINTENANCE_SCHEDULE`

Get a maintenance schedule. Vitess/MySQL databases only; PlanetScale returns 405 for PostgreSQL resources.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `id` | string | Yes | The ID of the maintenance schedule |
| `database` | string | Yes | Database name slug from `list_databases`. Example: `app-db`. |
| `organization` | string | Yes | Organization name slug from `list_organizations`. Example: `acme`. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Get a change request for a Neki branch

**Slug:** `PLANETSCALE_GET_NEKI_CHANGE_REQUEST`

Get a change request for a Neki branch. Sharded Neki PostgreSQL databases only; non-sharded branches may return 404.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `id` | string | Yes | The ID of the change request |
| `branch` | string | Yes | Branch name from `list_branches`. Example: `main`. |
| `database` | string | Yes | Database name slug from `list_databases`. Example: `app-db`. |
| `organization` | string | Yes | Organization name slug from `list_organizations`. Example: `acme`. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Get an organization

**Slug:** `PLANETSCALE_GET_ORGANIZATION`

Get an organization.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `organization` | string | Yes | Organization name slug from `list_organizations`. Example: `acme`. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Get the current billing payment method

**Slug:** `PLANETSCALE_GET_ORGANIZATION_BILLING_PAYMENT_METHOD`

Get the current payment method for an organization.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `organization` | string | Yes | Organization name slug from `list_organizations`. Example: `acme`. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Get an organization member

**Slug:** `PLANETSCALE_GET_ORGANIZATION_MEMBERSHIP`

Get an organization member by a user ID or membership ID returned by `list_organization_members`. The action uses PlanetScale's documented detail route first and falls back to the paginated member list when the provider returns 404 for an ID it just listed.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `id` | string | Yes | User ID or membership ID from `list_organization_members`. PlanetScale documents the user ID, but the detail endpoint can return 404 for IDs present in the list; this action falls back to the list result. |
| `organization` | string | Yes | The name of the organization |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Get organization SSO status

**Slug:** `PLANETSCALE_GET_ORGANIZATION_SSO`

Get SSO add-on status, identity provider connection state, directory sync, and verified domains.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `organization` | string | Yes | Organization name slug from `list_organizations`. Example: `acme`. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Get an SSO domain

**Slug:** `PLANETSCALE_GET_ORGANIZATION_SSO_DOMAIN`

Get a registered SSO email domain and its verification state.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `id` | string | Yes | The public ID of the organization domain |
| `organization` | string | Yes | Organization name slug from `list_organizations`. Example: `acme`. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Get an organization team

**Slug:** `PLANETSCALE_GET_ORGANIZATION_TEAM`

Get an organization team.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `team` | string | Yes | The slug of the team |
| `organization` | string | Yes | The name of the organization |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Get a team member

**Slug:** `PLANETSCALE_GET_ORGANIZATION_TEAM_MEMBER`

Get a team member.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `id` | string | Yes | The ID of the team membership or the ID of the member |
| `team` | string | Yes | The slug of the team |
| `organization` | string | Yes | The name of the organization |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Get a password

**Slug:** `PLANETSCALE_GET_PASSWORD`

Get a password. Vitess/MySQL databases only; PlanetScale returns 405 for PostgreSQL resources.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `id` | string | Yes | The ID of the password |
| `branch` | string | Yes | The name of the branch the password belongs to |
| `database` | string | Yes | The name of the database the password belongs to |
| `organization` | string | Yes | The name of the organization the password belongs to |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Get a billing payment method setup

**Slug:** `PLANETSCALE_GET_PAYMENT_METHOD_SETUP`

Get the state of a billing payment method setup.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `id` | string | Yes | Billing payment method setup ID from `create_payment_method_setup`. Example: `pmsetup_1234`. |
| `organization` | string | Yes | Organization name slug from `list_organizations`. Example: `acme`. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Download a finished query patterns report

**Slug:** `PLANETSCALE_GET_QUERY_PATTERNS_REPORT`

Download a finished query patterns report.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `id` | string | Yes | The ID of the query patterns report |
| `branch` | string | Yes | The name of the branch |
| `database` | string | Yes | The name of the database the branch belongs to |
| `organization` | string | Yes | The name of the organization the branch belongs to |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Show the status of a query patterns report

**Slug:** `PLANETSCALE_GET_QUERY_PATTERNS_REPORT_STATUS`

Show the status of a query patterns report.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `id` | string | Yes | The ID of the query patterns report |
| `branch` | string | Yes | The name of the branch |
| `database` | string | Yes | The name of the database the branch belongs to |
| `organization` | string | Yes | The name of the organization the branch belongs to |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Retrieve query statistics

**Slug:** `PLANETSCALE_GET_QUERY_STATISTICS`

Retrieve query statistics.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `to` | string | No | End time for filtering query statistics (ISO 8601 timestamp) |
| `from` | string | No | Start time for filtering query statistics (ISO 8601 timestamp) |
| `branch` | string | Yes | Branch name from `list_branches`. Example: `main`. |
| `period` | string ("15m" | "1h" | "3h" | "6h" | "12h" | "1d" | "2d" | "7d" | "8d") | No | Time period for filtering query statistics |
| `database` | string | Yes | Database name slug from `list_databases`. Example: `app-db`. |
| `keyspace` | string | Yes | The keyspace to filter by |
| `per_page` | integer | No | If provided, specifies the number of returned results |
| `fingerprint` | string | Yes | The query fingerprint |
| `next_cursor` | string | No | Continuation cursor returned by the previous call; omit for the first page. |
| `organization` | string | Yes | Organization name slug from `list_organizations`. Example: `acme`. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Retrieve a summary of query statistics

**Slug:** `PLANETSCALE_GET_QUERY_SUMMARY`

Retrieve a summary of query statistics.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `to` | string | No | End time for filtering query statistics (ISO 8601 timestamp) |
| `from` | string | No | Start time for filtering query statistics (ISO 8601 timestamp) |
| `branch` | string | Yes | Branch name from `list_branches`. Example: `main`. |
| `period` | string ("15m" | "1h" | "3h" | "6h" | "12h" | "1d" | "2d" | "7d" | "8d") | No | Time period for filtering query statistics |
| `database` | string | Yes | Database name slug from `list_databases`. Example: `app-db`. |
| `keyspace` | string | Yes | The keyspace to filter by |
| `fingerprint` | string | Yes | The query fingerprint |
| `organization` | string | Yes | Organization name slug from `list_organizations`. Example: `acme`. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Get a read-only replica

**Slug:** `PLANETSCALE_GET_READ_ONLY_REPLICA`

Get a read-only replica.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `branch` | string | Yes | Branch name from `list_branches`. Example: `main`. |
| `database` | string | Yes | Database name slug from `list_databases`. Example: `app-db`. |
| `organization` | string | Yes | Organization name slug from `list_organizations`. Example: `acme`. |
| `read_only_replica` | string | Yes | The name of the read-only replica |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Get a role

**Slug:** `PLANETSCALE_GET_ROLE`

Get a role. PostgreSQL databases only.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `id` | string | Yes | The ID of the role |
| `shard` | string | No | Return libpq options that pin this Neki shard |
| `branch` | string | Yes | Branch name from `list_branches`. Example: `main`. |
| `router` | string | No | Return connection details for this Neki router group |
| `bouncer` | string | No | Return connection details for this bouncer |
| `replica` | boolean | No | Return connection details for a replica |
| `database` | string | Yes | Database name slug from `list_databases`. Example: `app-db`. |
| `organization` | string | Yes | Organization name slug from `list_organizations`. Example: `acme`. |
| `read_only_replica` | string | No | Return connection details for this read-only replica |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Get a router for a Neki branch

**Slug:** `PLANETSCALE_GET_ROUTER`

Get a router for a Neki branch. Sharded Neki PostgreSQL databases only; non-sharded branches may return 404.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `branch` | string | Yes | Branch name from `list_branches`. Example: `main`. |
| `router` | string | Yes | Name from `list_routers`. |
| `database` | string | Yes | Database name slug from `list_databases`. Example: `app-db`. |
| `organization` | string | Yes | Organization name slug from `list_organizations`. Example: `acme`. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Get a change request for a Neki router

**Slug:** `PLANETSCALE_GET_ROUTER_CHANGE_REQUEST`

Get a change request for a Neki router. Sharded Neki PostgreSQL databases only; non-sharded branches may return 404.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `id` | string | Yes | The ID of the change request |
| `branch` | string | Yes | Branch name from `list_branches`. Example: `main`. |
| `router` | string | Yes | Name from `list_routers`. |
| `database` | string | Yes | Database name slug from `list_databases`. Example: `app-db`. |
| `organization` | string | Yes | Organization name slug from `list_organizations`. Example: `acme`. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Get a schema recommendation

**Slug:** `PLANETSCALE_GET_SCHEMA_RECOMMENDATION`

Get a schema recommendation.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `number` | integer | Yes | Schema recommendation sequence number. Example: `42`. |
| `database` | string | Yes | Database name slug from `list_databases`. Example: `app-db`. |
| `organization` | string | Yes | Organization name slug from `list_organizations`. Example: `acme`. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Get a shard for a Neki branch

**Slug:** `PLANETSCALE_GET_SHARD`

Get a shard for a Neki branch. Sharded Neki PostgreSQL databases only; non-sharded branches may return 404.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `id` | string | Yes | The ID of the shard |
| `branch` | string | Yes | Branch name from `list_branches`. Example: `main`. |
| `database` | string | Yes | Database name slug from `list_databases`. Example: `app-db`. |
| `organization` | string | Yes | Organization name slug from `list_organizations`. Example: `acme`. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Get a shard configuration profile for a Neki branch

**Slug:** `PLANETSCALE_GET_SHARD_CONFIGURATION_PROFILE`

Get a shard configuration profile for a Neki branch. Sharded Neki PostgreSQL databases only; non-sharded branches may return 404.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `branch` | string | Yes | Branch name from `list_branches`. Example: `main`. |
| `database` | string | Yes | Database name slug from `list_databases`. Example: `app-db`. |
| `organization` | string | Yes | Organization name slug from `list_organizations`. Example: `acme`. |
| `configuration_profile` | string | Yes | Name from `list_shard_configuration_profiles`. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Get a change request for a Neki shard configuration profile

**Slug:** `PLANETSCALE_GET_SHARD_CONFIGURATION_PROFILE_CHANGE_REQUEST`

Get a change request for a Neki shard configuration profile. Sharded Neki PostgreSQL databases only; non-sharded branches may return 404.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `id` | string | Yes | The ID of the change request |
| `branch` | string | Yes | Branch name from `list_branches`. Example: `main`. |
| `database` | string | Yes | Database name slug from `list_databases`. Example: `app-db`. |
| `organization` | string | Yes | Organization name slug from `list_organizations`. Example: `acme`. |
| `configuration_profile` | string | Yes | Name from `list_shard_configuration_profiles`. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Get a shard in a Neki shard configuration profile

**Slug:** `PLANETSCALE_GET_SHARD_CONFIGURATION_PROFILE_SHARD`

Get a shard in a Neki shard configuration profile. Sharded Neki PostgreSQL databases only; non-sharded branches may return 404.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `id` | string | Yes | The ID of the shard |
| `branch` | string | Yes | Branch name from `list_branches`. Example: `main`. |
| `database` | string | Yes | Database name slug from `list_databases`. Example: `app-db`. |
| `organization` | string | Yes | Organization name slug from `list_organizations`. Example: `acme`. |
| `configuration_profile` | string | Yes | Name from `list_shard_configuration_profiles`. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Get a sidecar for a Neki branch

**Slug:** `PLANETSCALE_GET_SIDECAR`

Get a sidecar for a Neki branch. Sharded Neki PostgreSQL databases only; non-sharded branches may return 404.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `branch` | string | Yes | Branch name from `list_branches`. Example: `main`. |
| `sidecar` | string | Yes | ID from `list_sidecars`, or the configuration profile name. |
| `database` | string | Yes | Database name slug from `list_databases`. Example: `app-db`. |
| `organization` | string | Yes | Organization name slug from `list_organizations`. Example: `acme`. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Get a change request for a Neki sidecar

**Slug:** `PLANETSCALE_GET_SIDECAR_CHANGE_REQUEST`

Get a change request for a Neki sidecar. Sharded Neki PostgreSQL databases only; non-sharded branches may return 404.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `id` | string | Yes | The ID of the change request |
| `branch` | string | Yes | Branch name from `list_branches`. Example: `main`. |
| `sidecar` | string | Yes | ID from `list_sidecars`, or the configuration profile name. |
| `database` | string | Yes | Database name slug from `list_databases`. Example: `app-db`. |
| `organization` | string | Yes | Organization name slug from `list_organizations`. Example: `acme`. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Get a switchover

**Slug:** `PLANETSCALE_GET_SWITCHOVER`

Get a switchover. PostgreSQL databases only.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `id` | string | Yes | The ID of the switchover |
| `branch` | string | Yes | Branch name from `list_branches`. Example: `main`. |
| `database` | string | Yes | Database name slug from `list_databases`. Example: `app-db`. |
| `organization` | string | Yes | Organization name slug from `list_organizations`. Example: `acme`. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Get time-series tablet metrics

**Slug:** `PLANETSCALE_GET_TABLET_METRICS`

Get time-series tablet metrics.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `to` | string | No | End of a custom time range as an ISO 8601 timestamp |
| `pod` | string | No | Filter by pod |
| `from` | string | No | Start of a custom time range as an ISO 8601 timestamp |
| `shard` | string | No | Filter by shard |
| `steps` | integer | No | Number of data points to return |
| `branch` | string | Yes | Branch name from `list_branches`. Example: `main`. |
| `period` | string ("15m" | "1h" | "3h" | "6h" | "12h" | "1d" | "2d" | "7d" | "8d") | No | Named time period to retrieve. Defaults to 12h. |
| `metrics` | array | No | Metric names to retrieve. Pass as `metrics[]=name` (repeat for multiple), `metrics=name`, or a comma-separated list (`metrics=name,other`). Time range is `period` (for example `15m`) or ISO 8601 `from`/`to`. |
| `database` | string | Yes | Database name slug from `list_databases`. Example: `app-db`. |
| `keyspace` | string | No | Filter by keyspace |
| `workflow` | string | No | Filter by workflow ID |
| `organization` | string | Yes | Organization name slug from `list_organizations`. Example: `acme`. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Get a traffic budget

**Slug:** `PLANETSCALE_GET_TRAFFIC_BUDGET`

Get a traffic budget. PostgreSQL databases only.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `id` | string | Yes | The ID of the traffic budget |
| `branch` | string | Yes | Branch name from `list_branches`. Example: `main`. |
| `database` | string | Yes | Database name slug from `list_databases`. Example: `app-db`. |
| `organization` | string | Yes | Organization name slug from `list_organizations`. Example: `acme`. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Get a webhook

**Slug:** `PLANETSCALE_GET_WEBHOOK`

Get a webhook.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `id` | string | Yes | The ID of the webhook |
| `database` | string | Yes | The name of the database |
| `organization` | string | Yes | The name of the organization |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Lint a branch schema

**Slug:** `PLANETSCALE_LINT_BRANCH_SCHEMA`

Lint a branch schema. Vitess/MySQL databases only; PlanetScale returns 405 for PostgreSQL resources.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `branch` | string | Yes | The name of the branch |
| `database` | string | Yes | The name of the database the branch belongs to |
| `per_page` | integer | No | If provided, specifies the number of returned results |
| `next_cursor` | string | No | Continuation cursor returned by the previous call; omit for the first page. |
| `organization` | string | Yes | The name of the organization the branch belongs to |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### List change requests for a Neki admin

**Slug:** `PLANETSCALE_LIST_ADMIN_CHANGE_REQUESTS`

List change requests for a Neki admin. Sharded Neki PostgreSQL databases only; non-sharded branches may return 404.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `branch` | string | Yes | Branch name from `list_branches`. Example: `main`. |
| `period` | string ("15m" | "1h" | "3h" | "6h" | "12h" | "1d" | "2d" | "7d" | "8d") | No | Filter change requests by named period |
| `database` | string | Yes | Database name slug from `list_databases`. Example: `app-db`. |
| `per_page` | integer | No | If provided, specifies the number of returned results |
| `next_cursor` | string | No | Continuation cursor returned by the previous call; omit for the first page. |
| `completed_at` | string | No | Filter change requests completed between two ISO 8601 timestamps |
| `organization` | string | Yes | Organization name slug from `list_organizations`. Example: `acme`. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### List parameters for a Neki admin

**Slug:** `PLANETSCALE_LIST_ADMIN_PARAMETERS`

List parameters for a Neki admin. Sharded Neki PostgreSQL databases only; non-sharded branches may return 404.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `branch` | string | Yes | Branch name from `list_branches`. Example: `main`. |
| `database` | string | Yes | Database name slug from `list_databases`. Example: `app-db`. |
| `organization` | string | Yes | Organization name slug from `list_organizations`. Example: `acme`. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### List admin size SKUs for a Neki branch

**Slug:** `PLANETSCALE_LIST_ADMIN_SIZE_SKUS`

List admin size SKUs for a Neki branch. Sharded Neki PostgreSQL databases only; non-sharded branches may return 404.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `branch` | string | Yes | Branch name from `list_branches`. Example: `main`. |
| `database` | string | Yes | Database name slug from `list_databases`. Example: `app-db`. |
| `organization` | string | Yes | Organization name slug from `list_organizations`. Example: `acme`. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### List audit logs

**Slug:** `PLANETSCALE_LIST_AUDIT_LOGS`

List audit logs.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `limit` | integer | No | If provided, specifies the number of returned results (max 100) |
| `next_cursor` | string | No | Continuation cursor returned by the previous call; omit for the first page. |
| `organization` | string | Yes | The name of the organization |
| `ending_before` | string | No | If provided, returns results before the specified cursor |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### List backup policies

**Slug:** `PLANETSCALE_LIST_BACKUP_POLICIES`

List backup policies.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `database` | string | Yes | Database name slug from `list_databases`. Example: `app-db`. |
| `per_page` | integer | No | If provided, specifies the number of returned results |
| `next_cursor` | string | No | Continuation cursor returned by the previous call; omit for the first page. |
| `organization` | string | Yes | Organization name slug from `list_organizations`. Example: `acme`. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### List backups

**Slug:** `PLANETSCALE_LIST_BACKUPS`

List backups.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `to` | string | No | Filter backups started before this date (e.g. 2023-01-31T23:59:59Z) |
| `all` | boolean | No | Whether to include all backups, including deleted ones |
| `from` | string | No | Filter backups started after this date (e.g. 2023-01-01T00:00:00Z) |
| `state` | string ("pending" | "running" | "success" | "failed" | "canceled" | "ignored") | No | Filter backups by state |
| `branch` | string | Yes | The name of the branch |
| `policy` | string | No | Filter backups by backup policy ID |
| `database` | string | Yes | The name of the database the branch belongs to |
| `per_page` | integer | No | If provided, specifies the number of returned results |
| `production` | boolean | No | Filter backups by production branch |
| `running_at` | string | No | Filter backups that are running during a specific time (e.g. 2023-01-01T00:00:00Z..2023-01-01T23:59:59Z) |
| `next_cursor` | string | No | Continuation cursor returned by the previous call; omit for the first page. |
| `organization` | string | Yes | The name of the organization the branch belongs to |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Get bouncer resize requests

**Slug:** `PLANETSCALE_LIST_BOUNCER_RESIZE_REQUESTS`

Get bouncer resize requests. PostgreSQL databases only.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `branch` | string | Yes | Branch name from `list_branches`. Example: `main`. |
| `bouncer` | string | Yes | The name of the bouncer |
| `database` | string | Yes | Database name slug from `list_databases`. Example: `app-db`. |
| `per_page` | integer | No | If provided, specifies the number of returned results |
| `next_cursor` | string | No | Continuation cursor returned by the previous call; omit for the first page. |
| `organization` | string | Yes | Organization name slug from `list_organizations`. Example: `acme`. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### List bouncers

**Slug:** `PLANETSCALE_LIST_BOUNCERS`

List bouncers. PostgreSQL databases only.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `branch` | string | Yes | Branch name from `list_branches`. Example: `main`. |
| `database` | string | Yes | Database name slug from `list_databases`. Example: `app-db`. |
| `per_page` | integer | No | If provided, specifies the number of returned results |
| `next_cursor` | string | No | Continuation cursor returned by the previous call; omit for the first page. |
| `organization` | string | Yes | Organization name slug from `list_organizations`. Example: `acme`. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### List branch anomalies

**Slug:** `PLANETSCALE_LIST_BRANCH_ANOMALIES`

List branch anomalies.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `to` | string | No | End time for filtering anomalies (ISO 8601 timestamp) |
| `from` | string | No | Start time for filtering anomalies (ISO 8601 timestamp) |
| `branch` | string | Yes | Branch name from `list_branches`. Example: `main`. |
| `period` | string ("15m" | "1h" | "3h" | "6h" | "12h" | "1d" | "2d" | "7d" | "8d") | No | Time period for filtering anomalies |
| `database` | string | Yes | Database name slug from `list_databases`. Example: `app-db`. |
| `per_page` | integer | No | If provided, specifies the number of returned results |
| `next_cursor` | string | No | Continuation cursor returned by the previous call; omit for the first page. |
| `organization` | string | Yes | Organization name slug from `list_organizations`. Example: `acme`. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Get bouncer resize requests

**Slug:** `PLANETSCALE_LIST_BRANCH_BOUNCER_RESIZE_REQUESTS`

Get bouncer resize requests. PostgreSQL databases only.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `branch` | string | Yes | Branch name from `list_branches`. Example: `main`. |
| `database` | string | Yes | Database name slug from `list_databases`. Example: `app-db`. |
| `per_page` | integer | No | If provided, specifies the number of returned results |
| `next_cursor` | string | No | Continuation cursor returned by the previous call; omit for the first page. |
| `organization` | string | Yes | Organization name slug from `list_organizations`. Example: `acme`. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Get branch change requests

**Slug:** `PLANETSCALE_LIST_BRANCH_CHANGE_REQUESTS`

Get branch change requests. PostgreSQL databases only.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `branch` | string | Yes | Branch name from `list_branches`. Example: `main`. |
| `database` | string | Yes | Database name slug from `list_databases`. Example: `app-db`. |
| `per_page` | integer | No | If provided, specifies the number of returned results |
| `next_cursor` | string | No | Continuation cursor returned by the previous call; omit for the first page. |
| `organization` | string | Yes | Organization name slug from `list_organizations`. Example: `acme`. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### List branches

**Slug:** `PLANETSCALE_LIST_BRANCHES`

List branches.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `order` | string ("asc" | "desc") | No | Order branches by created_at time |
| `query` | string | No | Search branches by name |
| `database` | string | Yes | Database name slug from `list_databases`. Example: `app-db`. |
| `per_page` | integer | No | If provided, specifies the number of returned results |
| `production` | boolean | No | Filter branches by production status |
| `next_cursor` | string | No | Continuation cursor returned by the previous call; omit for the first page. |
| `organization` | string | Yes | Organization name slug from `list_organizations`. Example: `acme`. |
| `safe_migrations` | boolean | No | Filter branches by safe migrations (DDL protection) |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### List branch queries

**Slug:** `PLANETSCALE_LIST_BRANCH_QUERIES`

List branch queries.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `to` | string | No | End time for filtering query statistics (ISO 8601 timestamp) |
| `dir` | string ("asc" | "desc") | No | Sort direction |
| `from` | string | No | Start time for filtering query statistics (ISO 8601 timestamp) |
| `sort` | string ("keyspace" | "query" | "lastRun" | "count" | "errorCount" | "rowsRead" | "rowsAffected" | "rowsReturned" | "rowsReadPerReturned" | "rowsReadPerQuery" | "rowsReturnedPerQuery" | "rowsAffectedPerQuery" | "totalTime" | "cpuTime" | "ioTime" | "sumShardQueries" | "maxShardQueries" | "avgShardQueries" | "avgParallelWorkers" | "table" | "qualifiedTable" | "tableKeyspace" | "indexes" | "routingIndexes" | "p50Latency" | "p99Latency" | "maxLatency" | "percentTime" | "percentCpuTime" | "percentIoTime" | "egressBytes" | "egressBytesPerQuery" | "maxEgressBytes" | "ingressBytes" | "ingressBytesPerQuery" | "maxIngressBytes" | "blocksRead" | "blocksHit" | "blockCacheHitRatio" | "blocksDirtied" | "blocksWritten" | "trafficControlWarnings" | "trafficControlThrottled" | "trafficControlChecked" | "trafficControlBudgetsUsed") | No | Field to sort by |
| `type` | string ("SELECT" | "INSERT" | "UPDATE" | "DELETE") | No | Filter by statement type |
| `query` | string | No | Search query statistics by SQL pattern |
| `branch` | string | Yes | Branch name from `list_branches`. Example: `main`. |
| `fields` | array | No | Specific fields to include in the response |
| `period` | string ("15m" | "1h" | "3h" | "6h" | "12h" | "1d" | "2d" | "7d" | "8d") | No | Time period for filtering query statistics |
| `database` | string | Yes | Database name slug from `list_databases`. Example: `app-db`. |
| `per_page` | integer | No | If provided, specifies the number of returned results |
| `next_cursor` | string | No | Continuation cursor returned by the previous call; omit for the first page. |
| `tablet_type` | string ("primary" | "replica" | "rdonly") | No | Filter by tablet type |
| `organization` | string | Yes | Organization name slug from `list_organizations`. Example: `acme`. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### List branch query errors

**Slug:** `PLANETSCALE_LIST_BRANCH_QUERY_ERRORS`

List branch query errors.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `to` | string | No | End time for filtering query errors (ISO 8601 timestamp) |
| `dir` | string ("asc" | "desc") | No | Sort direction |
| `from` | string | No | Start time for filtering query errors (ISO 8601 timestamp) |
| `sort` | string ("error" | "lastRun" | "count" | "totalTime" | "timePerQuery") | No | Field to sort by |
| `query` | string | No | Search query errors by error message |
| `branch` | string | Yes | Branch name from `list_branches`. Example: `main`. |
| `period` | string ("15m" | "1h" | "3h" | "6h" | "12h" | "1d" | "2d" | "7d" | "8d") | No | Time period for filtering query errors |
| `database` | string | Yes | Database name slug from `list_databases`. Example: `app-db`. |
| `per_page` | integer | No | If provided, specifies the number of returned results |
| `next_cursor` | string | No | Continuation cursor returned by the previous call; omit for the first page. |
| `tablet_type` | string ("primary" | "replica" | "rdonly") | No | Filter by tablet type |
| `organization` | string | Yes | Organization name slug from `list_organizations`. Example: `acme`. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### List query tags

**Slug:** `PLANETSCALE_LIST_BRANCH_QUERY_TAGS`

List query tags.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `to` | string | No | End time for filtering tags (ISO 8601 timestamp) |
| `from` | string | No | Start time for filtering tags (ISO 8601 timestamp) |
| `query` | string | No | Search tags by name |
| `branch` | string | Yes | Branch name from `list_branches`. Example: `main`. |
| `period` | string ("15m" | "1h" | "3h" | "6h" | "12h" | "1d" | "2d" | "7d" | "8d") | No | Time period for filtering tags |
| `database` | string | Yes | Database name slug from `list_databases`. Example: `app-db`. |
| `keyspace` | string | No | Filter by keyspace |
| `per_page` | integer | No | If provided, specifies the number of returned results |
| `fingerprint` | string | No | Filter to tags on queries with this fingerprint |
| `next_cursor` | string | No | Continuation cursor returned by the previous call; omit for the first page. |
| `tablet_type` | string ("primary" | "replica" | "rdonly") | No | Filter by tablet type |
| `organization` | string | Yes | Organization name slug from `list_organizations`. Example: `acme`. |
| `values_limit` | integer | No | Maximum number of values returned per tag (1-100) |
| `literal_values_only` | boolean | No | Only return literal tag values, excluding overflow and collapsed values |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### List query statistics grouped by tag

**Slug:** `PLANETSCALE_LIST_BRANCH_QUERY_TAG_SUMMARIES`

List query statistics grouped by tag.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `to` | string | No | End time for filtering query statistics (ISO 8601 timestamp) |
| `dir` | string ("asc" | "desc") | No | Sort direction |
| `from` | string | No | Start time for filtering query statistics (ISO 8601 timestamp) |
| `sort` | string ("dimensions" | "lastRun" | "count" | "errorCount" | "rowsRead" | "rowsAffected" | "rowsReturned" | "rowsReadPerReturned" | "rowsReadPerQuery" | "rowsReturnedPerQuery" | "rowsAffectedPerQuery" | "totalTime" | "cpuTime" | "ioTime" | "sumShardQueries" | "maxShardQueries" | "avgShardQueries" | "avgParallelWorkers" | "table" | "qualifiedTable" | "tableKeyspace" | "indexes" | "routingIndexes" | "p50Latency" | "p99Latency" | "maxLatency" | "percentTime" | "percentCpuTime" | "percentIoTime" | "egressBytes" | "egressBytesPerQuery" | "maxEgressBytes" | "ingressBytes" | "ingressBytesPerQuery" | "maxIngressBytes" | "blocksRead" | "blocksHit" | "blockCacheHitRatio" | "blocksDirtied" | "blocksWritten" | "trafficControlWarnings" | "trafficControlThrottled" | "trafficControlChecked" | "trafficControlBudgetsUsed") | No | Field to sort by |
| `tags` | array | No | Tag ids returned by the tags list endpoint |
| `type` | string ("SELECT" | "INSERT" | "UPDATE" | "DELETE") | No | Filter by statement type |
| `query` | string | No | Search query statistics by SQL pattern |
| `branch` | string | Yes | Branch name from `list_branches`. Example: `main`. |
| `fields` | array | No | Specific fields to include in the response |
| `period` | string ("15m" | "1h" | "3h" | "6h" | "12h" | "1d" | "2d" | "7d" | "8d") | No | Time period for filtering query statistics |
| `database` | string | Yes | Database name slug from `list_databases`. Example: `app-db`. |
| `per_page` | integer | No | If provided, specifies the number of returned results |
| `next_cursor` | string | No | Continuation cursor returned by the previous call; omit for the first page. |
| `tablet_type` | string ("primary" | "replica" | "rdonly") | No | Filter by tablet type |
| `organization` | string | Yes | Organization name slug from `list_organizations`. Example: `acme`. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Get branch resize requests

**Slug:** `PLANETSCALE_LIST_BRANCH_RESIZE_REQUESTS`

Get branch resize requests.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `branch` | string | Yes | The name of the branch |
| `database` | string | Yes | The name of the database the branch belongs to |
| `per_page` | integer | No | If provided, specifies the number of returned results |
| `next_cursor` | string | No | Continuation cursor returned by the previous call; omit for the first page. |
| `organization` | string | Yes | The name of the organization the branch belongs to |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### List available cluster sizes

**Slug:** `PLANETSCALE_LIST_CLUSTER_SIZE_SKUS`

List available cluster sizes for an organization.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `rates` | boolean | No | Whether to include pricing rates in the response. Defaults to false. |
| `engine` | string ("mysql" | "postgresql" | "neki") | No | The database engine to filter by. Defaults to 'mysql'. |
| `region` | string | No | The region slug to get rates for. If not specified, uses the organization's default region. |
| `database` | string | No | The database name to resolve rates for. When specified, database-level custom rates take precedence over organization rates. |
| `external` | boolean | No | When true, list cluster sizes for external keyspaces. Defaults to false. |
| `organization` | string | Yes | Organization name slug from `list_organizations`. Example: `acme`. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### List IP restriction entries

**Slug:** `PLANETSCALE_LIST_DATABASE_POSTGRES_CIDRS`

List IP restriction entries. PostgreSQL databases only.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `database` | string | Yes | The name of the database |
| `per_page` | integer | No | If provided, specifies the number of returned results |
| `next_cursor` | string | No | Continuation cursor returned by the previous call; omit for the first page. |
| `organization` | string | Yes | The name of the organization the database belongs to |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### List database regions

**Slug:** `PLANETSCALE_LIST_DATABASE_REGIONS`

List database regions.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `database` | string | Yes | Database name slug from `list_databases`. Example: `app-db`. |
| `per_page` | integer | No | If provided, specifies the number of returned results |
| `next_cursor` | string | No | Continuation cursor returned by the previous call; omit for the first page. |
| `organization` | string | Yes | Organization name slug from `list_organizations`. Example: `acme`. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### List databases

**Slug:** `PLANETSCALE_LIST_DATABASES`

List databases.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `query` | string | No | Search term to filter databases by name |
| `per_page` | integer | No | If provided, specifies the number of returned results |
| `next_cursor` | string | No | Continuation cursor returned by the previous call; omit for the first page. |
| `organization` | string | Yes | Organization name slug from `list_organizations`. Example: `acme`. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### List deploy operations

**Slug:** `PLANETSCALE_LIST_DEPLOY_OPERATIONS`

List deploy operations for a deploy request. Vitess/MySQL databases only; PlanetScale returns 405 for PostgreSQL resources.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `number` | integer | Yes | The number of the deploy request |
| `database` | string | Yes | The name of the deploy request's database |
| `per_page` | integer | No | If provided, specifies the number of returned results |
| `next_cursor` | string | No | Continuation cursor returned by the previous call; omit for the first page. |
| `organization` | string | Yes | The name of the deploy request's organization |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### List deploy request reviews

**Slug:** `PLANETSCALE_LIST_DEPLOY_REQUEST_REVIEWS`

List deploy request reviews. Vitess/MySQL databases only; PlanetScale returns 405 for PostgreSQL resources.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `number` | integer | Yes | The number of the deploy request |
| `database` | string | Yes | The name of the database the deploy request belongs to |
| `per_page` | integer | No | If provided, specifies the number of returned results |
| `next_cursor` | string | No | Continuation cursor returned by the previous call; omit for the first page. |
| `organization` | string | Yes | The name of the organization the deploy request belongs to |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### List deploy requests

**Slug:** `PLANETSCALE_LIST_DEPLOY_REQUESTS`

List deploy requests for a database. Vitess/MySQL databases only; PlanetScale returns 405 for PostgreSQL resources.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `state` | string | No | Filter by state of the deploy request (open, closed, deployed) |
| `branch` | string | No | Filter by the name of the branch the deploy request is created from |
| `database` | string | Yes | The name of the deploy request's database |
| `per_page` | integer | No | If provided, specifies the number of returned results |
| `running_at` | string | No | Filter deploy requests by the date they were running. (e.g. 2023-01-01T00:00:00Z..2023-01-31T23:59:59Z) |
| `deployed_at` | string | No | Filter deploy requests by the date they were deployed. (e.g. 2023-01-01T00:00:00Z..2023-01-31T23:59:59Z) |
| `into_branch` | string | No | Filter by the name of the branch the deploy request will be merged into |
| `next_cursor` | string | No | Continuation cursor returned by the previous call; omit for the first page. |
| `organization` | string | Yes | The name of the deploy request's organization |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### List cluster extensions

**Slug:** `PLANETSCALE_LIST_EXTENSIONS`

List cluster extensions. PostgreSQL databases only.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `branch` | string | Yes | Branch name from `list_branches`. Example: `main`. |
| `database` | string | Yes | Database name slug from `list_databases`. Example: `app-db`. |
| `organization` | string | Yes | Organization name slug from `list_organizations`. Example: `acme`. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### List generated query patterns reports

**Slug:** `PLANETSCALE_LIST_GENERATED_QUERY_PATTERNS_REPORTS`

List generated query patterns reports.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `limit` | integer | No | If provided, specifies the number of returned results (max 100) |
| `branch` | string | Yes | The name of the branch |
| `database` | string | Yes | The name of the database the branch belongs to |
| `next_cursor` | string | No | Continuation cursor returned by the previous call; omit for the first page. |
| `organization` | string | Yes | The name of the organization the branch belongs to |
| `ending_before` | string | No | If provided, returns results before the specified cursor |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### List Insights agent runs

**Slug:** `PLANETSCALE_LIST_INSIGHTS_AGENT_RUNS`

List Insights agent runs.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `branch` | string | Yes | Branch name from `list_branches`. Example: `main`. |
| `database` | string | Yes | Database name slug from `list_databases`. Example: `app-db`. |
| `per_page` | integer | No | If provided, specifies the number of returned results |
| `next_cursor` | string | No | Continuation cursor returned by the previous call; omit for the first page. |
| `organization` | string | Yes | Organization name slug from `list_organizations`. Example: `acme`. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### List Insights Agent schedules

**Slug:** `PLANETSCALE_LIST_INSIGHTS_AGENT_SCHEDULES`

List Insights Agent schedules.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `branch` | string | Yes | Branch name from `list_branches`. Example: `main`. |
| `database` | string | Yes | Database name slug from `list_databases`. Example: `app-db`. |
| `organization` | string | Yes | Organization name slug from `list_organizations`. Example: `acme`. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Get invoices

**Slug:** `PLANETSCALE_LIST_INVOICES`

Get the invoices for an organization.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `per_page` | integer | No | If provided, specifies the number of returned results |
| `next_cursor` | string | No | Continuation cursor returned by the previous call; omit for the first page. |
| `organization` | string | Yes | Organization name slug from `list_organizations`. Example: `acme`. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### List maintenance schedules

**Slug:** `PLANETSCALE_LIST_MAINTENANCE_SCHEDULES`

List maintenance schedules. Vitess/MySQL databases only; PlanetScale returns 405 for PostgreSQL resources.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `database` | string | Yes | Database name slug from `list_databases`. Example: `app-db`. |
| `per_page` | integer | No | If provided, specifies the number of returned results |
| `next_cursor` | string | No | Continuation cursor returned by the previous call; omit for the first page. |
| `organization` | string | Yes | Organization name slug from `list_organizations`. Example: `acme`. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### List maintenance windows

**Slug:** `PLANETSCALE_LIST_MAINTENANCE_WINDOWS`

List maintenance windows. Vitess/MySQL databases only; PlanetScale returns 405 for PostgreSQL resources.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `id` | string | Yes | The ID of the maintenance schedule |
| `database` | string | Yes | Database name slug from `list_databases`. Example: `app-db`. |
| `per_page` | integer | No | If provided, specifies the number of returned results |
| `next_cursor` | string | No | Continuation cursor returned by the previous call; omit for the first page. |
| `organization` | string | Yes | Organization name slug from `list_organizations`. Example: `acme`. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### List change requests for a Neki branch

**Slug:** `PLANETSCALE_LIST_NEKI_CHANGE_REQUESTS`

List change requests for a Neki branch. Sharded Neki PostgreSQL databases only; non-sharded branches may return 404.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `state` | array | No | Filter change requests by state |
| `branch` | string | Yes | Branch name from `list_branches`. Example: `main`. |
| `period` | string ("15m" | "1h" | "3h" | "6h" | "12h" | "1d" | "2d" | "7d" | "8d") | No | Filter change requests by named period |
| `database` | string | Yes | Database name slug from `list_databases`. Example: `app-db`. |
| `per_page` | integer | No | If provided, specifies the number of returned results |
| `target_id` | string | No | Filter change requests by target ID. Requires target_types |
| `next_cursor` | string | No | Continuation cursor returned by the previous call; omit for the first page. |
| `completed_at` | string | No | Filter change requests completed between two ISO 8601 timestamps |
| `organization` | string | Yes | Organization name slug from `list_organizations`. Example: `acme`. |
| `target_types` | array | No | Filter change requests by target type. Must contain one or more of: NekiAdmin, NekiCluster, NekiConfigurationProfile, NekiRouter, or NekiSidecar |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### List organization members

**Slug:** `PLANETSCALE_LIST_ORGANIZATION_MEMBERS`

List organization members.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `query` | string | No | Search term to filter members by name or email |
| `per_page` | integer | No | If provided, specifies the number of returned results |
| `next_cursor` | string | No | Continuation cursor returned by the previous call; omit for the first page. |
| `organization` | string | Yes | The name of the organization |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### List organizations

**Slug:** `PLANETSCALE_LIST_ORGANIZATIONS`

When using a service token, returns the list of organizations the service token has access to. When using an OAuth token, returns the list of organizations the user has access to.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `per_page` | integer | No | If provided, specifies the number of returned results |
| `next_cursor` | string | No | Continuation cursor returned by the previous call; omit for the first page. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### List organization SSO domains

**Slug:** `PLANETSCALE_LIST_ORGANIZATION_SSO_DOMAINS`

List email domains registered for organization SSO.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `organization` | string | Yes | Organization name slug from `list_organizations`. Example: `acme`. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### List team members

**Slug:** `PLANETSCALE_LIST_ORGANIZATION_TEAM_MEMBERS`

List team members.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `team` | string | Yes | The slug of the team |
| `per_page` | integer | No | If provided, specifies the number of returned results |
| `next_cursor` | string | No | Continuation cursor returned by the previous call; omit for the first page. |
| `organization` | string | Yes | The name of the organization |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### List teams in an organization

**Slug:** `PLANETSCALE_LIST_ORGANIZATION_TEAMS`

List teams in an organization.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `query` | string | No | Search term to filter teams by name |
| `per_page` | integer | No | If provided, specifies the number of returned results |
| `next_cursor` | string | No | Continuation cursor returned by the previous call; omit for the first page. |
| `organization` | string | Yes | The name of the organization |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### List cluster parameters

**Slug:** `PLANETSCALE_LIST_PARAMETERS`

Returns the parameters for a branch. To update the parameters, use the "update_branch_change_request" endpoint. PostgreSQL databases only.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `branch` | string | Yes | Branch name from `list_branches`. Example: `main`. |
| `database` | string | Yes | Database name slug from `list_databases`. Example: `app-db`. |
| `organization` | string | Yes | Organization name slug from `list_organizations`. Example: `acme`. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### List passwords

**Slug:** `PLANETSCALE_LIST_PASSWORDS`

List passwords. Vitess/MySQL databases only; PlanetScale returns 405 for PostgreSQL resources.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `query` | string | No | Search passwords by name |
| `branch` | string | Yes | The name of the branch the password belongs to |
| `status` | string | No | Filter passwords by status |
| `database` | string | Yes | The name of the database the password belongs to |
| `per_page` | integer | No | If provided, specifies the number of returned results |
| `next_cursor` | string | No | Continuation cursor returned by the previous call; omit for the first page. |
| `organization` | string | Yes | The name of the organization the password belongs to |
| `read_only_region_id` | string | No | A read-only region of the database branch. If present, the password results will be filtered to only those in the region |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### List available Postgres versions

**Slug:** `PLANETSCALE_LIST_POSTGRES_VERSIONS`

List the published Postgres versions available to the requested engine. PostgreSQL databases only.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `engine` | string | Yes | The database engine to list Postgres versions for. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### List read-only regions

**Slug:** `PLANETSCALE_LIST_READ_ONLY_REGIONS`

List read-only regions for the database's default branch.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `database` | string | Yes | Database name slug from `list_databases`. Example: `app-db`. |
| `per_page` | integer | No | If provided, specifies the number of returned results |
| `next_cursor` | string | No | Continuation cursor returned by the previous call; omit for the first page. |
| `organization` | string | Yes | Organization name slug from `list_organizations`. Example: `acme`. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Get read-only replica change requests

**Slug:** `PLANETSCALE_LIST_READ_ONLY_REPLICA_CHANGE_REQUESTS`

Get read-only replica change requests.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `branch` | string | Yes | Branch name from `list_branches`. Example: `main`. |
| `period` | string ("15m" | "1h" | "3h" | "6h" | "12h" | "1d" | "2d" | "7d" | "8d") | No | Filter change requests by named period |
| `database` | string | Yes | Database name slug from `list_databases`. Example: `app-db`. |
| `per_page` | integer | No | If provided, specifies the number of returned results |
| `next_cursor` | string | No | Continuation cursor returned by the previous call; omit for the first page. |
| `completed_at` | string | No | Filter change requests completed between two ISO 8601 timestamps |
| `organization` | string | Yes | Organization name slug from `list_organizations`. Example: `acme`. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### List read-only replicas

**Slug:** `PLANETSCALE_LIST_READ_ONLY_REPLICAS`

List read-only replicas.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `branch` | string | Yes | Branch name from `list_branches`. Example: `main`. |
| `database` | string | Yes | Database name slug from `list_databases`. Example: `app-db`. |
| `organization` | string | Yes | Organization name slug from `list_organizations`. Example: `acme`. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### List regions for an organization

**Slug:** `PLANETSCALE_LIST_REGIONS_FOR_ORGANIZATION`

List regions for an organization.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `per_page` | integer | No | If provided, specifies the number of returned results |
| `next_cursor` | string | No | Continuation cursor returned by the previous call; omit for the first page. |
| `organization` | string | Yes | Organization name slug from `list_organizations`. Example: `acme`. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### List roles

**Slug:** `PLANETSCALE_LIST_ROLES`

List roles. PostgreSQL databases only.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `query` | string | No | Search roles by name or username |
| `branch` | string | Yes | Branch name from `list_branches`. Example: `main`. |
| `status` | string | No | Filter roles by status |
| `database` | string | Yes | Database name slug from `list_databases`. Example: `app-db`. |
| `per_page` | integer | No | If provided, specifies the number of returned results |
| `next_cursor` | string | No | Continuation cursor returned by the previous call; omit for the first page. |
| `organization` | string | Yes | Organization name slug from `list_organizations`. Example: `acme`. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### List change requests for a Neki router

**Slug:** `PLANETSCALE_LIST_ROUTER_CHANGE_REQUESTS`

List change requests for a Neki router. Sharded Neki PostgreSQL databases only; non-sharded branches may return 404.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `branch` | string | Yes | Branch name from `list_branches`. Example: `main`. |
| `period` | string ("15m" | "1h" | "3h" | "6h" | "12h" | "1d" | "2d" | "7d" | "8d") | No | Filter change requests by named period |
| `router` | string | Yes | Name from `list_routers`. |
| `database` | string | Yes | Database name slug from `list_databases`. Example: `app-db`. |
| `per_page` | integer | No | If provided, specifies the number of returned results |
| `next_cursor` | string | No | Continuation cursor returned by the previous call; omit for the first page. |
| `completed_at` | string | No | Filter change requests completed between two ISO 8601 timestamps |
| `organization` | string | Yes | Organization name slug from `list_organizations`. Example: `acme`. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### List parameters for a Neki router

**Slug:** `PLANETSCALE_LIST_ROUTER_PARAMETERS`

List parameters for a Neki router. Sharded Neki PostgreSQL databases only; non-sharded branches may return 404.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `branch` | string | Yes | Branch name from `list_branches`. Example: `main`. |
| `router` | string | Yes | Name from `list_routers`. |
| `database` | string | Yes | Database name slug from `list_databases`. Example: `app-db`. |
| `organization` | string | Yes | Organization name slug from `list_organizations`. Example: `acme`. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### List routers for a Neki branch

**Slug:** `PLANETSCALE_LIST_ROUTERS`

List routers for a Neki branch. Sharded Neki PostgreSQL databases only; non-sharded branches may return 404.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `branch` | string | Yes | Branch name from `list_branches`. Example: `main`. |
| `database` | string | Yes | Database name slug from `list_databases`. Example: `app-db`. |
| `organization` | string | Yes | Organization name slug from `list_organizations`. Example: `acme`. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### List router size SKUs for a Neki branch

**Slug:** `PLANETSCALE_LIST_ROUTER_SIZE_SKUS`

List router size SKUs for a Neki branch. Sharded Neki PostgreSQL databases only; non-sharded branches may return 404.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `branch` | string | Yes | Branch name from `list_branches`. Example: `main`. |
| `database` | string | Yes | Database name slug from `list_databases`. Example: `app-db`. |
| `organization` | string | Yes | Organization name slug from `list_organizations`. Example: `acme`. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### List schema recommendations

**Slug:** `PLANETSCALE_LIST_SCHEMA_RECOMMENDATIONS`

List schema recommendations.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `state` | string ("open" | "closed") | No | Filter by recommendation state |
| `database` | string | Yes | Database name slug from `list_databases`. Example: `app-db`. |
| `per_page` | integer | No | If provided, specifies the number of returned results |
| `next_cursor` | string | No | Continuation cursor returned by the previous call; omit for the first page. |
| `organization` | string | Yes | Organization name slug from `list_organizations`. Example: `acme`. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### List change requests for a Neki shard configuration profile

**Slug:** `PLANETSCALE_LIST_SHARD_CONFIGURATION_PROFILE_CHANGE_REQUESTS`

List change requests for a Neki shard configuration profile. Sharded Neki PostgreSQL databases only; non-sharded branches may return 404.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `branch` | string | Yes | Branch name from `list_branches`. Example: `main`. |
| `period` | string ("15m" | "1h" | "3h" | "6h" | "12h" | "1d" | "2d" | "7d" | "8d") | No | Filter change requests by named period |
| `database` | string | Yes | Database name slug from `list_databases`. Example: `app-db`. |
| `per_page` | integer | No | If provided, specifies the number of returned results |
| `next_cursor` | string | No | Continuation cursor returned by the previous call; omit for the first page. |
| `completed_at` | string | No | Filter change requests completed between two ISO 8601 timestamps |
| `organization` | string | Yes | Organization name slug from `list_organizations`. Example: `acme`. |
| `configuration_profile` | string | Yes | Name from `list_shard_configuration_profiles`. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### List extensions for a Neki shard configuration profile

**Slug:** `PLANETSCALE_LIST_SHARD_CONFIGURATION_PROFILE_EXTENSIONS`

List extensions for a Neki shard configuration profile. Sharded Neki PostgreSQL databases only; non-sharded branches may return 404.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `branch` | string | Yes | Branch name from `list_branches`. Example: `main`. |
| `database` | string | Yes | Database name slug from `list_databases`. Example: `app-db`. |
| `organization` | string | Yes | Organization name slug from `list_organizations`. Example: `acme`. |
| `configuration_profile` | string | Yes | Name from `list_shard_configuration_profiles`. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### List parameters for a Neki shard configuration profile

**Slug:** `PLANETSCALE_LIST_SHARD_CONFIGURATION_PROFILE_PARAMETERS`

List parameters for a Neki shard configuration profile. Sharded Neki PostgreSQL databases only; non-sharded branches may return 404.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `branch` | string | Yes | Branch name from `list_branches`. Example: `main`. |
| `database` | string | Yes | Database name slug from `list_databases`. Example: `app-db`. |
| `organization` | string | Yes | Organization name slug from `list_organizations`. Example: `acme`. |
| `configuration_profile` | string | Yes | Name from `list_shard_configuration_profiles`. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### List shard configuration profiles for a Neki branch

**Slug:** `PLANETSCALE_LIST_SHARD_CONFIGURATION_PROFILES`

List shard configuration profiles for a Neki branch. Sharded Neki PostgreSQL databases only; non-sharded branches may return 404.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `branch` | string | Yes | Branch name from `list_branches`. Example: `main`. |
| `database` | string | Yes | Database name slug from `list_databases`. Example: `app-db`. |
| `organization` | string | Yes | Organization name slug from `list_organizations`. Example: `acme`. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### List shards for a Neki shard configuration profile

**Slug:** `PLANETSCALE_LIST_SHARD_CONFIGURATION_PROFILE_SHARDS`

List shards for a Neki shard configuration profile. Sharded Neki PostgreSQL databases only; non-sharded branches may return 404.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `query` | string | No | Search shards by name or display name |
| `branch` | string | Yes | Branch name from `list_branches`. Example: `main`. |
| `database` | string | Yes | Database name slug from `list_databases`. Example: `app-db`. |
| `per_page` | integer | No | If provided, specifies the number of returned results |
| `next_cursor` | string | No | Continuation cursor returned by the previous call; omit for the first page. |
| `organization` | string | Yes | Organization name slug from `list_organizations`. Example: `acme`. |
| `configuration_profile` | string | Yes | Name from `list_shard_configuration_profiles`. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### List shards for a Neki branch

**Slug:** `PLANETSCALE_LIST_SHARDS`

List shards for a Neki branch. Sharded Neki PostgreSQL databases only; non-sharded branches may return 404.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `query` | string | No | Search shards by name, display name, or configuration profile |
| `branch` | string | Yes | Branch name from `list_branches`. Example: `main`. |
| `database` | string | Yes | Database name slug from `list_databases`. Example: `app-db`. |
| `per_page` | integer | No | If provided, specifies the number of returned results |
| `next_cursor` | string | No | Continuation cursor returned by the previous call; omit for the first page. |
| `organization` | string | Yes | Organization name slug from `list_organizations`. Example: `acme`. |
| `exclude_configuration_profile` | string | No | Exclude shards in this shard configuration profile |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### List change requests for a Neki sidecar

**Slug:** `PLANETSCALE_LIST_SIDECAR_CHANGE_REQUESTS`

List change requests for a Neki sidecar. Sharded Neki PostgreSQL databases only; non-sharded branches may return 404.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `branch` | string | Yes | Branch name from `list_branches`. Example: `main`. |
| `period` | string ("15m" | "1h" | "3h" | "6h" | "12h" | "1d" | "2d" | "7d" | "8d") | No | Filter change requests by named period |
| `sidecar` | string | Yes | ID from `list_sidecars`, or the configuration profile name. |
| `database` | string | Yes | Database name slug from `list_databases`. Example: `app-db`. |
| `per_page` | integer | No | If provided, specifies the number of returned results |
| `next_cursor` | string | No | Continuation cursor returned by the previous call; omit for the first page. |
| `completed_at` | string | No | Filter change requests completed between two ISO 8601 timestamps |
| `organization` | string | Yes | Organization name slug from `list_organizations`. Example: `acme`. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### List parameters for a Neki sidecar

**Slug:** `PLANETSCALE_LIST_SIDECAR_PARAMETERS`

List parameters for a Neki sidecar. Sharded Neki PostgreSQL databases only; non-sharded branches may return 404.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `branch` | string | Yes | Branch name from `list_branches`. Example: `main`. |
| `sidecar` | string | Yes | ID from `list_sidecars`, or the configuration profile name. |
| `database` | string | Yes | Database name slug from `list_databases`. Example: `app-db`. |
| `organization` | string | Yes | Organization name slug from `list_organizations`. Example: `acme`. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### List sidecars for a Neki branch

**Slug:** `PLANETSCALE_LIST_SIDECARS`

List sidecars for a Neki branch. Sharded Neki PostgreSQL databases only; non-sharded branches may return 404.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `branch` | string | Yes | Branch name from `list_branches`. Example: `main`. |
| `database` | string | Yes | Database name slug from `list_databases`. Example: `app-db`. |
| `organization` | string | Yes | Organization name slug from `list_organizations`. Example: `acme`. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### List switchovers

**Slug:** `PLANETSCALE_LIST_SWITCHOVERS`

List switchovers. PostgreSQL databases only.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `branch` | string | Yes | Branch name from `list_branches`. Example: `main`. |
| `database` | string | Yes | Database name slug from `list_databases`. Example: `app-db`. |
| `per_page` | integer | No | If provided, specifies the number of returned results |
| `next_cursor` | string | No | Continuation cursor returned by the previous call; omit for the first page. |
| `organization` | string | Yes | Organization name slug from `list_organizations`. Example: `acme`. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### List traffic budgets

**Slug:** `PLANETSCALE_LIST_TRAFFIC_BUDGETS`

List traffic budgets. PostgreSQL databases only.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `branch` | string | Yes | Branch name from `list_branches`. Example: `main`. |
| `period` | string ("15m" | "1h" | "3h" | "6h" | "12h" | "1d" | "2d" | "7d" | "8d") | No | Time period filter |
| `database` | string | Yes | Database name slug from `list_databases`. Example: `app-db`. |
| `per_page` | integer | No | If provided, specifies the number of returned results |
| `created_at` | string | No | Filter by creation date range (format: 'start..end') |
| `fingerprint` | string | No | Filter budgets by query fingerprint |
| `next_cursor` | string | No | Continuation cursor returned by the previous call; omit for the first page. |
| `organization` | string | Yes | Organization name slug from `list_organizations`. Example: `acme`. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### List traffic budgets affecting a query fingerprint

**Slug:** `PLANETSCALE_LIST_TRAFFIC_BUDGETS_FOR_QUERY`

List traffic budgets affecting a query fingerprint. PostgreSQL databases only.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `branch` | string | Yes | Branch name from `list_branches`. Example: `main`. |
| `database` | string | Yes | Database name slug from `list_databases`. Example: `app-db`. |
| `keyspace` | string | No | Optional keyspace filter |
| `per_page` | integer | No | If provided, specifies the number of returned results |
| `fingerprint` | string | Yes | The query fingerprint |
| `next_cursor` | string | No | Continuation cursor returned by the previous call; omit for the first page. |
| `organization` | string | Yes | Organization name slug from `list_organizations`. Example: `acme`. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### List webhooks

**Slug:** `PLANETSCALE_LIST_WEBHOOKS`

List webhooks for a database.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `database` | string | Yes | The name of the database |
| `per_page` | integer | No | If provided, specifies the number of returned results |
| `next_cursor` | string | No | Continuation cursor returned by the previous call; omit for the first page. |
| `organization` | string | Yes | The name of the organization |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Get OAuth token info

**Slug:** `PLANETSCALE_OAUTH_TOKEN_INFO`

Inspect whether the current OAuth access token is active and return its scopes and expiry.

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Promote a branch

**Slug:** `PLANETSCALE_PROMOTE_BRANCH`

Promotes a branch from development to production. Vitess/MySQL databases only; PlanetScale returns 405 for PostgreSQL resources. This changes operational state and may not be safely reversible.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `branch` | string | Yes | The name of the branch |
| `database` | string | Yes | The name of the database the branch belongs to |
| `organization` | string | Yes | The name of the organization the branch belongs to |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Queue a deploy request

**Slug:** `PLANETSCALE_QUEUE_DEPLOY_REQUEST`

Queue a deploy request. Vitess/MySQL databases only; PlanetScale returns 405 for PostgreSQL resources. This changes operational state and may not be safely reversible.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `number` | integer | Yes | The number of the deploy request |
| `database` | string | Yes | The name of the deploy request's database |
| `instant_ddl` | boolean | No | Whether or not to deploy the request with instant DDL. Defaults to false. |
| `organization` | string | Yes | The name of the deploy request's organization |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Reassign objects owned by one role to another role

**Slug:** `PLANETSCALE_REASSIGN_ROLE_OBJECTS`

Reassign objects owned by one role to another role. PostgreSQL databases only. This changes operational state and may not be safely reversible.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `id` | string | Yes | The ID of the role |
| `branch` | string | Yes | Branch name from `list_branches`. Example: `main`. |
| `database` | string | Yes | Database name slug from `list_databases`. Example: `app-db`. |
| `successor` | string | Yes | The role to reassign ownership to. Accepts the role's ID, or its username with or without the branch ID suffix. |
| `organization` | string | Yes | Organization name slug from `list_organizations`. Example: `acme`. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Remove a member from an organization

**Slug:** `PLANETSCALE_REMOVE_ORGANIZATION_MEMBER`

Remove a member from an organization. This is destructive: confirm the target before calling.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `id` | string | Yes | The ID of the user |
| `organization` | string | Yes | The name of the organization |
| `delete_passwords` | boolean | No | Whether to delete all passwords associated with the member. Only available when removing other members (not yourself). |
| `delete_service_tokens` | boolean | No | Whether to delete all service tokens associated with the member. Only available when removing other members (not yourself). |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Remove a member from a team

**Slug:** `PLANETSCALE_REMOVE_ORGANIZATION_TEAM_MEMBER`

Remove a member from a team. This is destructive: confirm the target before calling.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `id` | string | Yes | The ID of the team membership or the ID of the member to remove |
| `team` | string | Yes | The slug of the team |
| `organization` | string | Yes | The name of the organization |
| `delete_passwords` | boolean | No | Whether to delete the member's passwords created through this team |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Renew a password

**Slug:** `PLANETSCALE_RENEW_PASSWORD`

Renew a password. Vitess/MySQL databases only; PlanetScale returns 405 for PostgreSQL resources. This changes operational state and may not be safely reversible.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `id` | string | Yes | The ID of the password |
| `branch` | string | Yes | The name of the branch the password belongs to |
| `database` | string | Yes | The name of the database the password belongs to |
| `organization` | string | Yes | The name of the organization the password belongs to |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Renew role expiration

**Slug:** `PLANETSCALE_RENEW_ROLE`

Renew role expiration. PostgreSQL databases only. This changes operational state and may not be safely reversible.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `id` | string | Yes | The ID of the role |
| `branch` | string | Yes | Branch name from `list_branches`. Example: `main`. |
| `database` | string | Yes | Database name slug from `list_databases`. Example: `app-db`. |
| `organization` | string | Yes | Organization name slug from `list_organizations`. Example: `acme`. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Reset default credentials

**Slug:** `PLANETSCALE_RESET_DEFAULT_ROLE`

Reset default credentials. PostgreSQL databases only. This changes operational state and may not be safely reversible.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `branch` | string | Yes | Branch name from `list_branches`. Example: `main`. |
| `database` | string | Yes | Database name slug from `list_databases`. Example: `app-db`. |
| `organization` | string | Yes | Organization name slug from `list_organizations`. Example: `acme`. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Reset a role's password

**Slug:** `PLANETSCALE_RESET_ROLE`

Reset a role's password. PostgreSQL databases only. This changes operational state and may not be safely reversible.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `id` | string | Yes | The ID of the role |
| `branch` | string | Yes | Branch name from `list_branches`. Example: `main`. |
| `database` | string | Yes | Database name slug from `list_databases`. Example: `app-db`. |
| `organization` | string | Yes | Organization name slug from `list_organizations`. Example: `acme`. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Review a deploy request

**Slug:** `PLANETSCALE_REVIEW_DEPLOY_REQUEST`

Review a deploy request by either approving or commenting on the deploy request. Vitess/MySQL databases only; PlanetScale returns 405 for PostgreSQL resources.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `body` | string | No | Deploy request review comments |
| `state` | string ("commented" | "approved") | No | Whether the review is a comment or approval. Service tokens must have corresponding access (either `approve_deploy_request` or `review_deploy_request`) |
| `number` | integer | Yes | The number of the deploy request |
| `database` | string | Yes | The name of the database the deploy request belongs to |
| `organization` | string | Yes | The name of the organization the deploy request belongs to |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Run maintenance for a Postgres branch

**Slug:** `PLANETSCALE_RUN_BRANCH_MAINTENANCE`

Run maintenance for a Postgres branch. PostgreSQL databases only. This changes operational state and may not be safely reversible.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `branch` | string | Yes | Branch name from `list_branches`. Example: `main`. |
| `database` | string | Yes | Database name slug from `list_databases`. Example: `app-db`. |
| `organization` | string | Yes | Organization name slug from `list_organizations`. Example: `acme`. |
| `update_postgres_minor_version` | boolean | No | Whether to upgrade the branch to the latest PostgreSQL minor version during maintenance. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Run maintenance for a Neki shard configuration profile

**Slug:** `PLANETSCALE_RUN_SHARD_CONFIGURATION_PROFILE_MAINTENANCE`

Run maintenance for a Neki shard configuration profile. Sharded Neki PostgreSQL databases only; non-sharded branches may return 404. This changes operational state and may not be safely reversible.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `branch` | string | Yes | Branch name from `list_branches`. Example: `main`. |
| `database` | string | Yes | Database name slug from `list_databases`. Example: `app-db`. |
| `organization` | string | Yes | Organization name slug from `list_organizations`. Example: `acme`. |
| `configuration_profile` | string | Yes | Name from `list_shard_configuration_profiles`. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Run maintenance for selected Neki shard configuration profiles

**Slug:** `PLANETSCALE_RUN_SHARD_CONFIGURATION_PROFILES_MAINTENANCE`

Run maintenance for selected Neki shard configuration profiles. Sharded Neki PostgreSQL databases only; non-sharded branches may return 404. This changes operational state and may not be safely reversible.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `branch` | string | Yes | Branch name from `list_branches`. Example: `main`. |
| `database` | string | Yes | Database name slug from `list_databases`. Example: `app-db`. |
| `organization` | string | Yes | Organization name slug from `list_organizations`. Example: `acme`. |
| `configuration_profile_names` | array | Yes | The names of the shard configuration profiles to maintain |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Set the default shard configuration profile for a Neki branch

**Slug:** `PLANETSCALE_SET_DEFAULT_SHARD_CONFIGURATION_PROFILE`

Set the default shard configuration profile for a Neki branch. Sharded Neki PostgreSQL databases only; non-sharded branches may return 404.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `branch` | string | Yes | Branch name from `list_branches`. Example: `main`. |
| `database` | string | Yes | Database name slug from `list_databases`. Example: `app-db`. |
| `organization` | string | Yes | Organization name slug from `list_organizations`. Example: `acme`. |
| `configuration_profile` | string | Yes | The name of the shard configuration profile to make the default |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Skip revert period

**Slug:** `PLANETSCALE_SKIP_REVERT_PERIOD`

Skips the revert period for a deploy request. Vitess/MySQL databases only; PlanetScale returns 405 for PostgreSQL resources. This changes operational state and may not be safely reversible.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `number` | integer | Yes | The number of the deploy request |
| `database` | string | Yes | The name of the deploy request's database |
| `organization` | string | Yes | The name of the deploy request's organization |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Test a webhook

**Slug:** `PLANETSCALE_TEST_WEBHOOK`

Sends a test event to the webhook. This changes operational state and may not be safely reversible.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `id` | string | Yes | The ID of the webhook |
| `database` | string | Yes | The name of the database |
| `organization` | string | Yes | The name of the organization |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Update the admin for a Neki branch

**Slug:** `PLANETSCALE_UPDATE_ADMIN`

Update the admin for a Neki branch. Sharded Neki PostgreSQL databases only; non-sharded branches may return 404.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `branch` | string | Yes | Branch name from `list_branches`. Example: `main`. |
| `database` | string | Yes | Database name slug from `list_databases`. Example: `app-db`. |
| `admin_size` | string | No | The admin size SKU, e.g. `NKA_0`. |
| `parameters` | object | No | Admin parameters nested by namespace (e.g., {"admin": {"recovery-poll-interval": "10s"}}) |
| `organization` | string | Yes | Organization name slug from `list_organizations`. Example: `acme`. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Update auto-apply for deploy request

**Slug:** `PLANETSCALE_UPDATE_AUTO_APPLY`

Enables or disabled the auto-apply setting for a deploy request. Vitess/MySQL databases only; PlanetScale returns 405 for PostgreSQL resources.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `enable` | boolean | No | Whether or not to enable auto-apply for the deploy request |
| `number` | integer | Yes | The number of the deploy request |
| `database` | string | Yes | The name of the deploy request's database |
| `organization` | string | Yes | The name of the deploy request's organization |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Update auto-delete branch for deploy request

**Slug:** `PLANETSCALE_UPDATE_AUTO_DELETE_BRANCH`

Enables or disabled the auto-delete branch setting for a deploy request. Vitess/MySQL databases only; PlanetScale returns 405 for PostgreSQL resources.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `enable` | boolean | No | Whether or not to enable auto-delete branch for the deploy request |
| `number` | integer | Yes | The number of the deploy request |
| `database` | string | Yes | The name of the deploy request's database |
| `organization` | string | Yes | The name of the deploy request's organization |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Update a backup

**Slug:** `PLANETSCALE_UPDATE_BACKUP`

Update a backup.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `id` | string | Yes | The ID of the backup |
| `branch` | string | Yes | The name of the branch |
| `database` | string | Yes | The name of the database the branch belongs to |
| `protected` | boolean | No | Whether the backup is protected from deletion or not |
| `organization` | string | Yes | The name of the organization the branch belongs to |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Update a backup policy

**Slug:** `PLANETSCALE_UPDATE_BACKUP_POLICY`

Update a backup policy.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `id` | string | Yes | The ID of the backup policy |
| `name` | string | No | The name of the backup policy |
| `target` | string ("production" | "development") | No | Whether the policy is for production or development branches |
| `database` | string | Yes | Database name slug from `list_databases`. Example: `app-db`. |
| `organization` | string | Yes | Organization name slug from `list_organizations`. Example: `acme`. |
| `schedule_day` | integer | No | Day of the week that the backup is scheduled. 0 is Sunday, 6 is Saturday |
| `schedule_time` | string | No | The time of day that the backup is scheduled, in HH:MM format |
| `schedule_week` | integer | No | Week of the month that the backup is scheduled. 0 is the first week, 3 is the fourth week |
| `frequency_unit` | string ("hour" | "day" | "week" | "month") | No | The unit for the frequency of the backup policy |
| `retention_unit` | string ("hour" | "day" | "week" | "month" | "year") | No | The unit for the retention period of the backup policy |
| `frequency_value` | integer | No | A number value for the frequency of the backup policy |
| `retention_value` | integer | No | A number value for the retention period of the backup policy |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Upsert a bouncer resize request

**Slug:** `PLANETSCALE_UPDATE_BOUNCER_RESIZE_REQUEST`

Upsert a bouncer resize request. PostgreSQL databases only.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `branch` | string | Yes | Branch name from `list_branches`. Example: `main`. |
| `target` | string | No | The type of server the bouncer targets. |
| `bouncer` | string | Yes | The name of the bouncer |
| `database` | string | Yes | Database name slug from `list_databases`. Example: `app-db`. |
| `parameters` | object | No | 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. |
| `bouncer_size` | string | No | The bouncer size SKU name (e.g., 'PGB_5', 'PGB_10', 'PGB_20', 'PGB_40', 'PGB_80', 'PGB_160'). Defaults to 'PGB_5'. |
| `organization` | string | Yes | Organization name slug from `list_organizations`. Example: `acme`. |
| `replicas_per_cell` | integer | No | The number of PgBouncers per availability zone. Defaults to 1. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Update a branch

**Slug:** `PLANETSCALE_UPDATE_BRANCH`

Update a branch.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `branch` | string | Yes | The name of the branch |
| `database` | string | Yes | The name of the database the branch belongs to |
| `new_name` | string | No | The name to update the branch |
| `organization` | string | Yes | The name of the organization the branch belongs to |
| `deletion_protected` | boolean | No | Whether deletion protection is enabled for the branch |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Upsert a change request for cluster size, replicas, storage, or parameters

**Slug:** `PLANETSCALE_UPDATE_BRANCH_CHANGE_REQUEST`

Upsert a change request for cluster size, replicas, storage, or parameters. PostgreSQL databases only.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `branch` | string | Yes | Branch name from `list_branches`. Example: `main`. |
| `storage` | object | No | PlanetScale body parameter `storage`. |
| `database` | string | Yes | Database name slug from `list_databases`. Example: `app-db`. |
| `replicas` | integer | No | The total number of replicas |
| `parameters` | object | No | Cluster configuration parameters nested by namespace (e.g., {"pgconf": {"max_connections": "200"}}). Use the 'List cluster parameters' endpoint to retrieve available parameters. Supported namespaces include 'patroni', 'pgconf', and 'pgbouncer'. |
| `cluster_size` | string | No | The size of the cluster. Available sizes can be found using the 'List cluster sizes' endpoint. |
| `organization` | string | Yes | Organization name slug from `list_organizations`. Example: `acme`. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Upsert a resize request

**Slug:** `PLANETSCALE_UPDATE_BRANCH_RESIZE_REQUEST`

Upsert a resize request.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `branch` | string | Yes | The name of the branch |
| `database` | string | Yes | The name of the database the branch belongs to |
| `vtgate_size` | string | No | The size of the vtgate cluster: VTG_5, VTG_10,... |
| `organization` | string | Yes | The name of the organization the branch belongs to |
| `vtgate_count` | integer | No | The number of vtgates in an availability zone |
| `vtgate_max_count` | integer | No | The maximum number of vtgates in an availability zone when autoscaling is enabled |
| `vtgate_autoscaling` | boolean | No | If autoscaling is enabled for the vtgate cluster |
| `vtgate_target_cpu_utilization` | integer | No | The target CPU utilization for the vtgate cluster when autoscaling is enabled |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Update an IP restriction entry

**Slug:** `PLANETSCALE_UPDATE_DATABASE_POSTGRES_CIDR`

Update an IP restriction entry. PostgreSQL databases only.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `id` | string | Yes | The ID of the IP restriction entry |
| `role` | string | No | The PostgreSQL role to restrict access to. Leave empty to allow access for all roles. |
| `cidrs` | array | No | List of IPv4 CIDR ranges (e.g., ['192.168.1.0/24', '192.168.1.1/32']). Only provided fields will be updated. |
| `schema` | string | No | The PostgreSQL schema to restrict access to. Leave empty to allow access to all schemas. |
| `database` | string | Yes | The name of the database |
| `description` | string | No | An optional description for the IP restriction rule. Pass an empty string to clear. |
| `organization` | string | Yes | The name of the organization the database belongs to |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Update database settings

**Slug:** `PLANETSCALE_UPDATE_DATABASE_SETTINGS`

Update database settings.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `database` | string | Yes | Database name slug from `list_databases`. Example: `app-db`. |
| `new_name` | string | No | The name to update the database to |
| `organization` | string | Yes | Organization name slug from `list_organizations`. Example: `acme`. |
| `default_branch` | string | No | The default branch of the database |
| `deletion_protected` | boolean | No | Whether deletion protection is enabled for the database |
| `migration_framework` | string | No | A migration framework to use on the database. (Vitess only) |
| `allow_data_branching` | boolean | No | Whether or not data branching is allowed on the database. (Vitess only) |
| `automatic_migrations` | boolean | No | Whether or not to copy migration data to new branches and in deploy requests. (Vitess only) |
| `insights_raw_queries` | boolean | No | Whether or not full queries should be collected from the database |
| `migration_table_name` | string | No | Name of table to use as migration table for the database. (Vitess only) |
| `restrict_branch_region` | boolean | No | Whether or not to limit branch creation to the same region as the one selected during database creation. |
| `require_approval_for_deploy` | boolean | No | Whether or not deploy requests must be approved by a database administrator other than the request creator |
| `allow_foreign_key_constraints` | boolean | No | Whether or not foreign key constraints are allowed on the database. (Vitess only) |
| `production_branch_web_console` | boolean | No | Whether or not the web console can be used on the production branch of the database |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Update database throttler configurations

**Slug:** `PLANETSCALE_UPDATE_DATABASE_THROTTLER`

Update database throttler configurations. Vitess/MySQL databases only; PlanetScale returns 405 for PostgreSQL resources.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `ratio` | integer | No | 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 |
| `database` | string | Yes | The name of the database that the throttled deploy requests belong to |
| `organization` | string | Yes | The name of the organization that the throttled deploy requests belong to |
| `configurations` | array | No | If specifying throttler ratios per keyspace, an array of { "keyspace_name": "mykeyspace", "ratio": 10 }, one for each eligible keyspace |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Set the data topology for a Neki branch

**Slug:** `PLANETSCALE_UPDATE_DATA_TOPOLOGY`

Set the data topology for a Neki branch. Sharded Neki PostgreSQL databases only; non-sharded branches may return 404.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `branch` | string | Yes | Branch name from `list_branches`. Example: `main`. |
| `database` | string | Yes | Database name slug from `list_databases`. Example: `app-db`. |
| `organization` | string | Yes | Organization name slug from `list_organizations`. Example: `acme`. |
| `data_topology` | object | Yes | The data topology JSON to set for the branch |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Update deploy request throttler configurations

**Slug:** `PLANETSCALE_UPDATE_DEPLOY_REQUEST_THROTTLER`

Update deploy request throttler configurations. Vitess/MySQL databases only; PlanetScale returns 405 for PostgreSQL resources.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `ratio` | integer | No | A throttler ratio between 0 and 95 that will apply to all keyspaces affected by the deploy request. 0 effectively disables throttler, while 95 drastically slows down migrations in the deploy request |
| `number` | integer | Yes | The number of the deploy request |
| `database` | string | Yes | The name of the deploy request's database |
| `organization` | string | Yes | The name of the deploy request's organization |
| `configurations` | array | No | If specifying throttler ratios per keyspace, an array of { "keyspace_name": "mykeyspace", "ratio": 10 }, one for each eligible keyspace |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Update an Insights Agent schedule

**Slug:** `PLANETSCALE_UPDATE_INSIGHTS_AGENT_SCHEDULE`

Update an Insights Agent schedule.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `branch` | string | Yes | Branch name from `list_branches`. Example: `main`. |
| `enabled` | boolean | No | Whether the schedule is enabled |
| `database` | string | Yes | Database name slug from `list_databases`. Example: `app-db`. |
| `run_type` | string ("review_slow_queries" | "implement_schema_recommendation") | Yes | The scheduled run type |
| `time_zone` | string | No | The IANA time zone |
| `day_of_week` | integer | No | The weekday for weekly schedules |
| `day_of_month` | integer | No | The day of month for monthly schedules |
| `organization` | string | Yes | Organization name slug from `list_organizations`. Example: `acme`. |
| `schedule_time` | string | No | The local time of day in HH:MM format |
| `frequency_unit` | string ("day" | "week" | "month") | No | The cadence unit |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Update an organization

**Slug:** `PLANETSCALE_UPDATE_ORGANIZATION`

Update an organization.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `organization` | string | Yes | Organization name slug from `list_organizations`. Example: `acme`. |
| `billing_email` | string | No | The billing email for the organization |
| `idp_managed_roles` | boolean | No | Whether or not the IdP provider is be responsible for managing roles in PlanetScale |
| `invoice_budget_amount` | integer | No | The expected monthly budget for the organization |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Update organization member role

**Slug:** `PLANETSCALE_UPDATE_ORGANIZATION_MEMBERSHIP`

Update organization member role.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `id` | string | Yes | The ID of the user |
| `role` | string | Yes | The role to assign to the member (e.g., 'admin', 'member'). Note: Cannot update your own role. Roles managed by IdP cannot be updated via API. |
| `organization` | string | Yes | The name of the organization |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Update an organization team

**Slug:** `PLANETSCALE_UPDATE_ORGANIZATION_TEAM`

Update an organization team.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `name` | string | No | The new name for the team |
| `team` | string | Yes | The slug of the team |
| `description` | string | No | The new description for the team |
| `organization` | string | Yes | The name of the organization |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Update a password

**Slug:** `PLANETSCALE_UPDATE_PASSWORD`

Update a password. Vitess/MySQL databases only; PlanetScale returns 405 for PostgreSQL resources.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `id` | string | Yes | The ID of the password |
| `name` | string | No | The name for the password |
| `cidrs` | array | No | List of IP addresses or CIDR ranges that can use this password |
| `branch` | string | Yes | The name of the branch the password belongs to |
| `database` | string | Yes | The name of the database the password belongs to |
| `organization` | string | Yes | The name of the organization the password belongs to |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Update a read-only replica

**Slug:** `PLANETSCALE_UPDATE_READ_ONLY_REPLICA`

Update a read-only replica.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `branch` | string | Yes | Branch name from `list_branches`. Example: `main`. |
| `storage` | object | No | PlanetScale body parameter `storage`. |
| `database` | string | Yes | Database name slug from `list_databases`. Example: `app-db`. |
| `replicas` | integer | No | The number of instances serving reads |
| `parameters` | object | No | Configuration parameters nested by namespace (e.g., {"pgconf": {"max_connections": "300"}}). Values must be greater than or equal to the primary's. |
| `cluster_size` | string | No | The cluster size SKU name |
| `organization` | string | Yes | Organization name slug from `list_organizations`. Example: `acme`. |
| `read_only_replica` | string | Yes | The name of the read-only replica |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Update role name

**Slug:** `PLANETSCALE_UPDATE_ROLE`

Update role name. PostgreSQL databases only.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `id` | string | Yes | The ID of the role |
| `name` | string | No | The new name of the role |
| `branch` | string | Yes | Branch name from `list_branches`. Example: `main`. |
| `database` | string | Yes | Database name slug from `list_databases`. Example: `app-db`. |
| `organization` | string | Yes | Organization name slug from `list_organizations`. Example: `acme`. |
| `require_where_on_delete` | string | No | Require WHERE clause on DELETE statements |
| `require_where_on_update` | string | No | Require WHERE clause on UPDATE statements |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Update a router for a Neki branch

**Slug:** `PLANETSCALE_UPDATE_ROUTER`

Update a router for a Neki branch. Sharded Neki PostgreSQL databases only; non-sharded branches may return 404.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `branch` | string | Yes | Branch name from `list_branches`. Example: `main`. |
| `router` | string | Yes | Name from `list_routers`. |
| `database` | string | Yes | Database name slug from `list_databases`. Example: `app-db`. |
| `parameters` | object | No | Router parameters nested by namespace (e.g., {"router": {"replication-lag-tolerable-max": "15m"}}) |
| `autoscaling` | boolean | No | Whether the router scales horizontally within each cell |
| `router_size` | string | No | The new router size for the router |
| `organization` | string | Yes | Organization name slug from `list_organizations`. Example: `acme`. |
| `replicas_per_cell` | integer | No | The new number of replicas in each cell |
| `max_replicas_per_cell` | integer | No | The maximum number of replicas in each cell when autoscaling |
| `target_cpu_utilization` | integer | No | The target average CPU utilization percentage when autoscaling |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Update safe migrations for a branch

**Slug:** `PLANETSCALE_UPDATE_SAFE_MIGRATIONS`

Update safe migrations for a branch. Vitess/MySQL databases only; PlanetScale returns 405 for PostgreSQL resources.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `branch` | string | Yes | The name of the branch |
| `database` | string | Yes | The name of the database the branch belongs to |
| `organization` | string | Yes | The name of the organization the branch belongs to |
| `safe_migrations` | boolean | Yes | Whether safe migrations are enabled |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Update a shard for a Neki branch

**Slug:** `PLANETSCALE_UPDATE_SHARD`

Update a shard for a Neki branch. Sharded Neki PostgreSQL databases only; non-sharded branches may return 404.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `id` | string | Yes | The ID of the shard |
| `branch` | string | Yes | Branch name from `list_branches`. Example: `main`. |
| `database` | string | Yes | Database name slug from `list_databases`. Example: `app-db`. |
| `organization` | string | Yes | Organization name slug from `list_organizations`. Example: `acme`. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Update a shard configuration profile for a Neki branch

**Slug:** `PLANETSCALE_UPDATE_SHARD_CONFIGURATION_PROFILE`

Update a shard configuration profile for a Neki branch. Sharded Neki PostgreSQL databases only; non-sharded branches may return 404.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `name` | string | No | The new name for the shard configuration profile |
| `branch` | string | Yes | Branch name from `list_branches`. Example: `main`. |
| `storage` | object | No | PlanetScale body parameter `storage`. |
| `database` | string | Yes | Database name slug from `list_databases`. Example: `app-db`. |
| `replicas` | integer | No | The new number of replicas for the shard configuration profile |
| `extensions` | array | No | Extensions to enable. This replaces the current set; omit it to leave them unchanged. |
| `parameters` | object | No | Configuration profile parameters nested by namespace (e.g., {"pgconf": {"max_connections": "200"}}). |
| `cluster_size` | string | No | The new cluster size for the shard configuration profile |
| `organization` | string | Yes | Organization name slug from `list_organizations`. Example: `acme`. |
| `configuration_profile` | string | Yes | Name from `list_shard_configuration_profiles`. |
| `postgres_major_version` | string | No | The PostgreSQL major version for the shard configuration profile |
| `postgres_minor_version` | string | No | The PostgreSQL minor version for the shard configuration profile. Requires postgres_major_version when specified. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Update a shard in a Neki shard configuration profile

**Slug:** `PLANETSCALE_UPDATE_SHARD_CONFIGURATION_PROFILE_SHARD`

Update a shard in a Neki shard configuration profile. Sharded Neki PostgreSQL databases only; non-sharded branches may return 404.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `id` | string | Yes | The ID of the shard |
| `branch` | string | Yes | Branch name from `list_branches`. Example: `main`. |
| `database` | string | Yes | Database name slug from `list_databases`. Example: `app-db`. |
| `display_name` | string | No | The display name of the shard |
| `organization` | string | Yes | Organization name slug from `list_organizations`. Example: `acme`. |
| `configuration_profile` | string | Yes | Name from `list_shard_configuration_profiles`. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Update a sidecar for a Neki branch

**Slug:** `PLANETSCALE_UPDATE_SIDECAR`

Update a sidecar for a Neki branch. Sharded Neki PostgreSQL databases only; non-sharded branches may return 404.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `branch` | string | Yes | Branch name from `list_branches`. Example: `main`. |
| `sidecar` | string | Yes | ID from `list_sidecars`, or the configuration profile name. |
| `database` | string | Yes | Database name slug from `list_databases`. Example: `app-db`. |
| `parameters` | object | No | Sidecar parameters nested by namespace (e.g., {"sidecar": {"pool-capacity": "100"}}) |
| `organization` | string | Yes | Organization name slug from `list_organizations`. Example: `acme`. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Update a traffic budget

**Slug:** `PLANETSCALE_UPDATE_TRAFFIC_BUDGET`

Update a traffic budget. PostgreSQL databases only.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `id` | string | Yes | The ID of the traffic budget |
| `mode` | string ("enforce" | "warn" | "off") | No | The mode of the traffic budget |
| `name` | string | No | Name of the traffic budget |
| `rate` | integer | No | The rate at which capacity refills, as a percentage of server resources (0-100). Unlimited when not set. |
| `burst` | integer | No | The maximum capacity a single query can consume, measured as a percentage of seconds of full server usage (0-6000). Unlimited when not set. |
| `rules` | array | No | Array of traffic rules to apply to the budget |
| `branch` | string | Yes | Branch name from `list_branches`. Example: `main`. |
| `capacity` | integer | No | The maximum capacity that can be banked, measured as a percentage of seconds of full server usage (0-6000). Unlimited when not set. |
| `database` | string | Yes | Database name slug from `list_databases`. Example: `app-db`. |
| `concurrency` | integer | No | The percentage of available worker processes this policy can use (0-100). Unlimited when not set. |
| `organization` | string | Yes | Organization name slug from `list_organizations`. Example: `acme`. |
| `warning_threshold` | integer | No | A percentage of capacity, burst, or concurrency thresholds to emit warnings for enforced budgets (0-100). |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Update a webhook

**Slug:** `PLANETSCALE_UPDATE_WEBHOOK`

Update a webhook.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `id` | string | Yes | The ID of the webhook |
| `url` | string | No | The URL the webhook will send events to |
| `events` | array | No | The events this webhook should subscribe to |
| `enabled` | boolean | No | Whether the webhook should be enabled |
| `database` | string | Yes | The name of the database |
| `organization` | string | Yes | The name of the organization |
| `authorization_header` | string | No | The value to send in the Authorization header |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |
