List branches

Retrieves a list of branches for the specified project. You can obtain a project_id by listing the projects for your Neon account.

Each Neon project has a root branch named main. A branch_id value has a br- prefix. A project may contain child branches that were branched from main or from another branch. A parent branch is identified by the parent_id value, which is the id of the parent branch. For related information, see Manage branches.

Path Params
string
required

The Neon project ID

Query Params
string

Search by branch name or id. You can specify partial name or id values to filter results.

string
enum
Defaults to updated_at

Sort the branches by sort_field. If not provided, branches will be sorted by updated_at descending order

Allowed:
string

A cursor to use in pagination. A cursor defines your place in the data list. Include response.pagination.next in subsequent API calls to fetch next page of the list.

string
enum
Defaults to desc

Defines the sorting order of entities.

Allowed:
integer
1 to 10000

The maximum number of records to be returned in the response

boolean
Defaults to false

If true, return recoverable deleted branches too (soft-deleted within the recovery window). If false or not provided, return only active (non-deleted) branches.

This parameter is part of the Branch Recovery feature, which is in preview and not available to all users.

Responses

Language
Credentials
LoadingLoading…
Response
Click Try It! to start a request and see the response here! Or choose an example:
application/json