PgBeam Docs
Branches

listDatabaseBranches

List sandbox branches

Lists ephemeral sandbox branches for the project's databases.

Usage

const result = await api.branches.listDatabaseBranches({
  pathParams: { project_id: "prj_xxx" },
});

Parameters

ParameterTypeRequiredDescription
pathParams.project_idstringYesUnique project identifier (prefixed, e.g. prj_xxx).
queryParams.status"pending" | "ready" | "error" | "discarded"NoFilter to a single status.
queryParams.page_sizenumberNoMaximum number of items to return (1-100, default 20).
queryParams.page_tokenstringNoOpaque token for cursor-based pagination.

Response

Promise<ListDatabaseBranchesResponse> — page of sandbox branches.

Example

import { PgBeamClient } from "pgbeam";

const client = new PgBeamClient({
  token: "pbk_...",
  baseUrl: "https://api.pgbeam.com",
});

const result = await client.api.branches.listDatabaseBranches({
  pathParams: { project_id: "prj_xxx" },
  queryParams: { status: "open", page_size: 20, page_token: "..." },
});

Errors

StatusDescription
400Invalid request parameters.
401Missing or invalid authentication.
403Operation not allowed by current plan limits.
404Resource not found.
429Rate limited. Try again later.

On this page