List hosts where a collector is running

Returns a list of hosts where the specified collector is running.

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

URL parameters

id
required string

Headers

Authorization
required string
200

Response body

{
  "data": [
    {
      "id": "101",
      "type": "collector_host",
      "attributes": {
        "hostname": "k8s-node-1.example.com",
        "status": "online",
        "version": "0.1.0",
        "ip_address": "10.0.1.10",
        "pinged_at": "2023-10-27T10:05:00.000Z",
        "created_at": "2023-10-26T10:01:00.000Z"
      }
    },
    {
      "id": "102",
      "type": "collector_host",
      "attributes": {
        "hostname": "k8s-node-2.example.com",
        "status": "offline",
        "version": "0.1.0",
        "ip_address": "10.0.1.11",
        "pinged_at": "2023-10-27T09:00:00.000Z",
        "created_at": "2023-10-26T10:02:00.000Z"
      }
    }
  ]
}
401
404

Example Request

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