Skip to content
ClickHouse Docs
ClickHouse DocsClickHouse Docs

Update replica aware routing

PATCH/v1/organizations/{organizationId}/services/{serviceId}/replicaAwareRouting
API playground

This endpoint is in beta. API contract is stable, and no breaking changes are expected in the future.

Updates replica aware routing (sticky routing) for the service. Requires the organization feature to be enabled. Provide at least one of httpEnabled, nativeEnabled; omit a field to leave it unchanged.

Permission

The API key must have the control-plane:service:manage permission.

Authorizations

Path parameters

  • organizationIdstringrequired

    ID of the organization that owns the service.

    format: uuid
  • serviceIdstringrequired

    ID of the service.

    format: uuid

Request bodyJSON

  • httpEnabledoptionalboolean

    Whether replica aware routing is enabled for HTTP connections. Omit to leave unchanged.

  • nativeEnabledoptionalboolean

    Whether replica aware routing is enabled for native protocol connections. Omit to leave unchanged.

Response

JSON

200

Successful response

JSON
  • statusoptionalnumber

    HTTP status code.

    Example: 200
  • requestIdoptionalstring

    Unique id assigned to every request. UUIDv4

    format: uuid
  • resultoptionalobject
    2 properties
    • httpEnabledbooleanrequired

      Whether replica aware routing is enabled for HTTP connections. When enabled, clients must send the X-ClickHouse-Replica-Tag header. Enabling this changes HTTP connection behavior for the service.

    • nativeEnabledbooleanrequired

      Whether replica aware routing is enabled for native protocol connections.