Lists databases monitored by a collector

Returns a list of databases currently being monitored by the specified collector.

For security reasons, passwords are never included in the API response.

GET https://telemetry.betterstack.com/api/v1/collectors/{id}/databases

URL parameters

id
required string

Headers

Authorization
required string
200

Response body

{
  "data": [
    {
      "id": "201",
      "type": "collector_database",
      "attributes": {
        "service_type": "postgres",
        "host": "db1.example.com",
        "port": 5432,
        "username": "betterstack_user",
        "status": "up",
        "ssl_mode": "require",
        "tls": null,
        "service": "db1",
        "container": null,
        "autogenerated": false
      }
    },
    {
      "id": "202",
      "type": "collector_database",
      "attributes": {
        "service_type": "redis",
        "host": "cache.example.com",
        "port": 6379,
        "username": null,
        "status": "up",
        "ssl_mode": null,
        "tls": null,
        "service": "cache",
        "container": null,
        "autogenerated": false
      }
    }
  ]
}
401
404

Response attributes

id
string
type
string
attributes.service_type
string
attributes.host
string
attributes.port
integer
attributes.username
string or null
attributes.status
string
attributes.ssl_mode
string or null
attributes.tls
string or null
attributes.service
string or null
attributes.container
string or null
attributes.autogenerated
boolean

Example Request

cURL
curl -L -H "Authorization: Bearer $TOKEN" \
     "https://telemetry.betterstack.com/api/v1/collectors/1/databases"