Databases

Get a database (password only with ?reveal=true)

get/databases/{databaseId}

Request

  • Base URL: https://hostingsurge.com/api/v1
  • URL: https://hostingsurge.com/api/v1/databases/{databaseId}
  • Auth: one of:
    • HTTP bearer
    • API key in cookie __Host-hs_session

Path parameters

databaseIdstring uuid required
Example:3f2b8a4e-5c1d-4e8f-9a7b-2c6d1e0f4a5b

Query parameters

reveal'0' | '1' | 'true' | 'false'

Return secret values (needs the reveal scope)

Response

The database

idstring uuid required
organizationIdstring uuid required
projectIdstring uuid nullable required
namestring required
engine'postgresql' | 'mysql' | 'mariadb' | 'redis' | 'mongodb' required
versionstring nullable required
status'provisioning' | 'running' | 'stopped' | 'error' | 'deleting' required
isPublicboolean required
internalHoststring nullable required

reachable from the organization's projects

portinteger nullable required
publicHoststring nullable required
publicPortinteger nullable required
databaseNamestring nullable required
usernamestring nullable required
passwordstring nullable required

only with databases:reveal and ?reveal=true

connectionUrlstring nullable required

masked unless revealed

backupScheduledboolean

false: the database has no backup schedule, so nothing is backed up (absent for Redis, which has no scheduled backups). PUT /databases/{id}/backups {"frequency": "0 3 * * *", "retentionDays": 30} turns on daily backups.

createdAtstring required

ISO-8601 timestamp

Changes

No recorded changes to this operation across all 1 revision of this API.