Installation and usage of the platform
REST API methods¶
The REST API allows users to remotely interact with a node via JSON requests and responses. The API is accessed via the https protocol. The Swagger framework is used as an interface to the REST API.
REST API usage¶
All the REST API method calls are GET, POST or DELETE HTTP requests to the
https://yournetwork.com/node-N URL, containing the appropriate parameter sets. The platform also provides access to the Swagger
https://yournetwork.com/node-N/api-docs/index.html interface, which allows you to make and send HTTP requests to the node through the web interface. The desired groups of requests can be selected in the Swagger interface by selecting routes – the URLs to individual REST API methods. At the end of each route there is an endpoint – a reference to the method.
Example of a UTX pool size query:
Для использования практически всех методов REST API требуется авторизация по
api-key или JWT-токену.
When authorizing by
api-key, specify the value of the selected passphrase, and when authorizing by JWT-token - the value of access-token.
At the same time, for methods related to access to the node, only authorization by
api-key is provided:
access to the keystore of a node (e.g. the sign method);
working with private data access groups;
access to the node configuration.
If authorization by JWT-token is used, access to these methods will be denied.
What the platform REST API is for¶
You can use the REST API to perform the following tasks:
- REST API: transactions
- REST API: generation and checking of data digital signatures (PKI)
- REST API: encryption and decryption methods
- REST API: confidential data exchange and obtaining of information about confidential data groups
- REST API: node licenses
- REST API: validation of addresses and aliases of network participants
- REST API: signing and validating messages in the blockchain
- REST API: information about configuration and state of the node, stopping the node
- REST API: information about network participants
- REST API: information about activation of the platform features
- REST API: information about a consensus algorithm in use
- REST API: information about smart contracts
- REST API: information about network blocks
- REST API: information about permissions of participants
- REST API: information about address assets and balances
- REST API: blockchain peers
- REST API: hash calculation, working with scripts and sending auxiliary queries
- REST API: blockchain debug
Each article contains a table with the addresses of the methods as well as the query and response fields of each method.
If the described REST API methods require authorization, there is an icon at the beginning of the article.
If authorization is not required, you will see an icon.