MethodPathDescription
GET/v1/nodesGet all cluster nodes
GET/v1/nodes/{uid}Get a single cluster node
PUT/v1/nodes/{uid}Update a node

Get all nodes

GET /v1/nodes

Get all cluster nodes.

Permissions

Permission nameRoles
view_all_nodes_infoadmin
cluster_member
cluster_viewer
db_member
db_viewer

Request

Example HTTP request

GET /nodes

Headers

KeyValueDescription
Hostcnm.cluster.fqdnDomain name
Acceptapplication/jsonAccepted media type

Response

Returns a JSON array of node objects.

Example JSON body

[
    {
      "uid": 1,
      "status": "active",
      "uptime": 262735,
      "total_memory": 6260334592,
      "software_version": "0.90.0-1",
      "ephemeral_storage_size": 20639797248,
      "persistent_storage_path": "/var/opt/redislabs/persist",
      "persistent_storage_size": 20639797248,
      "os_version": "Ubuntu 14.04.2 LTS",
      "ephemeral_storage_path": "/var/opt/redislabs/tmp",
      "architecture": "x86_64",
      "shard_count": 23,
      "public_addr": "",
      "cores": 4,
      "rack_id": "",
      "supported_database_versions": [
        {
          "db_type": "memcached",
          "version": "1.4.17"
        },
        {
          "db_type": "redis",
          "version": "2.6.16"
        },
        {
          "db_type": "redis",
          "version": "2.8.19"
        }
      ],
      "shard_list": [1, 3, 4],
      "addr": "10.0.3.61"
    },
    {
      "uid": 1,
      "status": "active",
      "// additional fields..."
    }
]

Status codes

CodeDescription
200 OKNo error

Get node

GET /v1/nodes/{int: uid}

Get a single cluster node.

Permissions

Permission nameRoles
view_node_infoadmin
cluster_member
cluster_viewer
db_member
db_viewer

Request

Example HTTP request

GET /nodes/1

Headers

KeyValueDescription
Hostcnm.cluster.fqdnDomain name
Acceptapplication/jsonAccepted media type

URL parameters

FieldTypeDescription
uidintegerThe unique ID of the node requested.

Response

Returns a node object.

Example JSON body

{
    "uid": 1,
    "name": "node:1",
    "// additional fields..."
}

Status codes

CodeDescription
200 OKNo error
404 Not FoundNode UID does not exist

Update node

PUT /v1/nodes/{int: uid}

Update a node object.

Currently, you can edit the following attributes:

  • addr

  • external_addr

  • recovery_path

  • accept_servers

Note:
You can only update the addr attribute for offline nodes. Otherwise, the request returns an error.

Permissions

Permission nameRoles
update_nodeadmin

Request

Example HTTP request

PUT /nodes/1

Example JSON body

{
    "addr": "10.0.0.1",
    "external_addr" : [
        "192.0.2.24"
    ]
}

Request headers

KeyValueDescription
Hostcluster.fqdnDomain name
Acceptapplication/jsonAccepted media type
Content-Typeapplication/jsonMedia type of request/response body

URL parameters

FieldTypeDescription
uidintegerThe unique ID of the updated node.

Body

FieldTypeDescription
addrstringInternal IP address of node
external_addrJSON arrayExternal IP addresses of the node
recovery_pathstringPath for recovery files
accept_serversbooleanIf true, no shards will be created on the node

Response

If the request is successful, the body will be empty. Otherwise, it may contain a JSON object with an error code and error message.

Status codes

CodeDescription
200 OKNo error, the request has been processed.
406 Not AcceptableUpdate request cannot be processed.
400 Bad RequestBad content provided.

Error codes

CodeDescription
node_not_foundNode does not exist
node_not_offlineAttempted to change node address while it is online
node_already_populatedThe node contains shards or endpoints, cannot disable accept_servers
invalid_oss_cluster_port_mappingCannot enable “accept_servers” since there are databases with “oss_cluster_port_mapping” that do not have a port configuration for the current node
node_already_has_rack_idAttempted to change node’s rack_id when it already has one