Nodes requests

Node requests

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.

Permissions

Permission name Roles
view_all_nodes_info admin
cluster_member
cluster_viewer
db_member
db_viewer
user_manager

Request

Example HTTP request

GET /nodes

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.

Permissions

Permission name Roles
view_node_info admin
cluster_member
cluster_viewer
db_member
db_viewer
user_manager

Request

Example HTTP request

GET /nodes/1

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.

Permissions

Permission name Roles
update_node admin

Request

Example HTTP request

PUT /nodes/1

Example JSON body

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

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.

Body

Field Type Description
addr string Internal IP address of node
external_addr JSON array External IP addresses of the node
recovery_path string Path for recovery files
accept_servers boolean If 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

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.

Error codes

Code Description
node_not_found Node does not exist
node_not_offline Attempted to change node address while it is online
node_already_populated The node contains shards or endpoints, cannot disable accept_servers
invalid_oss_cluster_port_mapping Cannot 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_id Attempted to change node's rack_id when it already has one
RATE THIS PAGE
Back to top ↑