Nodeos Net API

For API request, it needs to perform a POST line with required parameters. The manual presents examples of requests using curl. Return code 201 indicates successful operation.

Producer API requests supported:

connect

The request initiates a connection to a specified peer.

Params:

  • (string) endpoint — The endpoint to connect to expressed as either IP address or URL.

Request example:

curl --request POST  --data '{"endpoint": "string"}' http://<node>/v1/net/connect

Responses

Code: 201 OK

Value:

{
  "added connection"    // Otherwise "already connected" if the connection was already initiated before 
}

disconnect

The request initiates disconnection from a specified peer.

Params:

  • (string) endpoint — The endpoint to disconnect from, expressed as either IP address or URL.

Request example:

Responses

Code: 201 OK

Value:

status

The request retreives the connection status for a specified peer.

Params:

  • (string) endpoint — The endpoint to get the status for, to expressed as either IP address or URL.

Request example:

Responses

Code: 201 OK

Value:

connections

The request returns an array of all peer connection statuses.

Params: No params required.

Request example:

Responses

Code: 201 OK

Value:

Last updated