List collector metrics targets

Returns a paginated list of all targets belonging to a collector.

GET https://telemetry.betterstack.com/api/v1/collectors/{collector_id}/targets

Query parameters

page
integer
per_page
integer

Headers

Authorization
required string
200

Response body

{
  "data": [
    {
      "id": "1",
      "type": "collector_target",
      "attributes": {
        "kind": "postgres",
        "host": "db.example.com",
        "port": 5432,
        "service": null,
        "listen_ip": null,
        "endpoint": null,
        "scheme": null,
        "username": "monitor",
        "ssl_mode": "require",
        "tls": null,
        "status": "up",
        "enabled": true,
        "container": null,
        "detected_host": null,
        "autogenerated": false,
        "paused_until": null,
        "consecutive_failure_count": 0,
        "last_ping_at": "2025-06-15T14:32:00.000Z",
        "created_at": "2025-06-01T12:00:00.000Z",
        "updated_at": "2025-06-15T14:32:00.000Z"
      }
    },
    {
      "id": "2",
      "type": "collector_target",
      "attributes": {
        "kind": "nginx",
        "host": "collector-host-1",
        "port": 80,
        "service": "edge-nginx",
        "listen_ip": "10.0.0.1",
        "endpoint": null,
        "scheme": null,
        "username": null,
        "ssl_mode": null,
        "tls": null,
        "status": "up",
        "enabled": true,
        "container": null,
        "detected_host": null,
        "autogenerated": false,
        "paused_until": null,
        "consecutive_failure_count": 0,
        "last_ping_at": "2025-06-15T14:30:00.000Z",
        "created_at": "2025-06-01T12:00:00.000Z",
        "updated_at": "2025-06-15T14:30:00.000Z"
      }
    }
  ],
  "pagination": {
    "first": "https://telemetry.betterstack.com/api/v1/collectors/1/targets?page=1",
    "last": "https://telemetry.betterstack.com/api/v1/collectors/1/targets?page=1",
    "prev": null,
    "next": null
  }
}
cURL
curl "https://telemetry.betterstack.com/api/v1/collectors/1/targets" \
     -H "Authorization: Bearer $TOKEN"