Manage Nodes in a Cluster

Add a Node

See Adding a Node for information on adding nodes.

Show Information about a Node in a Cluster

You can fetch/re-post the object representing the node in the cluster using GET/PUT requests. $NODE_ID is the integer ID of the new node.

Description Shows a node in the cluster  
MethodGET /api/v1/clusterconfig/members/id 
Response Datanode 
Authentication Requiredyes 
Path ArgumentsDescriptionData typeRequired?
id ID of the bucket storage configuration stringrequired
Return Codes 
200 Request complete  
400 Bad authentication  
500 Request failed  

To redirect the output to a JSON file, run the script like this:

shell
$ script>$YOUR_FILE_NAME.json

You can then use this as the payload in further requests when updating the information.

http
GET /api/v1/clusterconfig/members/$NODE_ID
Mac OS or Linux (curl)
shell
curl -v -X GET $YOUR_LOGSCALE_URL/api/v1/clusterconfig/members/$NODE_ID \
    -H "Authorization: Bearer $TOKEN" \
    -H "Content-Type: application/json"
Mac OS or Linux (curl) One-line
shell
curl -v -X GET $YOUR_LOGSCALE_URL/api/v1/clusterconfig/members/$NODE_ID \
    -H "Authorization: Bearer $TOKEN" \
    -H "Content-Type: application/json"
Windows Cmd and curl
shell
curl -v -X GET $YOUR_LOGSCALE_URL/api/v1/clusterconfig/members/$NODE_ID ^
    -H "Authorization: Bearer $TOKEN" ^
    -H "Content-Type: application/json"
Windows Powershell and curl
powershell
curl.exe -X GET 
    -H "Authorization: Bearer $TOKEN"
    -H "Content-Type: application/json"
    "$YOUR_LOGSCALE_URL/api/v1/clusterconfig/members/$NODE_ID"
Perl
perl
#!/usr/bin/perl

use HTTP::Request;
use LWP;

my $INGEST_TOKEN = "TOKEN";

my $uri = '$YOUR_LOGSCALE_URL/api/v1/clusterconfig/members/$NODE_ID';

my $req = HTTP::Request->new("GET", $uri );

$req->header("Authorization" => "Bearer $TOKEN");
$req->header("Content-Type" => "application/json");


my $lwp = LWP::UserAgent->new;

my $result = $lwp->request( $req );

print $result->{"_content"},"\n";
Python
python
#! /usr/local/bin/python3

import requests

url = '$YOUR_LOGSCALE_URL/api/v1/clusterconfig/members/$NODE_ID'

resp = requests.get(url,
                     headers = {
   "Authorization" : "Bearer $TOKEN",
   "Content-Type" : "application/json"
}
)

print(resp.text)
Node.js
javascript
const https = require('https');

let request = https.get('$YOUR_LOGSCALE_URL/api/v1/clusterconfig/members/$NODE_ID', (res) => {
  if (res.statusCode !== 200) {
    console.error(`Error from server. Code: ${res.statusCode}`);
    res.resume();
    return;
  }

  let data = '';

  res.on('data', (chunk) => {
    data += chunk;
  });

  res.on('close', () => {
    console.log('Response:');
    console.log(JSON.parse(data));
  });
});

    return(undef,undef);
}
Example Responses
Success (HTTP Response Code 200 OK)
json
[
  {
    "vhost": 1,
    "uuid": "7q2LwHv6q3C5jmdGj3EYL1n56olAYcQy",
    "internalHostUri": "$YOUR_LOGSCALE_URL",
    "displayName": "host-1"
  }
]

The returned JSON has the following structure:

Table: Response Structure

FieldTypeDescription
displayNamestring User configurable name for this host
internalHostUriuri Internal URI for this node
uuidstring Universally unique ID for this node; not user configurable
vhostinteger Node ID; not user configurable

Modify information about a node in a cluster

Description Update the configuration of a node in the cluster.  
MethodPUT /api/v1/clusterconfig/members/id 
Request Datanode 
Response Datanode 
Authentication Requiredyes 
Path ArgumentsDescriptionData typeRequired?
id ID of the bucket storage configuration stringrequired
Return Codes 
200 Request complete  
400 Bad authentication  
500 Request failed  
http
PUT /api/v1/clusterconfig/members/$NODE_ID
Mac OS or Linux (curl)
shell
curl -v -X PUT $YOUR_LOGSCALE_URL/api/v1/clusterconfig/members/$NODE_ID \
    -H "Authorization: Bearer $TOKEN" \
    -H "Content-Type: application/json"
Mac OS or Linux (curl) One-line
shell
curl -v -X PUT $YOUR_LOGSCALE_URL/api/v1/clusterconfig/members/$NODE_ID \
    -H "Authorization: Bearer $TOKEN" \
    -H "Content-Type: application/json"
Windows Cmd and curl
shell
curl -v -X PUT $YOUR_LOGSCALE_URL/api/v1/clusterconfig/members/$NODE_ID ^
    -H "Authorization: Bearer $TOKEN" ^
    -H "Content-Type: application/json"
Windows Powershell and curl
powershell
curl.exe -X PUT 
    -H "Authorization: Bearer $TOKEN"
    -H "Content-Type: application/json"
    "$YOUR_LOGSCALE_URL/api/v1/clusterconfig/members/$NODE_ID"
Perl
perl
#!/usr/bin/perl

use HTTP::Request;
use LWP;

my $INGEST_TOKEN = "TOKEN";

my $uri = '$YOUR_LOGSCALE_URL/api/v1/clusterconfig/members/$NODE_ID';

my $req = HTTP::Request->new("PUT", $uri );

$req->header("Authorization" => "Bearer $TOKEN");
$req->header("Content-Type" => "application/json");


my $lwp = LWP::UserAgent->new;

my $result = $lwp->request( $req );

print $result->{"_content"},"\n";
Python
python
#! /usr/local/bin/python3

import requests

url = '$YOUR_LOGSCALE_URL/api/v1/clusterconfig/members/$NODE_ID'

resp = requests.put(url,
                     headers = {
   "Authorization" : "Bearer $TOKEN",
   "Content-Type" : "application/json"
}
)

print(resp.text)
Node.js
javascript
const https = require('https');

let request = https.put('$YOUR_LOGSCALE_URL/api/v1/clusterconfig/members/$NODE_ID', (res) => {
  if (res.statusCode !== 200) {
    console.error(`Error from server. Code: ${res.statusCode}`);
    res.resume();
    return;
  }

  let data = '';

  res.on('data', (chunk) => {
    data += chunk;
  });

  res.on('close', () => {
    console.log('Response:');
    console.log(JSON.parse(data));
  });
});

    return(undef,undef);
}
Example Responses
Success (HTTP Response Code 200 OK)
json
[
  {
    "vhost": 1,
    "uuid": "7q2LwHv6q3C5jmdGj3EYL1n56olAYcQy",
    "internalHostUri": "$YOUR_LOGSCALE_URL",
    "displayName": "host-1"
  }
]

The returned JSON has the following structure:

Table: Response Structure

FieldTypeDescription
displayNamestring User configurable name for this host
internalHostUriuri Internal URI for this node
uuidstring Universally unique ID for this node; not user configurable
vhostinteger Node ID; not user configurable

You can edit the fields internalHostUri and displayName in this structure and POST the resulting changes back to the server, preserving the vhost and uuid fields.

Delete a Node from a Cluster

See Removing a Node documentation on removing a node from a cluster.

Description Delete the configuration of a node in the cluster.  
MethodDELETE /api/v1/clusterconfig/members/id 
Authentication Requiredyes 
Path ArgumentsDescriptionData typeRequired?
id ID of the bucket storage configuration stringrequired
Query ArgumentsDescriptionData typeRequired?
accept-data-loss Force deletion of the node configuration booleanoptional
 Supported Values  
 falseDeletes only if no data or partitions are assigned 
 trueForce deletion even if it has data and assigned partitions 
Return Codes 
200 Request complete  
400 Bad authentication  
500 Request failed  

If the host does not have any segment files, and no assigned partitions, there is no data loss when deleting a node.

http
DELETE /api/v1/clusterconfig/members/$NODE_ID
Mac OS or Linux (curl)
shell
curl -v -X DELETE $YOUR_LOGSCALE_URL/api/v1/clusterconfig/members/$NODE_ID \
    -H "Authorization: Bearer $TOKEN" \
    -H "Content-Type: application/json"
Mac OS or Linux (curl) One-line
shell
curl -v -X DELETE $YOUR_LOGSCALE_URL/api/v1/clusterconfig/members/$NODE_ID \
    -H "Authorization: Bearer $TOKEN" \
    -H "Content-Type: application/json"
Windows Cmd and curl
shell
curl -v -X DELETE $YOUR_LOGSCALE_URL/api/v1/clusterconfig/members/$NODE_ID ^
    -H "Authorization: Bearer $TOKEN" ^
    -H "Content-Type: application/json"
Windows Powershell and curl
powershell
curl.exe -X DELETE 
    -H "Authorization: Bearer $TOKEN"
    -H "Content-Type: application/json"
    "$YOUR_LOGSCALE_URL/api/v1/clusterconfig/members/$NODE_ID"
Perl
perl
#!/usr/bin/perl

use HTTP::Request;
use LWP;

my $INGEST_TOKEN = "TOKEN";

my $uri = '$YOUR_LOGSCALE_URL/api/v1/clusterconfig/members/$NODE_ID';

my $req = HTTP::Request->new("DELETE", $uri );

$req->header("Authorization" => "Bearer $TOKEN");
$req->header("Content-Type" => "application/json");


my $lwp = LWP::UserAgent->new;

my $result = $lwp->request( $req );

print $result->{"_content"},"\n";
Python
python
#! /usr/local/bin/python3

import requests

url = '$YOUR_LOGSCALE_URL/api/v1/clusterconfig/members/$NODE_ID'

resp = requests.delete(url,
                     headers = {
   "Authorization" : "Bearer $TOKEN",
   "Content-Type" : "application/json"
}
)

print(resp.text)
Node.js
javascript
const https = require('https');

let request = https.delete('$YOUR_LOGSCALE_URL/api/v1/clusterconfig/members/$NODE_ID', (res) => {
  if (res.statusCode !== 200) {
    console.error(`Error from server. Code: ${res.statusCode}`);
    res.resume();
    return;
  }

  let data = '';

  res.on('data', (chunk) => {
    data += chunk;
  });

  res.on('close', () => {
    console.log('Response:');
    console.log(JSON.parse(data));
  });
});

    return(undef,undef);
}

It is possible to drop a host, even if it has data and assigned partitions, by adding the query parameter accept-data-loss with the value true.

Warning

This procedure silently drops your data.