POST /api/v1/namespaces
{
"namespace": "test-ns"
}
- 201
{
"data": "created"
}
- 409
{
"error": {
"message": "the entry already existed"
}
}
- 5XX
{
"error": {
"message": "DETAIL ERROR STRING"
}
}
GET /api/v1/namespaces
- 200
{
"data": {
"namespaces": ["test-ns"]
}
}
- 5XX
{
"error": {
"message": "DETAIL ERROR STRING"
}
}
GET /api/v1/namespaces/{namespace}
- 200
{
"data": "ok"
}
- 404
{
"error": {
"message": "the entry does not exist"
}
}
- 5XX
{
"error": {
"message": "DETAIL ERROR STRING"
}
}
POST /api/v1/namespaces/{namespace}/clusters
{
"name":"test-cluster",
"nodes":["127.0.0.1:6666"],
"replicas":1,
"password":""
}
- 201
{
"data": "created"
}
- 409
{
"error": {
"message": "the entry already existed"
}
}
- 5XX
{
"error": {
"message": "DETAIL ERROR STRING"
}
}
GET /api/v1/namespaces/{namespace}/clusters
- 200
{
"data": {
"clusters": ["test-cluster"]
}
}
- 5XX
{
"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":""
}
- 201
{
"data": "created"
}
- 409
{
"error": {
"message": "the entry already existed"
}
}
- 5XX
{
"error": {
"message": "DETAIL ERROR STRING"
}
}
GET /api/v1/namespaces/{namespace}/clusters/{cluster}
- 200
{
"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
}
]
}
}
}
- 404
{
"error": {
"message": "the entry does not exist"
}
}
- 5XX
{
"error": {
"message": "DETAIL ERROR STRING"
}
}
DELETE /api/v1/namespaces/{namespace}/clusters/{cluster}
- 200
{
"data": "ok"
}
- 404
{
"error": {
"message": "the entry does not exist"
}
}
- 5XX
{
"error": {
"message": "DETAIL ERROR STRING"
}
}
POST /api/v1/namespaces/{namespace}/clusters/{cluster}/shards
{
"nodes":["127.0.0.1:6666"],
"password":""
}
- 201
{
"data": "created"
}
- 409
{
"error": {
"message": "the entry already existed"
}
}
- 5XX
{
"error": {
"message": "DETAIL ERROR STRING"
}
}
GET /api/v1/namespaces/{namespace}/clusters/{cluster}/shards/{shard}
- 200
{
"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
}
}
}
- 404
{
"error": {
"message": "the entry does not exist"
}
}
- 5XX
{
"error": {
"message": "DETAIL ERROR STRING"
}
}
GET /api/v1/namespaces/{namespace}/clusters/{cluster}/shards
- 200
{
"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
}
]
}
}
- 5XX
{
"error": {
"message": "DETAIL ERROR STRING"
}
}
DELETE /api/v1/namespaces/{namespace}/clusters/{cluster}/shards/{shard}
- 200
{
"data": "ok"
}
- 404
{
"error": {
"message": "the entry does not exist"
}
}
- 5XX
{
"error": {
"message": "DETAIL ERROR STRING"
}
}
POST /api/v1/namespaces/{namespace}/clusters/{cluster}/shards/{shard}/nodes
{
"addr": "127.0.0.1:6666",
"role": "slave",
"password":""
}
- 201
{
"data": "created"
}
- 409
{
"error": {
"message": "the entry already existed"
}
}
- 5XX
{
"error": {
"message": "DETAIL ERROR STRING"
}
}
GET /api/v1/namespaces/{namespace}/clusters/{cluster}/shards/{shard}/nodes
- 200
{
"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
}
]
}
}
- 5XX
{
"error": {
"message": "DETAIL ERROR STRING"
}
}
DELETE /api/v1/namespaces/{namespace}/clusters/{cluster}/shards/{shard}/nodes/{nodeID}
- 200
{
"data": "ok"
}
- 404
{
"error": {
"message": "the entry does not exist"
}
}
- 5XX
{
"error": {
"message": "DETAIL ERROR STRING"
}
}
POST /api/v1/namespaces/{namespace}/clusters/{cluster}/migrate
{
"target": 1,
"slot": 123,
"slot_only": "false"
}
- 200
{
"data": "ok"
}
- 404
{
"error": {
"message": "the entry does not exist"
}
}
- 5XX
{
"error": {
"message": "DETAIL ERROR STRING"
}
}