POST /api/v1/namespaces
{ "namespace": "test-ns" }
{ "data": "created" }
{ "error": { "message": "the entry already existed" } }
{ "error": { "message": "DETAIL ERROR STRING" } }
GET /api/v1/namespaces
{ "data": { "namespaces": ["test-ns"] } }
{ "error": { "message": "DETAIL ERROR STRING" } }
GET /api/v1/namespaces/{namespace}
{ "data": "ok" }
{ "error": { "message": "the entry does not exist" } }
{ "error": { "message": "DETAIL ERROR STRING" } }
POST /api/v1/namespaces/{namespace}/clusters
{ "name":"test-cluster", "nodes":["127.0.0.1:6666"], "replicas":1, "password":"" }
{ "data": "created" }
{ "error": { "message": "the entry already existed" } }
{ "error": { "message": "DETAIL ERROR STRING" } }
GET /api/v1/namespaces/{namespace}/clusters
{ "data": { "clusters": ["test-cluster"] } }
{ "error": { "message": "DETAIL ERROR STRING" } }
This API is used to import the cluster from the existing Kvrocks cluster's nodes.
POST /api/v1/namespaces/{namespace}/clusters/{cluster}/import
{ "nodes":["127.0.0.1:6666"], "password":"" }
{ "data": "created" }
{ "error": { "message": "the entry already existed" } }
{ "error": { "message": "DETAIL ERROR STRING" } }
GET /api/v1/namespaces/{namespace}/clusters/{cluster}
{ "data": { "cluster": { "name":"test-cluster", "version":0, "shards":[ {"nodes":[ { "id":"YotDSqzTeHK6CnIX2gZu27IlcYRTW4dkkFQvV382", "addr":"127.0.0.1:6666", "role":"master", "password":"", "master_auth":"", "created_at":16834433980 }], "slot_ranges":["0-16383"], "import_slot":-1, "migrating_slot":-1 } ] } } }
{ "error": { "message": "the entry does not exist" } }
{ "error": { "message": "DETAIL ERROR STRING" } }
DELETE /api/v1/namespaces/{namespace}/clusters/{cluster}
{ "data": "ok" }
{ "error": { "message": "the entry does not exist" } }
{ "error": { "message": "DETAIL ERROR STRING" } }
POST /api/v1/namespaces/{namespace}/clusters/{cluster}/shards
{ "nodes":["127.0.0.1:6666"], "password":"" }
{ "data": "created" }
{ "error": { "message": "the entry already existed" } }
{ "error": { "message": "DETAIL ERROR STRING" } }
GET /api/v1/namespaces/{namespace}/clusters/{cluster}/shards/{shard}
{ "data": { "shard": { "nodes": [ { "id": "3SStZULMqclwvYNT8gN05IdybROe0vEnn97iNB5Z", "addr": "127.0.0.1:6666", "role": "master", "password": "", "master_auth": "", "created_at": 16834433980 } ], "slot_ranges": [ "0-16383" ], "import_slot": -1, "migrating_slot": -1 } } }
{ "error": { "message": "the entry does not exist" } }
{ "error": { "message": "DETAIL ERROR STRING" } }
GET /api/v1/namespaces/{namespace}/clusters/{cluster}/shards
{ "data": { "shards": [ { "nodes": [ { "id": "3SStZULMqclwvYNT8gN05IdybROe0vEnn97iNB5Z", "addr": "127.0.0.1:6666", "role": "master", "password": "", "master_auth": "", "created_at": 16834433980 } ], "slot_ranges": [ "0-16383" ], "import_slot": -1, "migrating_slot": -1 }, { "nodes": [ { "id": "y5PftTd0Lc3hH34yEyavIji86cRM5i3oxytt42vo", "addr": "127.0.0.1:6667", "role": "master", "password": "", "master_auth": "", "created_at": 16834433980 } ], "slot_ranges": null, "import_slot": -1, "migrating_slot": -1 } ] } }
{ "error": { "message": "DETAIL ERROR STRING" } }
DELETE /api/v1/namespaces/{namespace}/clusters/{cluster}/shards/{shard}
{ "data": "ok" }
{ "error": { "message": "the entry does not exist" } }
{ "error": { "message": "DETAIL ERROR STRING" } }
POST /api/v1/namespaces/{namespace}/clusters/{cluster}/shards/{shard}/nodes
{ "addr": "127.0.0.1:6666", "role": "slave", "password":"" }
{ "data": "created" }
{ "error": { "message": "the entry already existed" } }
{ "error": { "message": "DETAIL ERROR STRING" } }
GET /api/v1/namespaces/{namespace}/clusters/{cluster}/shards/{shard}/nodes
{ "data": { "nodes": [ { "id": "pxpE1JSBJcqicuwc95zqTPTj5rB7YtfvpociyH8C", "addr": "127.0.0.1:6666", "role": "master", "password": "", "created_at": 1686101693 }, { "id": "O0JKq1Hp9FtI3dJTU3MigWjjZJzPtduoDODX0OAY", "addr": "127.0.0.1:6667", "role": "slave", "password": "", "created_at": 1686102057 } ] } }
{ "error": { "message": "DETAIL ERROR STRING" } }
DELETE /api/v1/namespaces/{namespace}/clusters/{cluster}/shards/{shard}/nodes/{nodeID}
{ "data": "ok" }
{ "error": { "message": "the entry does not exist" } }
{ "error": { "message": "DETAIL ERROR STRING" } }
POST /api/v1/namespaces/{namespace}/clusters/{cluster}/migrate
{ "target": 1, "slot": 123, "slot_only": "false" }
{ "data": "ok" }
{ "error": { "message": "the entry does not exist" } }
{ "error": { "message": "DETAIL ERROR STRING" } }