This is an automated email from the ASF dual-hosted git repository.
hulk pushed a commit to branch unstable
in repository https://gitbox.apache.org/repos/asf/kvrocks-controller.git
The following commit(s) were added to refs/heads/unstable by this push:
new cfc57e2 Add the failover API into docs (#311)
cfc57e2 is described below
commit cfc57e27bfb5b5fc7383bad9ae478786411dede0
Author: hulk <[email protected]>
AuthorDate: Sun Jun 1 17:11:39 2025 +0800
Add the failover API into docs (#311)
---
docs/API.md | 34 ++++++++++++++++++++++++++++++++++
1 file changed, 34 insertions(+)
diff --git a/docs/API.md b/docs/API.md
index 240ff5b..3666f3a 100644
--- a/docs/API.md
+++ b/docs/API.md
@@ -486,6 +486,40 @@ DELETE
/api/v1/namespaces/{namespace}/clusters/{cluster}/shards/{shard}
}
```
+### Failover master node in a shard
+
+```
+POST /api/v1/namespaces/{namespace}/clusters/{cluster}/shards/{shard}/failover
+```
+
+#### Request Body
+
+```json
+{
+ "preferred_node_id": "{YOUR PREFERRED NODE ID}"
+}
+```
+
+#### Response JSON Body
+
+* 200
+```json
+{
+ "data": {
+ "new_master_id": "{NEW MASTER ID}"
+ }
+}
+```
+
+* 5XX
+```json
+{
+ "error": {
+ "message": "DETAIL ERROR STRING"
+ }
+}
+```
+
## Node APIs
### Create Node