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
- theGET /anchoring/config
query, which returns theanchoring
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¶
The method returns the basic configuration parameters of a node.
Response example:
Note
The same data as the GET /node/config method returns, can be obtained using the NodeConfig gRPC method.
GET /node/owner¶
The method returns the address and the public key of the node owner.
Response example:
Note
The same data as the GET /node/owner method returns, can be retrieved using the NodeOwner gRPC method.
GET /node/status¶
The method returns information about the current state of the node.
Response example:
GET /node/version¶
The method returns a node version.
Response example:
GET /node/logging¶
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/healthcheck¶
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.
POST /node/logging¶
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/stop¶
The method stops the node, it has no response.
anchoring
group:¶
GET /anchoring/config¶
The method outputs the anchoring
section of the node configuration file.
Response example: