PgBeam Docs
Projects

List replicas

Lists all read replicas for a database.

At a glance

ItemValue
MethodGET
Path/v1/databases/{database_id}/replicas
AuthAuthorization: Bearer <token-or-api-key>

Quick request

Use this as a starting point. Replace the placeholder IDs and set PGBEAM_TOKEN if the endpoint requires auth.

curl -X GET \
  "$PGBEAM_API_URL/v1/databases/<database_id>/replicas" \
  -H "Authorization: Bearer $PGBEAM_TOKEN"
GET
/v1/databases/{database_id}/replicas
AuthorizationBearer <token>

JWT issued by Better Auth. Verified via JWKS.

In: header

Path Parameters

database_id*string

Unique database identifier (prefixed, e.g. db_xxx).

Match^[a-zA-Z0-9_.-]+$

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

curl -X GET "https://api.pgbeam.com/v1/databases/string/replicas"
{
  "replicas": [
    {
      "id": "rep_01h455vb4pex5vsknk084sn02q",
      "database_id": "string",
      "host": "replica.db.example.com",
      "port": 5432,
      "ssl_mode": "disable",
      "created_at": "2019-08-24T14:15:22Z",
      "updated_at": "2019-08-24T14:15:22Z"
    }
  ]
}
{
  "error": {
    "code": "string",
    "message": "string"
  }
}
{
  "error": {
    "code": "string",
    "message": "string"
  }
}
{
  "error": {
    "code": "string",
    "message": "string"
  }
}
{
  "error": {
    "code": "string",
    "message": "string"
  }
}
{
  "error": {
    "code": "string",
    "message": "string"
  }
}