Method Path Description
GET /v1/nodes Get 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.

Required permissions

Permission name
view_all_nodes_info

Request

Example HTTP request

GET /nodes 

Request headers

Key Value Description
Host cnm.cluster.fqdn Domain name
Accept application/json Accepted 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

Code Description
200 OK No error

Get node

GET /v1/nodes/{int: uid}

Get a single cluster node.

Required permissions

Permission name
view_node_info

Request

Example HTTP request

GET /nodes/1 

Request headers

Key Value Description
Host cnm.cluster.fqdn Domain name
Accept application/json Accepted media type

URL parameters

Field Type Description
uid integer The unique ID of the node requested.

Response

Returns a node object.

Example JSON body

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

Status codes

Code Description
200 OK No error
404 Not Found Node 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.

Required permissions

Permission name
update_node

Request

Example HTTP request

PUT /nodes/1 

Example JSON body

{ "addr": "10.0.0.1" }

Request headers

Key Value Description
Host cluster.fqdn Domain name
Accept application/json Accepted media type
Content-Type application/json Media type of request/response body

URL parameters

Field Type Description
uid integer The unique ID of the updated node.

Request body

Field Type Description
addr string Internal IP address of node
external_addr complex object External IP addresses of node. GET /jsonschema to retrieve the object’s structure.
recovery_path string Path for recovery files
accept_servers boolean If true, no shards will be created on the node

Response

If an error status is returned, the body may contain a JSON object that describes the error.

Example JSON body

{
    "error_code": "node_not_offline", 
    "description": "Attempted to change node address while it is online" 
}

Status codes

Code Description
200 OK No error, the request has been processed.
406 Not Acceptable Update request cannot be processed.
400 Bad Request Bad content provided.