PlanetScale is a MySQL-compatible serverless database platform. The PlanetScale Cloud API lets you manage organizations, databases, branches, backups, connection passwords, deploy requests, roles, and related resources programmatically. This connector uses the PlanetScale Cloud API to read those resources into Nexla and to create and manage them from your Nexla flows.
Power end-to-end data operations for your PlanetScale API with Nexla. Our bi-directional PlanetScale connector is purpose-built for PlanetScale, making it simple to ingest data, sync it across systems, and deliver it anywhere — all with no coding required. Nexla turns API-sourced data into ready-to-use, reusable data products and makes it easy to send data to PlanetScale or any other destination. With comprehensive monitoring, lineage tracking, and access controls, Nexla keeps your PlanetScale workflows fast, secure, and fully governed.
Features
Type: API
SourceDestination
Seamless API Integration: Connect to any endpoint as source or destination without coding, with automatic data product creation
Visual Composition & Chaining: Build complex integrations using visual templates, chain API calls, and compose workflows with data validation and filtering
API Proxy: Expose curated slices of your data securely with a secure and customizable API proxy that validates and transforms data on the fly
Request optimization with intelligent batching, retry, and caching to minimize API calls and costs
Before creating a PlanetScale credential, you need a PlanetScale service token. The PlanetScale Cloud API authenticates each request with a service token, which is made up of two parts — a token ID and a token value — combined into a single Authorization header formatted as <token_id>:<token> (with no authentication scheme prefix).
To create a service token:
Sign in to the PlanetScale dashboard and select the organization you want to work with.
Navigate to Settings > Service tokens, then click New service token.
Enter a name for the token and create it. The dialog displays both the token ID and the token value. Copy both immediately — the token value cannot be retrieved again after you leave the page.
Grant the token the access it needs. Use Add organization permissions for organization-wide operations, and Add database access to grant permissions on specific databases. Organization administrators can also grant access to all current and future databases.
Combine the two parts into the service token string in the form <token_id>:<token> for use in your Nexla credential.
PlanetScale service token, formatted as '<token_id>:<token>'. Create one at Organization Settings > Service Tokens and grant it the required organization/database access.
After selecting the data source/destination type, click the Add Credential tile to open the Add New Credential overlay.
Enter a name for the credential in the Credential Name field and a short, meaningful description in the Credential Description field.
Enter your PlanetScale service token in the Service Token field, formatted as <token_id>:<token> — the token ID and token value from Prerequisites, joined with a colon. This value is sent in the Authorization header on every request to the PlanetScale Cloud API.
The service token grants access to your PlanetScale organization and databases according to the permissions you assigned when creating it. Treat it as sensitive information. If a token is compromised, delete it from Settings > Service tokens in the PlanetScale dashboard and issue a new one.
Click the Save button at the bottom of the overlay. The newly added credential will now appear in a tile on the Authenticate screen during data source/destination creation.
To create a new data flow, navigate to the Integrate section, and click the New Data Flow button. Select the PlanetScale connector tile, then select the credential that will be used to connect to PlanetScale, and click Next; or, create a new PlanetScale credential for use in this flow.
Nexla provides pre-built templates that can be used to rapidly configure data sources to ingest data from common PlanetScale endpoints. Select the endpoint from which this source will fetch data from the Endpoint pulldown menu. Available endpoint templates are listed in the expandable boxes below.
[Rest API] List Organizations
List organizations the service token/user can access.
[Rest API] Get Organization
Get details of a single organization.
Organization (required) — PlanetScale organization name slug (from GET /organizations).
[Rest API] List Databases
List databases in the organization.
Organization (required) — PlanetScale organization name slug (from GET /organizations).
[Rest API] Get Database
Get details of a single database.
Organization (required) — PlanetScale organization name slug (from GET /organizations).
Database (required) — PlanetScale database name (from GET /organizations/{organization}/databases).
[Rest API] List Branches
List branches of a database.
Organization (required) — PlanetScale organization name slug (from GET /organizations).
Database (required) — PlanetScale database name (from GET /organizations/{organization}/databases).
[Rest API] Get Branch
Get details of a single branch.
Organization (required) — PlanetScale organization name slug (from GET /organizations).
Database (required) — PlanetScale database name (from GET /organizations/{organization}/databases).
Branch (required) — PlanetScale database branch name (from GET .../databases/{database}/branches).
[Rest API] List Backups
List backups for a branch.
Organization (required) — PlanetScale organization name slug (from GET /organizations).
Database (required) — PlanetScale database name (from GET /organizations/{organization}/databases).
Branch (required) — PlanetScale database branch name (from GET .../databases/{database}/branches).
[Rest API] Get Backup
Get a single backup.
Organization (required) — PlanetScale organization name slug (from GET /organizations).
Database (required) — PlanetScale database name (from GET /organizations/{organization}/databases).
Branch (required) — PlanetScale database branch name (from GET .../databases/{database}/branches).
ID (required) — Resource ID within the parent branch/database.
[Rest API] List Backup Policies
List automated backup policies for a database.
Organization (required) — PlanetScale organization name slug (from GET /organizations).
Database (required) — PlanetScale database name (from GET /organizations/{organization}/databases).
[Rest API] List Passwords
List connection passwords for a branch.
Organization (required) — PlanetScale organization name slug (from GET /organizations).
Database (required) — PlanetScale database name (from GET /organizations/{organization}/databases).
Branch (required) — PlanetScale database branch name (from GET .../databases/{database}/branches).
[Rest API] Get Password
Get a single connection password.
Organization (required) — PlanetScale organization name slug (from GET /organizations).
Database (required) — PlanetScale database name (from GET /organizations/{organization}/databases).
Branch (required) — PlanetScale database branch name (from GET .../databases/{database}/branches).
ID (required) — Resource ID within the parent branch/database.
[Rest API] List Deploy Requests
List schema deploy requests for a database.
Organization (required) — PlanetScale organization name slug (from GET /organizations).
Database (required) — PlanetScale database name (from GET /organizations/{organization}/databases).
[Rest API] Get Deploy Request
Get a single deploy request.
Organization (required) — PlanetScale organization name slug (from GET /organizations).
Database (required) — PlanetScale database name (from GET /organizations/{organization}/databases).
Number (required) — Deploy request or workflow number within the database.
[Rest API] List Deploy Operations
List operations for a deploy request.
Organization (required) — PlanetScale organization name slug (from GET /organizations).
Database (required) — PlanetScale database name (from GET /organizations/{organization}/databases).
Number (required) — Deploy request or workflow number within the database.
[Rest API] Get Deploy Queue
Get the deploy queue for a database.
Organization (required) — PlanetScale organization name slug (from GET /organizations).
Database (required) — PlanetScale database name (from GET /organizations/{organization}/databases).
[Rest API] List Roles
List Postgres roles (credentials) for a branch.
Organization (required) — PlanetScale organization name slug (from GET /organizations).
Database (required) — PlanetScale database name (from GET /organizations/{organization}/databases).
Branch (required) — PlanetScale database branch name (from GET .../databases/{database}/branches).
[Rest API] Get Role
Get a single role.
Organization (required) — PlanetScale organization name slug (from GET /organizations).
Database (required) — PlanetScale database name (from GET /organizations/{organization}/databases).
Branch (required) — PlanetScale database branch name (from GET .../databases/{database}/branches).
ID (required) — Resource ID within the parent branch/database.
[Rest API] List Keyspaces
List keyspaces (shards) for a branch.
Organization (required) — PlanetScale organization name slug (from GET /organizations).
Database (required) — PlanetScale database name (from GET /organizations/{organization}/databases).
Branch (required) — PlanetScale database branch name (from GET .../databases/{database}/branches).
[Rest API] Get Keyspace
Get a single keyspace.
Organization (required) — PlanetScale organization name slug (from GET /organizations).
Database (required) — PlanetScale database name (from GET /organizations/{organization}/databases).
Branch (required) — PlanetScale database branch name (from GET .../databases/{database}/branches).
Keyspace (required) — Keyspace name within the branch.
[Rest API] List Webhooks
List webhooks configured for a database.
Organization (required) — PlanetScale organization name slug (from GET /organizations).
Database (required) — PlanetScale database name (from GET /organizations/{organization}/databases).
[Rest API] Get Webhook
Get a single webhook.
Organization (required) — PlanetScale organization name slug (from GET /organizations).
Database (required) — PlanetScale database name (from GET /organizations/{organization}/databases).
ID (required) — Resource ID within the parent branch/database.
[Rest API] List Workflows
List online-migration workflows for a database.
Organization (required) — PlanetScale organization name slug (from GET /organizations).
Database (required) — PlanetScale database name (from GET /organizations/{organization}/databases).
[Rest API] Get Workflow
Get a single workflow.
Organization (required) — PlanetScale organization name slug (from GET /organizations).
Database (required) — PlanetScale database name (from GET /organizations/{organization}/databases).
Number (required) — Deploy request or workflow number within the database.
[Rest API] List Organization Members
List members of the organization.
Organization (required) — PlanetScale organization name slug (from GET /organizations).
[Rest API] List Invoices
List billing invoices for the organization.
Organization (required) — PlanetScale organization name slug (from GET /organizations).
[Rest API] List Organization Regions
List regions available to the organization.
Organization (required) — PlanetScale organization name slug (from GET /organizations).
[Rest API] Get Current User
Get the current authenticated user/service token identity.
[Rest API] List Service Tokens
List service tokens for the organization.
Organization (required) — PlanetScale organization name slug (from GET /organizations).
Once the selected endpoint template has been configured, click the Test button to the right of the endpoint selection menu to retrieve a sample of the data that will be fetched. Sample data will be displayed in the Endpoint Test Result panel on the right, allowing you to verify that the source is configured correctly before saving.
PlanetScale data sources can also be manually configured to ingest data from any valid PlanetScale Cloud API endpoint, including endpoints not covered by the pre-built templates, chained API calls, or custom request parameters. Select the Advanced tab at the top of the configuration screen, and follow the instructions in Connect to Any API to configure the API method, endpoint URL, date/time and lookup macros, path to data, metadata, and request headers.
PlanetScale Cloud API endpoints are rooted at https://api.planetscale.com/v1/. List endpoints return records under the data array and page through results using the next_page_url field, which Nexla follows automatically.
Once all of the relevant settings have been configured, click the Create button in the upper right corner of the screen to save and create the new PlanetScale data source. Nexla will now begin ingesting data from the configured endpoint and will organize any data that it finds into one or more Nexsets.
Click the + icon on the Nexset that will be sent to the PlanetScale destination, and select the Send to Destination option from the menu. Select the PlanetScale connector from the list of available destination connectors, then select the credential that will be used to connect to PlanetScale, and click Next; or, create a new PlanetScale credential for use in this flow.
Nexla provides pre-built templates that can be used to rapidly configure destinations to send data to common PlanetScale endpoints. Select the endpoint to which data will be sent from the Endpoint pulldown menu. Then, click on the template in the list below to expand it, and follow the instructions to configure additional endpoint settings.
[Rest API] Create Database
Create a new database in the organization.
Organization (required) — PlanetScale organization name slug (from GET /organizations).
[Rest API] Update Database Settings
Update settings for an existing database.
Organization (required) — PlanetScale organization name slug (from GET /organizations).
Database (required) — PlanetScale database name (from GET /organizations/{organization}/databases).
[Rest API] Delete Database
Delete a database.
Organization (required) — PlanetScale organization name slug (from GET /organizations).
Database (required) — PlanetScale database name (from GET /organizations/{organization}/databases).
[Rest API] Create Branch
Create a new branch of a database.
Organization (required) — PlanetScale organization name slug (from GET /organizations).
Database (required) — PlanetScale database name (from GET /organizations/{organization}/databases).
[Rest API] Delete Branch
Delete a database branch.
Organization (required) — PlanetScale organization name slug (from GET /organizations).
Database (required) — PlanetScale database name (from GET /organizations/{organization}/databases).
Branch (required) — PlanetScale database branch name (from GET .../databases/{database}/branches).
[Rest API] Create Backup
Create a new backup of a branch.
Organization (required) — PlanetScale organization name slug (from GET /organizations).
Database (required) — PlanetScale database name (from GET /organizations/{organization}/databases).
Branch (required) — PlanetScale database branch name (from GET .../databases/{database}/branches).
[Rest API] Delete Backup
Delete a backup.
Organization (required) — PlanetScale organization name slug (from GET /organizations).
Database (required) — PlanetScale database name (from GET /organizations/{organization}/databases).
Branch (required) — PlanetScale database branch name (from GET .../databases/{database}/branches).
ID (required) — Resource ID within the parent branch/database.
[Rest API] Create Password
Create a new connection password for a branch.
Organization (required) — PlanetScale organization name slug (from GET /organizations).
Database (required) — PlanetScale database name (from GET /organizations/{organization}/databases).
Branch (required) — PlanetScale database branch name (from GET .../databases/{database}/branches).
[Rest API] Delete Password
Delete a connection password.
Organization (required) — PlanetScale organization name slug (from GET /organizations).
Database (required) — PlanetScale database name (from GET /organizations/{organization}/databases).
Branch (required) — PlanetScale database branch name (from GET .../databases/{database}/branches).
ID (required) — Resource ID within the parent branch/database.
[Rest API] Create Deploy Request
Create a schema deploy request from a branch.
Organization (required) — PlanetScale organization name slug (from GET /organizations).
Database (required) — PlanetScale database name (from GET /organizations/{organization}/databases).
[Rest API] Queue Deploy Request
Queue a deploy request for deployment.
Organization (required) — PlanetScale organization name slug (from GET /organizations).
Database (required) — PlanetScale database name (from GET /organizations/{organization}/databases).
Number (required) — Deploy request or workflow number within the database.
[Rest API] Create Webhook
Create a webhook for a database.
Organization (required) — PlanetScale organization name slug (from GET /organizations).
Database (required) — PlanetScale database name (from GET /organizations/{organization}/databases).
PlanetScale destinations can also be manually configured to send data to any valid PlanetScale Cloud API endpoint. Select the Advanced tab at the top of the configuration screen, and follow the instructions in Connect to Any API to configure the API method, data format, endpoint URL, request headers, attribute exclusions, record batching, and response webhooks.
PlanetScale write operations expect a JSON request body whose fields match the target resource in the PlanetScale Cloud API. For update and delete operations, include the relevant resource identifier (organization, database, branch, or resource ID) in the endpoint path.
Once all endpoint settings have been configured, click the Done button in the upper right corner of the screen to save and create the destination. To send the data to the configured PlanetScale endpoint, open the destination resource menu, and select Activate.
The Nexset data will not be sent to the PlanetScale endpoint until the destination is activated. Destinations can be activated immediately or at a later time, providing full control over data movement.