Installation and usage of the platform

REST API: information about configuration and state of the node, stopping the node

There are two groups of methods to get information about the node configuration:

  • node - obtaining basic configuration parameters of a node, information about node state, stopping a node, changing a logging level;

  • anchoring - the GET /anchoring/config query, which returns the anchoring section of the node configuration file.

To get the basic configuration parameters of a node, there are both methods that require authorization and open methods.

node group:

GET /node/config

https://img.shields.io/badge/auth-required-orange.svg

The method returns the basic configuration parameters of a node.

Response example:

GET /node/config:
{
    {
      "version": "1.3.0-RC7",
      "gostCrypto": false,
      "chainId": "V",
      "consensus": "POA",
      "minimumFee": {
          "3": 0,
          "4": 0,
          "5": 0,
          "6": 0,
          "7": 0,
          "8": 0,
          "9": 0,
          "10": 0,
          "11": 0,
          "12": 0,
          "13": 0,
          "14": 0,
          "15": 0,
          "102": 0,
          "103": 0,
          "104": 0,
          "106": 0,
          "107": 0,
          "111": 0,
          "112": 0,
          "113": 0,
          "114": 0
      },
      "additionalFee": {
          "11": 0,
          "12": 0
      },
      "maxTransactionsInMicroBlock": 500,
      "minMicroBlockAge": 0,
      "microBlockInterval": 1000,
      "blockTiming": {
          "roundDuration": 7000,
          "syncDuration": 700
    }
}

GET /node/owner

https://img.shields.io/badge/auth-required-orange.svg

The method returns the address and the public key of the node owner.

Response example:

GET /node/config:
{
  "address": "3JFR1pmL6biTzr9oa63gJcjZ8ih429KD3aF",
  "publicKey": "EPxkVA9iQejsjQikovyxkkY8iHnbXsR3wjgkgE7ZW1Tt"
}

GET /node/status

https://img.shields.io/badge/auth-no-brightgreen.svg

The method returns information about the current state of the node.

Response example:

GET /node/status:
{
    "blockchainHeight": 47041,
    "stateHeight": 47041,
    "updatedTimestamp": 1544709501138,
    "updatedDate": "2018-12-13T13:58:21.138Z"
}

Also, if there are errors using GOST cryptography on a node, the method will return an error description:

GET /node/status:
{
    "error": 199,
    "message": "Environment check failed: Supported JCSP version is 5.0.40424, actual is 2.0.40424"
}

GET /node/version

https://img.shields.io/badge/auth-no-brightgreen.svg

The method returns a node version.

Response example:

GET /node/version:
{
  "version": "Waves Enterprise v0.9.0"
}

GET /node​/logging

https://img.shields.io/badge/auth-required-orange.svg

The method displays a list of loggers specified when configuring the node, and the logging level for each of them.

Node logging levels:

  • ERROR - error logging;

  • WARN - warning logging;

  • INFO - node events logging;

  • DEBUG - extended information about events for each running node module: a record of events that occurred and actions performed;

  • TRACE - detailed information about the events of the DEBUG level;

  • ALL - displaying of data from all logging levels.

Response example:

GET /node​/logging:
ROOT-DEBUG
akka-DEBUG
akka.actor-DEBUG
akka.actor.ActorSystemImpl-DEBUG
akka.event-DEBUG
akka.event.slf4j-DEBUG
akka.event.slf4j.Slf4jLogger-DEBUG
com-DEBUG
com.github-DEBUG
com.github.dockerjava-DEBUG
com.github.dockerjava.core-DEBUG
com.github.dockerjava.core.command-DEBUG
com.github.dockerjava.core.command.AbstrDockerCmd-DEBUG
com.github.dockerjava.core.exec-DEBUG

POST /node​/logging

https://img.shields.io/badge/auth-required-orange.svg

The method is designed to change the logging level for selected loggers.

Query example:

POST /node​/logging:
{
    "logger": "com.wavesplatform.Application",
    "level": "ALL"
}

POST /node/stop

https://img.shields.io/badge/auth-required-orange.svg

The method stops the node, it has no response.

The GET /anchoring/config method:

https://img.shields.io/badge/auth-required-orange.svg

The method outputs the anchoring section of the node configuration file.

Response example:

GET /anchoring/config:
{
 "enabled": true,
 "currentChainOwnerAddress": "3FWwx4o1177A4oeHAEW5EQ6Bkn4Lv48quYz",
 "mainnetNodeAddress": "https://clinton-pool.wavesenterpriseservices.com:443",
 "mainnetSchemeByte": "L",
 "mainnetRecipientAddress": "3JzVWCSV6v4ucSxtGSjZsvdiCT1FAzwpqrP",
 "mainnetFee": 8000000,
 "currentChainFee": 666666,
 "heightRange": 5,
 "heightAbove": 3,
 "threshold": 10
}
See also