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,
        "username": "monitor",
        "ssl_mode": "require",
        "status": "up",
        "enabled": true,
        "container": null,
        "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",
        "status": "up",
        "enabled": true,
        "container": null,
        "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
  }
}

Response attributes

id
string
type
string
attributes.kind
string
attributes.host
string
attributes.port
integer or null
attributes.service
string
attributes.listen_ip
string or null
attributes.endpoint
string or null
attributes.scheme
string
attributes.username
string or null
attributes.ssl_mode
string or null
attributes.tls
string or null
attributes.status
string
attributes.enabled
boolean
attributes.container
string or null
attributes.created_at
string
attributes.updated_at
string
pagination.first
string
pagination.last
string
pagination.prev
string or null
pagination.next
string or null
cURL
curl "https://telemetry.betterstack.com/api/v1/collectors/1/targets" \
     -H "Authorization: Bearer $TOKEN"