nodes

Requests

HTTP verb Endpoint Description

GET

/rest/v1/master/nodes

Getting the list of nodes

GET

/rest/v1/master/nodes/<name>

Getting node data

PATCH

/rest/v1/master/nodes/<name>

Changing node properties

DELETE

/rest/v1/master/nodes/<name>

Node termination


Getting the list of nodes

Request

Table 1. Request parameters
Name Type Description

filter

object

Filter by field values.

mask

str

List of fields to output. Available fields for output: name, fullName, ipAddress, site, server, isSystem, type, dtStart, upTimeSec, status, maxLogLevel, roles.

offset

int

Offset in the list of resources to be issued.

limit

int

The maximum number of resources in the list.

order

array<object|str>

The sort order of the resources in the list.

flat

bool

Conversion to flat form of composite fields.

Request example
GET /rest/v1/master/nodes?offset=38&limit=4 HTTP/1.1

Response

Response example
HTTP/1.1 200 OK
Content-Type: application/json; charset=utf-8

[
  {
    "dtStart": "2023-03-22T08:06:18Z",
    "fullName": "testserv@192.168.0.112",
    "ipAddress": "192.168.0.112",
    "isSystem": true,
    "maxLogLevel": "info",
    "name": "testserv",
    "server": "testserv",
    "site": "main_site",
    "status": "active",
    "type": "supervisor",
    "upTimeSec": 9487
  },
  {
    "dtStart": "2023-03-22T08:07:13Z",
    "fullName": "vmail1@192.168.0.112",
    "ipAddress": "192.168.0.112",
    "maxLogLevel": "info",
    "name": "vmail1",
    "roles": [
      "voicemail"
    ],
    "server": "testserv",
    "site": "main_site",
    "status": "active",
    "type": "role",
    "upTimeSec": 9432
  },
  {
    "dtStart": "2023-03-22T08:37:14Z",
    "fullName": "ws1@192.168.0.112",
    "ipAddress": "192.168.0.112",
    "maxLogLevel": "info",
    "name": "ws1",
    "roles": [
      "webserver"
    ],
    "server": "testserv",
    "site": "main_site",
    "srvIdx": 2525,
    "status": "active",
    "type": "role",
    "upTimeSec": 7631
  },
  {
    "dtStart": "2023-03-22T08:06:41Z",
    "fullName": "wssubscr1@192.168.0.112",
    "ipAddress": "192.168.0.112",
    "maxLogLevel": "info",
    "name": "wssubscr1",
    "roles": [
      "mnesia",
      "wssubscr"
    ],
    "server": "testserv",
    "site": "main_site",
    "status": "active",
    "type": "role",
    "upTimeSec": 9464
  }
]

Getting node data

Features

  • The identifier is the node name (name) or the full name of the node (fullName).

Request

Table 2. Request parameters
Name Type Description

mask

str

A list of fields to output.

flat

bool

Conversion to flat form of composite fields.

Request example
GET /rest/v1/master/node/ws1 HTTP/1.1

Response

Response example
HTTP/1.1 200 OK
Content-Type: application/json; charset=utf-8

{
  "dtStart": "2023-03-22T08:37:14Z",
  "fullName": "ws1@192.168.0.112",
  "ipAddress": "192.168.0.112",
  "maxLogLevel": "info",
  "name": "ws1",
  "roles": [
    "webserver"
  ],
  "server": "testserv",
  "site": "main_site",
  "srvIdx": 2525,
  "status": "active",
  "type": "role",
  "upTimeSec": 7631
}

Changing node properties

Fields prohibited for modification: id

Features

  • Allows you to address the logging level.

Request

Request example
PATCH /rest/v1/master/nodes/ws1 HTTP/1.1
Content-Type: application/json; charset=utf-8

{
  "maxLogLevel": "debug"
}

Response

Response example
HTTP/1.1 200 OK
Content-Type: application/json; charset=utf-8

{
  "dtStart": "2023-03-22T08:37:14Z",
  "fullName": "ws1@192.168.0.112",
  "ipAddress": "192.168.0.112",
  "maxLogLevel": "debug",
  "name": "ws1",
  "roles": [
    "webserver"
  ],
  "server": "testserv",
  "site": "main_site",
  "srvIdx": 2525,
  "status": "active",
  "type": "role",
  "upTimeSec": 7631
}

Node termination

Features

  • When a node is terminated, it is automatically restarted by the supervisor above it.

  • If you terminate the system root node of the server (isSystem=true, type=supervisor), the docker daemon restarts it.

Request

Request example
DELETE /rest/v1/master/nodes/ws1 HTTP/1.1

Response

Response example
HTTP/1.1 204 No Content

Entity fields

Table 3. Fields
Field Description

name

The short name of the node. Can be used as an identifier.

fullName

The full name of the node. Can be used as an identifier.

ipAddress

IP-node/server address

server

The server name from the configuration.

site

The site to which the server refers.

isSystem

An indication of the systematicity of the node.

type

Node Type: * role - A regular role node that executes the microservice (role) assigned to the server in the configuration. * supervisor - supervisor node, root for the server.

maxLogLevel

Maximum logging level set. Options: * none (0) - level off; * crash (1) - falls; * error (2) - errors; * warning (3) - warnings; * info (4) - non-critical information; * trace (5) - process and algorithm tracing; * debug (6) - debugging information; * highest (other meanings).

Important! When logging is turned off, some of the entries in the logfile will still be placed. The point is that not every entry is provided with a level indication.

status

Node Status: * active - active * inactive - unavailable

dtStart

Time of startup or last restart in time zone UTC.

upTimeSec

Uptime. Operating time without rebooting in seconds.

srvIdx

The node index from the configuration assigned to the microservice (role).