You can use the PlanetScale API to manage your PlanetScale databases programmatically. The PlanetScale API is currently in beta. You can integrate the PlanetScale API into your existing workflows and tools. See the Use cases section for more ideas.
The PlanetScale API does not include direct access to the data in the database. Some endpoints will consist of database schema information or connection information.
While in beta, endpoints are subject to change as we make improvements and updates.
Before making your first API call, set up the proper authentication for the PlanetScale API using the
Authorization header. There are two API authentication types: Service tokens and OAuth.
Most endpoints only need a service token for authentication, but some organization-specific endpoints also need OAuth. Each endpoint will state what types of authentication are allowed. See the Service tokens documentation for creating a service token and making your first API call with the PlanetScale API.
All OAuth applications have a comprehensive list of scopes that the application can request from the PlanetScale user. See the OAuth documentation for more info.
OAuth applications are currently in limited beta. If you are interested in building on top of PlanetScale and allowing your users to authenticate with PlanetScale to gain management access to their organizations and databases, sign up for the limited beta in your PlanetScale organization's Settings > Beta features page. Our team will reach out with more information.