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.

Note

The same data as the REST methods of the node group return, can be obtained using the NodeConfig and NodeOwner gRPC 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.12.0-Dev3-213-66e7eb5",
 "cryptoType": "waves",
 "chainId": "T",
 "consensus": "POA",
 "minimumFee": {
   "3": 100000000,
   "4": 1000000,
   "5": 100000000,
   "6": 5000000,
   "7": 500000,
   "8": 1000000,
   "9": 1000000,
   "10": 100000000,
   "11": 5000000,
   "12": 5000000,
   "13": 50000000,
   "14": 100000000,
   "15": 100000000,
   "102": 1000000,
   "103": 100000000,
   "104": 10000000,
   "106": 1000000,
   "107": 100000000,
   "111": 1000000,
   "112": 100000000,
   "113": 50000000,
   "114": 5000000,
   "120": 0
 },
 "additionalFee": {
   "11": 1000000,
   "12": 1000000
 },
 "maxTransactionsInMicroBlock": 500,
 "minMicroBlockAge": 0,
 "microBlockInterval": 1500,
 "pkiMode": "TEST",
 "requiredOids": [
   "1.1.1.1"
 ],
 "crlChecksEnabled": false,
 "blockTiming": {
   "roundDuration": 7000,
   "syncDuration": 1000
 }
}

Note

The same data as the GET /node/config method returns, can be obtained using the NodeConfig gRPC method.

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"
}

Note

The same data as the GET /node/owner method returns, can be retrieved using the NodeOwner gRPC method.

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"
    "lastCheckTimestamp": 1543719501123,
}

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 v1.12.3"
}

GET /node​/logging

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

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

A complete list of loggers is given in the List of loggers section; node logging levels are listed and described in Precise platform configuration: logging section.

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

GET /node/healthcheck

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

The method checks availability of the external service specified in the request. The request must contain the service parameter, which can take one of the following values:

  • docker;

  • privacy-storage;

  • anchoring-auth.

docker value is used by default.

The method returns 200 OK and an empty answer if the check was successful, if not – 503 Service Unavailable and error description. If one of the external services is not configured (the docker engine on the node is disabled, the confidential data access groups setting is disabled, anchoring is disabled), the method returns 404 Not Found error with a message that the particular setting is disabled.

GET /node/healthcheck:
{
  "error": 199,
  "message": "Docker host is not available"
}

POST /node​/logging

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

The method is designed to change the logging level for the selected loggers. Node logging levels are listed and described in the Precise platform configuration: logging section; a complete list of loggers is given in the List of loggers section.

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.

anchoring group:

GET /anchoring/config

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",
 "targetnetnetNodeAddress": "https://clinton-pool.wavesenterpriseservices.com:443",
 "targetnetnetSchemeByte": "L",
 "targetnetnetRecipientAddress": "3JzVWCSV6v4ucSxtGSjZsvdiCT1FAzwpqrP",
 "targetnetnetFee": 8000000,
 "currentChainFee": 666666,
 "heightRange": 5,
 "heightAbove": 3,
 "threshold": 10
}
See also