Overview

NIS2-API is a REST API that combines HTTP and WebSockets to perform read and write actions in the NEM blockchain through NEM Infrastructure Server.

Interacting with the API

Warning

The configuration presented is NOT intended to be used on the public network. These are the parameters used for the Catapult Testnet version (MIJIN_TEST).

NIS uses port 3000 to communicate with its clients. It accepts both HTTP GET, PUT and POST requests.

Assuming that the NIS is running locally, HTTP GET requests can be executed from a browser and have the form:

http://localhost:3000/<path-to-API-request> for example:

http://localhost:3000/account/7D08373CFFE4154E129E04F0827E5F3D6907587E348757B0F87D2F839BF88246/transactions

HTTP PUT and POST requests use JSON structures in the request body to supply data to NIS.

Both request types return data (if any is returned) using JSON structures.

Tools

We recommend using one of the following tools to interact with NIS2-API, especially for PUT and POST methods.

This kind of request usually cannot be executed from within the browser unless you use a plugin which enables you to do it.

Insomnia

Download Insomnia app for your operative system and import: