Managed Databases

Set public access

Changed on

Open or close public access to the database.

When enabled, the database is reachable at {database_id}.public.db.raffusercloud.com on the port pair Raff assigns to it (public_port on the database object). For PostgreSQL, public_port is the pooled endpoint and public_port + 1 is the direct endpoint, each capped at the plan's connection limit for that endpoint. TLS is always required.

PostgreSQL is also reachable on the standard ports of the same hostname: 6543 (pooled) and 5432 (direct). These route by the hostname your client sends during TLS, so use the hostname, not an IP address.

The ports stay assigned while public access is off, so enabling it again returns the same ports. They are released only when the database is deleted.

allowlist restricts which source addresses may connect: up to 20 IPv4 addresses or CIDR ranges. Omit it to keep the stored list; pass [] to allow all sources. Re-post enabled: true with a new allowlist to update the restriction in place.

Turning public access on returns once the public address accepts connections, usually within seconds. Kafka is private only and is refused.

post/api/v1/databases/{database_id}/public-access

Request

  • Base URL
    https://api.rafftechnologies.com
  • URL
    https://api.rafftechnologies.com/api/v1/databases/{database_id}/public-access
  • Auth
    API key in header X-API-Key

Path parameters

database_idstring required

Database ID (UUID) or short id (the database_id field, e.g. a1b2c3d4)

Request body

enabledboolean required

Enable or disable public access

allowliststring[]

IPv4 addresses or CIDR ranges allowed to connect. Omit to keep the stored list; pass [] to allow all sources (the password and TLS are still required).

  • Up to 20 entries.
  • A single address such as 203.0.113.7 is stored as 203.0.113.7/32.
  • 0.0.0.0/0 is refused: pass [] instead.

Example request

{
  "allowlist": [
    "203.0.113.0/24"
  ]
}

Response

Updated database

successboolean

Example response

{
  "database": {
    "name": "orders-db",
    "engine": "postgres",
    "engine_version": "16",
    "region": "us-east",
    "plan_id": 5,
    "storage_gb": 25,
    "connection_host": "a1b2c3d4.db.raffusercloud.com",
    "connection_port": 5432,
    "billing_type": "payg",
    "price_per_hour": 0.010945,
    "monthly_price": 7.99,
    "public_port": 20104,
    "public_dns_hostname": "a1b2c3d4.public.db.raffusercloud.com",
    "public_allowlist": [
      "203.0.113.0/24"
    ]
  }
}

Changes

    • warning

      added the new moving enum value to the / response property for the response status

    • info

      added the optional property / to the response with the status

    • info

      added the optional property / to the response with the status

    • breaking

      the / response's property format changed from uuid to no format for status

    • breaking

      the / response's property format changed from uuid to no format for status

    • warning

      added the new resizing enum value to the / response property for the response status

    • warning

      added the new restoring enum value to the / response property for the response status

    • info

      added the optional property / to the response with the status

    • info

      added the optional property / to the response with the status