---
title: "Update Connection"
method: PUT
path: "/api/v2/connections/{id}"
tags: ["Connections"]
---

# Update Connection

`PUT /api/v2/connections/{id}`

Updates an existing ClickHouse connection.

Field semantics: if `password` is omitted or empty the existing
password is kept. `hyperdxSettingPrefix` is cleared when set to null
or an empty string, and `prometheusEndpoint` is cleared when set to
null; both are kept unchanged when omitted.

## Path parameters

- `id` string, required

## Request body

- UpdateConnectionRequest
  - `name` string, required — Display name for the connection.
  - `host` string, required — ClickHouse HTTP endpoint URL.
  - `username` string, required — ClickHouse username.
  - `password` string — ClickHouse password. If omitted or empty, the existing password is kept.
  - `hyperdxSettingPrefix` string, nullable — Optional prefix for HyperDX-specific ClickHouse settings. Set to null or an empty string to clear the existing value. If omitted, the existing value is kept.
  - `isPrometheusEndpoint` boolean — Optional. When true, `host` is treated as a Prometheus-compatible API endpoint. When false or omitted, `host` is a ClickHouse HTTP endpoint. Omit to keep the existing value unchanged.

## Response `200`

Successfully updated connection

- ConnectionResponseEnvelope
  - `data` Connection
    - `id` string, required — Unique connection ID.
    - `name` string, required — Display name for the connection.
    - `host` string, required — ClickHouse HTTP endpoint URL.
    - `username` string, required — ClickHouse username.
    - `hyperdxSettingPrefix` string, nullable — Optional prefix for HyperDX-specific ClickHouse settings. Must only contain alphanumeric characters and underscores.
    - `isPrometheusEndpoint` boolean — 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.
    - `createdAt` string, date-time — Creation timestamp
    - `updatedAt` string, date-time — Last update timestamp

## Other responses

- `400` — Bad request
- `401` — Unauthorized
- `404` — Connection not found

## Changes

- **2026-06-26** `a4888dfe2491` — 2 warning, 2 info
  - removed the request property `prometheusEndpoint`
  - removed the optional property `data/prometheusEndpoint` from the response with the `200` status
  - added the new optional request property `isPrometheusEndpoint`
  - added the optional property `data/isPrometheusEndpoint` to the response with the `200` status
- **2026-06-16** `93cfcaa1a7da` — 1 info
  - endpoint added
- **2026-01-30** `ed852374c451` — 1 breaking
  - api path removed without deprecation

[Change history](https://skmtc.dev/hyperdxio/apis/hyperdx-external-api/changes/api/v2/connections/:id/put.md)

---

[API](https://skmtc.dev/hyperdxio/apis/hyperdx-external-api.md) · [All operations](https://skmtc.dev/hyperdxio/apis/hyperdx-external-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/hyperdxio/hyperdx-external-api/revisions/3399efdca551/schema)
