PgBeam Docs
Databases

getSchemaCatalog

Read a database's schema catalog

Connects to the upstream database read-only and returns its user relations (tables and views) and columns. Powers table/column autocomplete and view-aware warnings in the policy editor — relation kind distinguishes a view (whose masking/row-filters apply to the view itself, not its base tables) from a base table, and a per-column is_binary flag flags columns that mask to NULL. System schemas are excluded; nothing is persisted.

Usage

const result = await api.databases.getSchemaCatalog({
  pathParams: { project_id: "prj_xxx", database_id: "db_xxx" },
});

Parameters

ParameterTypeRequiredDescription
pathParams.project_idstringYesUnique project identifier (prefixed, e.g. prj_xxx).
pathParams.database_idstringYesUnique database identifier (prefixed, e.g. db_xxx).

Response

Promise<SchemaCatalog> — schema catalog.

Example

import { PgBeamClient } from "pgbeam";

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

const result = await client.api.databases.getSchemaCatalog({
  pathParams: { project_id: "prj_xxx", database_id: "db_xxx" },
});

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