---
title: "POST /gateway/v2/cluster-switching"
method: POST
path: "/gateway/v2/cluster-switching"
tags: ["cluster-switching"]
---

# POST /gateway/v2/cluster-switching

`POST /gateway/v2/cluster-switching`

## Request

- Base URL: `https://developers.conduktor.io` (the document declares no server; this is the origin it was published from)
- URL: `https://developers.conduktor.io/gateway/v2/cluster-switching`
- Auth: HTTP basic
- TypeScript: <https://skmtc.dev/conduktor/apis/conduktor-gateway-api/docs/gateway/v2/cluster-switching/post.ts> (a function with typed inputs; its response is checked against the schema)

[![Generally Available](https://img.shields.io/badge/Lifecycle-Generally%20Available-blue)](#tag/Versioning)

Switch the Gateway's underlying Kafka cluster by replacing the connection properties of a physical cluster with properties from another cluster.

This operation allows you to dynamically switch the backend Kafka cluster that the Gateway connects to without restarting the service.

## Request body

- ClusterSwitchingRequest
  - `fromPhysicalCluster` string, required
  - `toPhysicalCluster` string, required

## Response `200`

- ApplyResultClusterSwitchingResponse
  - `resource` ClusterSwitchingResponse, required: The resource that was upserted
    - `message` string, required
    - `fromPhysicalCluster` string, required
    - `toPhysicalCluster` string, required
  - `upsertResult` 'Created' | 'NotChanged' | 'Updated', required: The result of the upsert operation (created, updated, not changed)

## Other responses

- `400`: The request is not valid
- `401`: The given credentials are not valid
- `403`: The required feature is not included in the current license
- `500`: An unexpected error occurred in the server

---

[API](https://skmtc.dev/conduktor/apis/conduktor-gateway-api.md) - [All operations](https://skmtc.dev/conduktor/apis/conduktor-gateway-api/llms.txt) - [OpenAPI document](https://skmtc.dev/conduktor/apis/conduktor-gateway-api/revisions/73ad742aa630?raw)
