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 REST API method calls are HTTP GET, POST or DELETE requests to URL, containing the corresponding parameter sets.

The platform also provides access to the Swagger 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:

Query example

The port for listening to the REST API requests is specified in the parameter of the node configuration file; generally the 6862 port is used.

Almost all REST API methods require authorization by api-key or JWT token (oAuth2 authorization). The authorization method is set in the auth section of the node configuration file.

When authorizing by api-key, specify the value of the selected key phrase, and when authorizing by JWT-token specify the access-token value.

When JWT token authorization is used, the user is assigned a role (or several roles), which determines certain REST API methods accessibility. For more details see Authorization service and OAuth2 authorization roles sections.

What the platform REST API is for

You can use the REST API to perform the following tasks:

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 badge icon at the beginning of the article.

If authorization is not required, you will see an badge1 icon.

See also