Set public access
Changed onOpen 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.
Request
- Base URLhttps://api.rafftechnologies.com
- URLhttps://api.rafftechnologies.com/api/v1/databases/{database_id}/public-access
- AuthAPI key in header X-API-Key
Path parameters
Database ID (UUID) or short id (the database_id field, e.g. a1b2c3d4)
Request body
Example request
{
"allowlist": [
"203.0.113.0/24"
]
}Response
Updated database
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
movingenum 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
- warning
- breaking
the
/response's property format changed fromuuidto no format for status - breaking
the
/response's property format changed fromuuidto no format for status - warning
added the new
resizingenum value to the/response property for the response status - warning
added the new
restoringenum 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