PgBeam Docs
api

api request

Make a raw API request

Make a direct HTTP request to the PgBeam API. Supports path parameter interpolation — if the path matches a known API route template, path parameters are extracted automatically. Use --data (or -d) to send a JSON request body. Authentication is handled via the active profile.

Usage

pgbeam api request <method> <path> [flags]

Options

OptionDescriptionRequiredDefault
<method>HTTP method: GET, POST, PATCH, PUT, or DELETEYes-
<path>API path (e.g. /v1/projects, /v1/regions)Yes-
--data <value>, -dJSON request body to send with the requestNo-

Global options

All global options (--token, --profile, --project, --org, --json, --no-color, --debug) are also available on this command.

Examples

# List all regions (public endpoint)
pgbeam api request GET /v1/regions

# Get a specific project
pgbeam api request GET /v1/projects/prj_xxx

# Create a project with a JSON body
pgbeam api request POST /v1/projects -d '{"name": "my-app", "org_id": "org_xxx"}'

# Delete a database
pgbeam api request DELETE /v1/projects/prj_xxx/databases/db_xxx

Output

Outputs the API response as formatted JSON. Exits with a non-zero code on HTTP errors.

On this page