Get one database of an application
const url = 'https://dashboard.quantcdn.io/api/v3/organizations/example/applications/example/database/example';const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request GET \ --url https://dashboard.quantcdn.io/api/v3/organizations/example/applications/example/database/example \ --header 'Authorization: Bearer <token>'Poll this for a database being added: status is provisioning, ready or failed.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”The organisation ID
The application ID
The database instance identifier, as returned by the list
Responses
Section titled “Responses”The database
object
Poll this for a database being added.
Why a database failed.
The live instance status. Absent when it could not be read.
A resize RDS has accepted but not applied yet. Absent when there is none.
object
Unix epoch milliseconds.
Previous only: when it stopped being the active database.
Next only: the environments that have a user on this instance.
Next only: the names of the secrets that hold each environment’s credentials for this instance. Names, never values.
object
Next only: DB_NEXT_HOST, DB_NEXT_PORT, DB_NEXT_DATABASE, DB_NEXT_ENGINE.
Next only: DB_NEXT_USERNAME and DB_NEXT_PASSWORD, secret references to the per-environment secrets above. Never values.
Example
{ "instanceId": "acme-api-db-postgres", "role": "active", "status": "active", "engine": "mysql", "rdsStatus": "available"}The application or the database was not found
object
409 only: the operation that holds the application’s lock.
409 only: the operation that was refused.
409 only: the pending or previous database that blocks the request, or the provision in flight.
409 only: for a provision in flight, the path to poll on the platform (this API serves it at the database route).
Promote 409 only: the environments that have no user, or unreadable credentials, on the instance.
Delete 500 only: what could not be cleaned up.
Example
{ "operation": "provision", "requested": "provision"}