Get a single connection

Retrieves the details of a specific ClickHouse connection.

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

URL parameters

id
required string

Headers

Authorization
required string
200

Response body

{
  "data": {
    "id": "42510",
    "type": "connection",
    "attributes": {
      "id": 42510,
      "client_type": "clickhouse",
      "note": "My testing connection",
      "created_at": "2025-05-23T13:16:31.419Z",
      "valid_until": null,
      "host": "eu-nbg-2-connect.betterstackdata.com",
      "port": 443,
      "username": "u5LJyB8U1UFmw4fRFrnu74Kh1G4Nfnh6s",
      "data_region": "eu-nbg-2",
      "ip_allowlist": [],
      "team_ids": [
        1234
      ],
      "team_names": [
        "My Team"
      ],
      "created_by": {
        "id": 456789,
        "email": "my@email.com"
      },
      "sample_query": "curl -u u5LJyB8U1UFmw4fRtXnu74Kh1G4Nfnh6s:INSERT_PASSWORD -H 'Content-type: plain/text' -X POST 'https://eu-nbg-2-connect.betterstackdata.com?output_format_pretty_row_numbers=0' -d \\"SELECT query_collection || '_' || type AS named_collection, multiIf( type = 'logs', 'SELECT dt, raw FROM remote(' || query_collection || '_logs) LIMIT 10 UNION ALL SELECT dt, raw FROM s3Cluster(primary, ' || query_collection || '_s3) WHERE _row_type = 1 LIMIT 10', type = 'spans', 'SELECT dt, raw FROM remote(' || query_collection || '_spans) LIMIT 10 UNION ALL SELECT dt, raw FROM s3Cluster(primary, ' || query_collection || '_s3) WHERE _row_type = 3 LIMIT 10', type = 'metrics', 'SELECT toStartOfHour(dt) AS time, countMerge(events_count) FROM remote(' || query_collection || '_metrics) GROUP BY time ORDER BY time DESC LIMIT 10', null ) AS query_with FROM VALUES('query_collection String, type String', ('t1234_local_kubernetes', 'logs'), ('t1234_local_kubernetes', 'spans'), ('t1234_local_kubernetes', 'metrics'), ('t1234_testing_syslog', 'logs'),  ('t1234_testing_syslog', 'metrics')) ORDER BY named_collection FORMAT Pretty\\"",
      "data_sources": [
        {
          "source_name": "Local Kubernetes",
          "source_id": 1234,
          "team_name": "My Team",
          "data_sources": [
            "remote(t1234_local_kubernetes_logs)",
            "remote(t1234_local_kubernetes_spans)",
            "remote(t1234_local_kubernetes_metrics)",
            "s3Cluster(primary, t1234_local_kubernetes_s3)"
          ]
        },
        {
          "source_name": "Testing syslog",
          "source_id": 1376836,
          "team_name": "My Team",
          "data_sources": [
            "remote(t1234_testing_syslog_logs)",
            "remote(t1234_testing_syslog_metrics)",
            "s3Cluster(primary, t1234_testing_syslog_s3)"
          ]
        }
      ]
    }
  }
}
404

Response body

{
  "errors": "Resource with the provided ID was not found"
}

This API requires a global API token for authentication, not a team-specific token. Include the token in the Authorization header.

Example cURL

Example
curl --request GET \
  --url https://telemetry.betterstack.com/api/v1/connections/123 \
  --header "Authorization: Bearer $TOKEN"