PgBeam Docs
Projects

getProjectMetrics

Get project metrics

Returns recent project metrics snapshots, optionally filtered by region.

Usage

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

Parameters

ParameterTypeRequiredDescription
pathParams.project_idstringYesUnique project identifier (prefixed, e.g. prj_xxx).
queryParams.limitnumberNoMaximum number of recent snapshots to return.
queryParams.regionstringNoFilter metrics by region code.

Response

Promise<ProjectMetricsResponse> — metrics snapshots

Example

import { PgBeamClient } from "pgbeam";

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

const result = await client.api.projects.getProjectMetrics({
  pathParams: { project_id: "prj_xxx" },
  queryParams: { limit: 20, region: "..." },
});

Errors

StatusDescription
400Invalid request parameters.
401Missing or invalid authentication.
404Resource not found.
429Rate limited. Try again later.

On this page