Branches
discardDatabaseBranch
Discard a sandbox branch
Marks an ephemeral sandbox branch as discarded for teardown.
Usage
const result = await api.branches.discardDatabaseBranch({
pathParams: { project_id: "prj_xxx", branch_id: "brn_xxx" },
});Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| pathParams.project_id | string | Yes | Unique project identifier (prefixed, e.g. prj_xxx). |
| pathParams.branch_id | string | Yes | Unique sandbox branch identifier (prefixed, e.g. brn_xxx). |
Response
Promise<void> — no content.
Example
import { PgBeamClient } from "pgbeam";
const client = new PgBeamClient({
token: "pbk_...",
baseUrl: "https://api.pgbeam.com",
});
const result = await client.api.branches.discardDatabaseBranch({
pathParams: { project_id: "prj_xxx", branch_id: "brn_xxx" },
});Errors
| Status | Description |
|---|---|
| 400 | Invalid request parameters. |
| 401 | Missing or invalid authentication. |
| 403 | Operation not allowed by current plan limits. |
| 404 | Resource not found. |