---
title: "master/slave switchover"
method: POST
path: "/clusters/switchover"
tags: ["switchover"]
---

# master/slave switchover

`POST /clusters/switchover`

master/slave switchover

## Request body

- ClusterMasterSlaveClusterSwitchoverReq
  - `force` boolean
  - `sourceClusterID` string, required — old master/new slave
  - `targetClusterID` string, required — new master/old slave

## Response `200`

OK

- object
  - `code` integer
  - `data` object
    - `workFlowId` string — Asynchronous task workflow ID
  - `message` string

## Other responses

- `401` — Unauthorized
- `403` — Forbidden
- `500` — Internal Server Error

---

[API](https://skmtc.dev/pingcap/apis/em-ui-api.md) · [All operations](https://skmtc.dev/pingcap/apis/em-ui-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/pingcap/em-ui-api/revisions/e9e75c7c2edb/schema)
