Get the databases of an application
const url = 'https://dashboard.quantcdn.io/api/v3/organizations/example/applications/example/database';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 \ --header 'Authorization: Bearer <token>'The active database, the one being added next to it (next) and the one the last promote replaced (previous). Each is null when there is none. No credential value is returned. The application must exist (404 otherwise).
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”The organisation ID
The application ID
Responses
Section titled “Responses”The databases
object
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.
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.
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
{ "active": { "instanceId": "acme-api-db-postgres", "role": "active", "status": "active", "engine": "mysql", "rdsStatus": "available" }, "next": { "instanceId": "acme-api-db-postgres", "role": "active", "status": "active", "engine": "mysql", "rdsStatus": "available" }, "previous": { "instanceId": "acme-api-db-postgres", "role": "active", "status": "active", "engine": "mysql", "rdsStatus": "available" }}The application was not found
