Skip to content
Maua.Culturewire

PlanetScale

Databases, branches, deploy requests, schema and insights

Developer toolsCatalog2 tools · 0 triggers

Managed auth

Authentication

Methods your end users can connect with. Credentials are stored encrypted, and secret values are never shown again or returned by the API.

  • API key

    Your users enter

    • Service token IDRequired
    • Service token (pscale_tkn_…)SecretRequired

    Where to find them

    1. In app.planetscale.com, in your organization → “Settings” → “Service tokens” → “New service token”: give it a name and click “Create service token”.
    2. Copy the ID and the token (pscale_tkn_…): the token is shown only once.
    3. Grant just the right permissions: on the organization, read_organization and read_databases; on each database you want to query, read_database, read_branch and read_deploy_request (create_branch or create_deploy_request only if you will make changes).
  • OAuth 2.0

    PKCEYour OAuth app

    Bring your own OAuth app: register one with PlanetScale, then create a custom auth config with its client ID and secret and our redirect URI. Setup guide

    Registering the OAuth app

    1. In app.planetscale.com open your organization → “Settings” → “OAuth applications” → “Create new application”.
    2. Name it “Maua.Culturewire”. In “Domain” enter the origin of the redirect URI shown below (what comes before /oauth/callback) and in “Redirect URI”, that full URI.
    3. In “Save access scopes” select read_user, read_organizations, read_organization, read_databases, read_branches, read_deploy_requests, read_backups, read_members and read_invoices (and the write_… or create_… ones you need to make changes) and save.
    4. Copy the “Client ID” and the “Client secret” (it is shown only once). When connecting, the user chooses which organizations to give access to.

    Default scopes

    No scopes required

Tools (2)

  • PlanetScale API requestPLANETSCALE_SEND_REQUEST

    Authenticated call to the PlanetScale API (https://api.planetscale.com/v1). Any endpoint of the API is allowed. Examples: GET /organizations, GET /organizations/{org}/databases, GET /organizations/{org}/databases/{db}, GET /organizations/{org}/databases/{db}/branches, GET /organizations/{org}/databases/{db}/branches/{branch}/schema, GET /organizations/{org}/databases/{db}/branches/{branch}/schema/lint, GET /organizations/{org}/databases/{db}/deploy-requests?state=open, POST /organizations/{org}/databases/{db}/deploy-requests {"branch": "…", "into_branch": "main"}, GET /organizations/{org}/databases/{db}/branches/{branch}/backups, GET /organizations/{org}/databases/{db}/branches/{branch}/insights (most expensive queries), GET /organizations/{org}/databases/{db}/schema-recommendations, GET /organizations/{org}/members, GET /organizations/{org}/invoices, GET /organizations/{org}/audit-log. Pagination: page and per_page (follow next_page).

    Required scopes

    No scopes required

    Input

    PlanetScale API request input
    NameTypeDescription
    methodstringHTTP methodOne of: GET, POST, PUT, PATCH, DELETEDefault: "GET"
    pathrequiredstringPath relative to the API base URL, or a full URL on the same API (e.g. a next-page link)
    queryobjectQuery string parameters
    bodyunknownJSON body
    formobjectBody as application/x-www-form-urlencoded instead of JSON
    body_base64stringBinary body, base64 (at most 960000 characters)
    content_typestringContent-Type of body_base64
    headersobjectExtra headers such as Accept. Authentication is added automatically.
  • DatabasesPLANETSCALE_LIST_DATABASES

    Databases of an organization with engine (MySQL/Vitess or Postgres), status, region, plan, default branch, number of branches, pending schema recommendations, deletion protection and link.

    Required scopes

    No scopes required

    Input

    Databases input
    NameTypeDescription
    organizationrequiredstringOrganization name (GET /organizations lists them)
    searchstringPart of the database name
    maxintegerDefault: 50
    pageintegerDefault: 1