Skip to content
ClickHouse Docs
ClickHouse DocsClickHouse Docs

Create Connection

POST/api/v2/connections

Creates a new ClickHouse connection

Authorizations

  • AuthorizationBearer API Keyheaderrequired
    `Authorization: Bearer <token>`

Request bodyJSON

  • namestringrequired

    Display name for the connection.

    Example: "Production ClickHouse"
  • hoststringrequired

    ClickHouse HTTP endpoint URL.

    Example: "https://clickhouse.example.com:8443"
  • usernamestringrequired

    ClickHouse username.

    Example: "default"
  • passwordoptionalstring

    ClickHouse password. Never returned by the API.

    Example: "my-secret-password"
  • hyperdxSettingPrefixoptionalstringor null

    Optional prefix for HyperDX-specific ClickHouse settings. Must only contain alphanumeric characters and underscores.

    Example: "hyperdx_"
  • isPrometheusEndpointoptionalboolean

    Optional. When true, host is treated as a Prometheus-compatible API endpoint (e.g. Prometheus or Thanos) and PromQL queries are proxied to it. When false or omitted, host is a ClickHouse HTTP endpoint.

    Example: false

Response

JSON

200

Successfully created connection

JSON
  • dataoptionalobject

    The connection object.

    8 properties
    • idstringrequired

      Unique connection ID.

      Example: "507f1f77bcf86cd799439012"
    • namestringrequired

      Display name for the connection.

      Example: "Production ClickHouse"
    • hoststringrequired

      ClickHouse HTTP endpoint URL.

      Example: "https://clickhouse.example.com:8443"
    • usernamestringrequired

      ClickHouse username.

      Example: "default"
    • hyperdxSettingPrefixoptionalstringor null

      Optional prefix for HyperDX-specific ClickHouse settings. Must only contain alphanumeric characters and underscores.

      Example: "hyperdx_"
    • isPrometheusEndpointoptionalboolean

      Optional. When true, host is treated as a Prometheus-compatible API endpoint (e.g. Prometheus or Thanos) and PromQL queries are proxied to it. When false or omitted, host is a ClickHouse HTTP endpoint.

      Example: false
    • createdAtoptionalstring

      Creation timestamp

      format: date-time
      Example: "2025-01-01T00:00:00.000Z"
    • updatedAtoptionalstring

      Last update timestamp

      format: date-time
      Example: "2025-06-15T10:30:00.000Z"
Navigation