Managed Databases
Set public access
Open or close public access to the database.
When enabled, the database is reachable at {database_id}.public.db.raffusercloud.com on a port assigned from the reserved range 25060–26060 (public_port on the database object). For PostgreSQL, public_port is the pooled endpoint and public_port + 1 is the direct endpoint. TLS is always required.
allowlist restricts which source CIDRs may connect. 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.
post/api/v1/databases/{database_id}/public-access
Path parameters
database_idstring required
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": 6432,
"billing_type": "payg",
"price_per_hour": 0.010945,
"monthly_price": 7.99,
"public_port": 25060,
"public_dns_hostname": "a1b2c3d4.public.db.raffusercloud.com",
"public_allowlist": [
"203.0.113.0/24"
]
}
}