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": "postgresql",
        "host": "db1.example.com",
        "port": 5432,
        "username": "betterstack_user",
        "ssl_mode": "require",
        "tls": false,
        "created_at": "2023-10-26T11:00:00.000Z",
        "updated_at": "2023-10-26T11:00:00.000Z"
      }
    },
    {
      "id": "202",
      "type": "collector_database",
      "attributes": {
        "service_type": "redis",
        "host": "cache.example.com",
        "port": 6379,
        "username": null,
        "ssl_mode": null,
        "tls": true,
        "created_at": "2023-10-26T11:05:00.000Z",
        "updated_at": "2023-10-26T11:05:00.000Z"
      }
    }
  ]
}
401
404

Example Request

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