# List all collectors

Returns a paginated list of collectors accessible by the authenticated user.

[endpoint]
base_url = "https://telemetry.betterstack.com"
path = "/api/v1/collectors"
method = "GET"

[[query_param]]
name = "page"
description = "Page number for pagination."
required = false
type = "integer"
default = "1"

[[query_param]]
name = "per_page"
description = "Number of items per page (max 250)."
required = false
type = "integer"
default = "50"

[[query_param]]
name = "name"
description = "Filter collectors by name (case-insensitive partial match)."
required = false
type = "string"

[[query_param]]
name = "team_name"
description = "Required if using a [global API token](https://betterstack.com/docs/logs/api/getting-started/#get-a-global-api-token) to filter for a specific team. If omitted, collectors from all teams in the organization are returned."
required = false
type = "string"

[[header]]
name = "Authorization"
description = "Bearer `$TOKEN`"
required = true
type = "string"
[/endpoint]

[responses]
[[response]]
status = 200
description = "A paginated list of collectors."
body = '''
{
  "data": [
    {
      "id": "1",
      "type": "collector",
      "attributes": {
        "name": "Production Kubernetes",
        "platform": "kubernetes",
        "note": "Main cluster for production services.",
        "status": "online",
        "secret": "collector-secret-goes-here",
        "team_id": 123,
        "team_name": "My Team",
        "data_region": "a3",
        "logs_retention": 30,
        "metrics_retention": 90,
        "configuration": {
          "components": {
            "ebpf_metrics": true,
            "logs_kubernetes": true
          },
          "logs_sample_rate": 100,
          "traces_sample_rate": 100,
          "vrl_transformation": null,
          "disk_batch_size_mb": 256,
          "memory_batch_size_mb": 10,
          "when_full": "drop_newest"
        },
        "user_vector_config": null,
        "ingesting_paused": false,
        "source_vrl_transformation": null,
        "source_id": 9876,
        "source_group_id": null,
        "live_tail_pattern": null,
        "pinged_at": "2023-10-27T10:00:00.000Z",
        "created_at": "2023-10-26T10:00:00.000Z",
        "updated_at": "2023-10-26T10:00:00.000Z",
        "custom_bucket": null
      }
    }
  ],
  "pagination": {
    "first": "https://telemetry.betterstack.com/api/v1/collectors?page=1&per_page=1",
    "last": "https://telemetry.betterstack.com/api/v1/collectors?page=2&per_page=1",
    "prev": null,
    "next": "https://telemetry.betterstack.com/api/v1/collectors?page=2&per_page=1"
  }
}
'''

[[response]]
status = 401
description = "Invalid or missing authentication token."
[/responses]

#### Example Request

```shell
[label cURL]
curl -L -H "Authorization: Bearer $TOKEN" \
     "https://telemetry.betterstack.com/api/v1/collectors?name=Production"
```
