ListBranches

更新时间:
复制 MD 格式

Query the branch list of a Supabase project.

Operation description

This API is used to query all branches under a specified Supabase project with pagination, supporting filtering by parent branch, keyword, and sorting conditions.

Try it now

Try this API in OpenAPI Explorer, no manual signing needed. Successful calls auto-generate SDK code matching your parameters. Download it with built-in credential security for local usage.

Test

RAM authorization

No authorization for this operation. If you encounter issues with this operation, contact technical support.

Request parameters

Parameter

Type

Required

Description

Example

RegionId

string

No

The region ID. Must be specified when creating a primary branch. When creating a sub-branch, it inherits the region of the primary branch by default.

cn-beijing

PageSize

integer

No

The number of records per page.

Valid values:

  • 10

  • 20

  • 50

  • 100

Default value: 20.

20

PageNumber

integer

No

The page number. The value must be greater than 0. Default value: 1.

1

ParentBranchId

string

No

The parent branch ID, used to specify the parent branch for a new branch or as a query filter condition.

br-main

Search

string

No

The search keyword. Supports fuzzy search by branch ID or branch name.

main

SortBy

string

No

The sort field.

Valid values:

  • BranchName: Sort by branch name.

  • CreateTime: Sort by creation time.

  • LastRunTime: Sort by last run time.

Default value: CreateTime.

CreateTime

SortOrder

string

No

The sort direction.

Valid values:

  • Asc: Ascending order.

  • Desc: Descending order.

Default value: Desc.

Desc

NextToken

string

No

The pagination token. It is not required for the first query. For subsequent queries, use the NextToken returned from the previous query.

caeba0bbb2be03f84eb48b699f0a4883

MaxResults

integer

No

The maximum number of records to return in this query.

20

Response elements

Element

Type

Description

Example

object

The response object.

RequestId

string

The request ID.

ABB39CC3-4488-4857-905D-2E4A051D****

TotalCount

integer

The total number of branches that match the query conditions.

20

PageNumber

integer

The page number. The value must be greater than 0. Default value: 1.

1

PageSize

integer

The number of records per page.

Valid values:

  • 10

  • 20

  • 50

  • 100

Default value: 20.

20

Branches

object

Branch

array<object>

The list of branches. Each element represents a Supabase branch.

array<object>

The response object.

BranchId

string

br-xxxx

BranchName

string

dev

IsDefault

boolean

true

Description

string

test branch

ParentBranchName

string

main

ParentBranchId

string

br-main

ServiceType

string

Supabase

ProjectId

string

spb-xxxx

CreateTime

string

2026-04-08T09:11:12Z

Status

string

Running

Tags

object

Tag

array<object>

object

Key

string

env

Value

string

dev

ExpiresAt

string

2026-10-08T09:11:12Z

InitSource

string

ParentData

Protected

boolean

false

ParentTimestamp

string

2026-04-08T09:11:12Z

ParentLSN

string

0/3522648

MaxResults

integer

The maximum number of records returned in this query.

20

NextToken

string

The pagination token. It is not required for the first query. For subsequent queries, use the NextToken returned from the previous query.

caeba0bbb2be03f84eb48b699f0a4883

Examples

Success response

JSON format

{
  "RequestId": "ABB39CC3-4488-4857-905D-2E4A051D****",
  "TotalCount": 20,
  "PageNumber": 1,
  "PageSize": 20,
  "Branches": {
    "Branch": [
      {
        "BranchId": "br-xxxx",
        "BranchName": "dev",
        "IsDefault": true,
        "Description": "test branch",
        "ParentBranchName": "main",
        "ParentBranchId": "br-main",
        "ServiceType": "Supabase",
        "ProjectId": "spb-xxxx",
        "CreateTime": "2026-04-08T09:11:12Z",
        "Status": "Running",
        "Tags": {
          "Tag": [
            {
              "Key": "env",
              "Value": "dev"
            }
          ]
        },
        "ExpiresAt": "2026-10-08T09:11:12Z",
        "InitSource": "ParentData",
        "Protected": false,
        "ParentTimestamp": "2026-04-08T09:11:12Z",
        "ParentLSN": "0/3522648"
      }
    ]
  },
  "MaxResults": 20,
  "NextToken": "caeba0bbb2be03f84eb48b699f0a4883"
}

Error codes

See Error Codes for a complete list.

Release notes

See Release Notes for a complete list.