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>

Modifying node properties

DELETE

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

Terminating the node


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 output.

limit

int

Maximum number of resources in the list.

order

array<object|str>

Sorting order of resources in the list.

flat

bool

Transformation of composite fields to flat form.

Example request
GET /rest/v1/master/nodes?offset=38&limit=4 HTTP/1.1

Response

Example response
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

Specifics

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

Request

Table 2. Request parameters
Name Type Description

mask

str

List of fields to output.

flat

bool

Transformation of composite fields to flat form.

Example request
GET /rest/v1/master/node/ws1 HTTP/1.1

Response

Example response
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
}

Modifying node properties

Fields prohibited for modification: id

Specifics

  • Allows setting the logging level in a targeted way.

Request

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

{
  "maxLogLevel": "debug"
}

Response

Example response
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
}

Terminating the node

Specifics

  • After termination the node is automatically restarted by the supervising supervisor.

  • If the server system root node (isSystem=true, type=supervisor) is terminated, it is restarted by the Docker daemon.

Request

Example request
DELETE /rest/v1/master/nodes/ws1 HTTP/1.1

Response

Example response
HTTP/1.1 204 No Content

Entity fields

Table 3. Fields
Field Description

name

Short node name. Can be used as an identifier.

fullName

Full node name. Can be used as an identifier.

ipAddress

Node/server IP address.

server

Server name from the configuration.

site

Site to which the server belongs.

isSystem

Flag indicating whether the node is a system node.

type

Node type: * role - a regular role node running the microservice (role) assigned to the server in the configuration. * supervisor - the supervisor node, the root node for the server.

maxLogLevel

Maximum configured logging level. Variants: * none (0) - logging disabled; * crash (1) - crashes; * error (2) - errors; * warning (3) - warnings; * info (4) - non-critical information; * trace (5) - process and algorithm tracing; * debug (6) - debug information; * highest (other values).

Important! When logging is disabled, some log entries are still placed in the log. The reason is that not every entry is supplied with a level indication.

status

Node status: * active - active * inactive - unavailable

dtStart

Start or last restart time in the UTC time zone.

upTimeSec

Uptime. Operating time without restart in seconds.

srvIdx

Node index from the configuration assigned to the microservice (role).