# List all connections

Returns a paginated list of ClickHouse connections. For extra details, such as individual [data sources](https://betterstack.com/docs/logs/query-api/connect-remotely/#data-sources-explained), see [Get a single connection API](https://betterstack.com/docs/logs/api/connections/get/).

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

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

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

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

[responses]
[[response]]
status = 200
description = '''A paginated list of connections.'''
body = '''
{
  "data": [
    {
      "id": "43700",
      "type": "connection",
      "attributes": {
        "id": 43700,
        "client_type": "clickhouse",
        "note": "My testing connection",
        "created_at": "2025-10-18T10:00:44.890Z",
        "valid_until": null,
        "host": "eu-nbg-2-connect.betterstackdata.com",
        "port": 443,
        "username": "uodjialjQXSPe66TePguwdE72Jjvn9DNy",
        "data_region": "eu-nbg-2",
        "ip_allowlist": [],
        "team_ids": [
          1234
        ],
        "team_names": [
          "My Team"
        ],
        "created_by": {
          "id": 456789,
          "email": "my@email.com"
        }
      }
    }
  ],
  "pagination": {
    "first": "https://telemetry.betterstack.com/api/v1/connections?page=1",
    "last": "https://telemetry.betterstack.com/api/v1/connections?page=1",
    "prev": null,
    "next": null
  }
}
'''
[/responses]

[note]
This API requires a [global API token](https://betterstack.com/docs/logs/api/getting-started/#get-a-global-api-token) for authentication, not a team-specific token. Include the token in the `Authorization` header.
[/note]

#### Example cURL

```shell
[label Example]
curl --request GET \
  --url https://telemetry.betterstack.com/api/v1/connections \
  --header "Authorization: Bearer $TOKEN"
```
