v12

latestOpenAPI 3.0.3raw.githubusercontent.com2021-12-0672021.4 KB
node

Returns the list of known nodes that are compatible with the current catapult version.

get/nodes

Query parameters

filter'suggested' | 'preferred'

suggested: All available API nodes that have a REST endpoint and are online. preferred: Preferred API nodes that have a REST endpoint and are online. Preferred nodes match some specific domains.

Example:preferred

Filter the nodes by the optional filter.

limitinteger
Example:30

The maximum number of nodes to be returned.

sslboolean

When true, return only nodes which support HTTPS.

Example:true

Filter nodes according to HTTPS support.

order'natural' | 'random'

'natural': Nodes are returned in the order they are stored in the database. random: Default list order when a limit is specified. Returns {limit} number of random nodes, ordering falls back to 'natural' when limit is not specified.

Example:random

Sorts and samples the nodes to be returned

Response

The list of known nodes.

publicKeystring required

Node's main account's public key.

rolesinteger required

A number that defines the different roles the node provides. Possible roles are:

  • 1 - Peer node.
  • 2 - API node.
  • 4 - Voting node.
  • 64 - IPv4 compatible node
  • 128 - IPv6 compatible node.

The values are bitwise added together, for example: 1 = Only Peer. 2 = Only API. 3 = Both Peer and API node. 7 = Peer, API and Voting node. 65 = IPv4 and Peer node.

versioninteger required

The version is encoded as a single 4-byte integer, where the Most-Significant Byte encodes the Major version, and the rest of bytes are the Minor, the Micro and the Patch version. For example, version 16777472 (decimal) is 01000100h (hex), which corresponds to version 1.0.1.0.

friendlyNamestring required

Node friendly name.

networkGenerationHashSeedstring required

Hash seed of the network this node is connected to. All nodes connected to the same network have the same Hash Seed.

portinteger required

Port used for the communication.

networkIdentifier104 | 152

Network type:

  • 0x68 (104 decimal) - Public main network.
  • 0x98 (152 decimal) - Public test network.
hoststring required

Server IP or Hostname

Example response

[
  {
    "publicKey": "E3FC28889BDE31406465167F1D9D6A16DCA1FF67A3BABFA5E5A8596478848FCC",
    "roles": 3,
    "version": 16777728,
    "friendlyName": "My Node",
    "networkGenerationHashSeed": "3B5E1FA6445653C971A50687E75E6D09FB30481055E3990C84B25E9222DC1155",
    "port": 7900,
    "networkIdentifier": 144,
    "host": "somehost.symbol.io",
    "peerStatus": {
      "lastStatusCheck": 1635515531373,
      "isAvailable": true
    },
    "apiStatus": {
      "webSocket": {
        "isAvailable": true,
        "wss": true,
        "url": "wss://symbol.node.dev:3001/ws"
      },
      "restGatewayUrl": "https://symbol.node.dev:3001",
      "isAvailable": true,
      "lastStatusCheck": 1635531195763,
      "nodeStatus": {
        "apiNode": "up",
        "db": "down"
      },
      "isHttpsEnabled": true,
      "nodePublicKey": "A2160AB911943082C88109DD8B65A0082EF547CA7C28F001F857112F7ADD9B3D",
      "chainHeight": 512127,
      "finalization": {
        "height": 512112,
        "epoch": 713,
        "point": 13,
        "hash": "7C9BDF478CB18562A078F191867CB9B3FB12601AE0C69606A34C602A0F7D47EB"
      },
      "restVersion": "2.3.7"
    },
    "hostDetail": {
      "host": "somehost.symbol.io",
      "location": "Ashburn, VA, United States",
      "ip": "3.86.20.100",
      "organization": "My VPC provider",
      "as": "Some Company, Inc.",
      "continent": "North America",
      "country": "United States",
      "region": "VA",
      "city": "Ashburn",
      "district": "Springfield",
      "zip": "20149"
    }
  }
]
All 7 operations