public.databases.list
const url = 'https://rest.watchtower15.com/v1/databases?sort=name&direction=asc&include_total=true';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://rest.watchtower15.com/v1/databases?sort=name&direction=asc&include_total=true' \ --header 'Authorization: Bearer <token>'Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Query Parameters
Section titled “Query Parameters”Responses
Section titled “Responses”DatabasesListResource
object
object
The hosting provider’s key, such as aws_rds_mysql.
One of unknown, healthy, warning, critical.
One of draft, awaiting_collector, verifying, active, failing, paused.
Why the status is what it is, in words.
Whether monitoring is switched on.
How much of the database’s text the monitor keeps: hashed, identifiers or counts.
Queries per second, the latest value; null without a report in the last 2 minutes.
Connections in use as a percentage of the maximum; null without a report in the last 2 minutes.
The 30-day projection less the size, while the forecast is ok.
The forecast’s status; null before the first forecast.
Whether a collector holds more privilege than it needs.
Epoch milliseconds: when a report last arrived; null if none ever did.
object
The database’s page in the console.
The whole list’s size; present only with include_total=true.
Example generated
{ "data": [ { "uuid": "example", "name": "example", "engine": "example", "engine_version": "example", "provider": "example", "health_status": "example", "status": "example", "status_reason": "example", "active": true, "privacy_mode": "example", "qps": 1, "connections_percent": 1, "storage_size_bytes": 1, "storage_growth_30d_bytes": 1, "storage_days_to_full": 1, "storage_forecast_status": "example", "over_privileged": true, "last_received_at": 1, "tags": [ { "uuid": "example", "name": "example" } ], "console_url": "example" } ], "next_cursor": "example", "total": 1}The API key is missing, malformed, expired or revoked.
object
https://docs.watchtower15.com/api/errors/<code>/
object
Example generated
{ "type": "https://example.com", "title": "example", "status": 1, "code": "example", "detail": "example", "request_id": "example", "errors": { "additionalProperty": [ "example" ] }, "limit": 1, "used": 1}The key or its owner does not hold what the operation needs.
object
https://docs.watchtower15.com/api/errors/<code>/
object
Example generated
{ "type": "https://example.com", "title": "example", "status": 1, "code": "example", "detail": "example", "request_id": "example", "errors": { "additionalProperty": [ "example" ] }, "limit": 1, "used": 1}No such record in this organisation (an absent id and another organisation’s answer alike).
object
https://docs.watchtower15.com/api/errors/<code>/
object
Example generated
{ "type": "https://example.com", "title": "example", "status": 1, "code": "example", "detail": "example", "request_id": "example", "errors": { "additionalProperty": [ "example" ] }, "limit": 1, "used": 1}The request is invalid; errors names the parameters.
object
https://docs.watchtower15.com/api/errors/<code>/
object
Example generated
{ "type": "https://example.com", "title": "example", "status": 1, "code": "example", "detail": "example", "request_id": "example", "errors": { "additionalProperty": [ "example" ] }, "limit": 1, "used": 1}A rate limit or the organisation’s daily limit is reached; Retry-After says when to retry.
object
https://docs.watchtower15.com/api/errors/<code>/
object
Example generated
{ "type": "https://example.com", "title": "example", "status": 1, "code": "example", "detail": "example", "request_id": "example", "errors": { "additionalProperty": [ "example" ] }, "limit": 1, "used": 1}An unexpected error.
object
https://docs.watchtower15.com/api/errors/<code>/
object
Example generated
{ "type": "https://example.com", "title": "example", "status": 1, "code": "example", "detail": "example", "request_id": "example", "errors": { "additionalProperty": [ "example" ] }, "limit": 1, "used": 1}