Skip to main content
GET
List branches

Authorizations

Authorization
string
header
required

The access token received from the authorization server in the OAuth 2.0 flow.

FlowAuthorization Code
Authorization URL
https://app.planetscale.com/oauth/authorize
Token URL
https://auth.planetscale.com/oauth/token

Path Parameters

organization
string
required

Organization name slug from list_organizations. Example: acme.

database
string
required

Database name slug from list_databases. Example: app-db.

Query Parameters

q
string

Search branches by name

production
boolean

Filter branches by production status

safe_migrations
boolean

Filter branches by safe migrations (DDL protection)

order
enum<string>

Order branches by created_at time

Available options:
asc,
desc
page
integer
default:1

If provided, specifies the page offset of returned results

per_page
integer
default:25

If provided, specifies the number of returned results

Response

Returns database branches

type
string
required

The response type. Always "list" for paginated responses.

current_page
integer
required

The current page number

per_page
integer
required

The maximum number of results per page

next_page
integer | null
required

The next page number, or null when this is the last page

next_page_url
string | null
required

The next page of results, or null when this is the last page

prev_page
integer | null
required

The previous page number, or null when this is the first page

prev_page_url
string | null
required

The previous page of results, or null when this is the first page

total_count
integer
required

The total number of matching results

total_pages
integer
required

The total number of pages of matching results

data
object[]
required