Dev:API - System: Difference between revisions

From Nexus Wiki
Jump to navigation Jump to search
Created page with "The System API provides public access to information about this node. This includes data such as the version of software the node is running, ledger and mempool state, node IP address, and number of connected peers. == Direct Endpoints == The following commands are direct endpoints and thus do not support the above verb and noun structure available above: get/info get/metrics list/peers list/lisp-eids stop validate/address Direct endpoints support filters..."
 
No edit summary
 
(2 intermediate revisions by the same user not shown)
Line 5: Line 5:
The following commands are direct endpoints and thus do not support the above verb and noun structure available above:
The following commands are direct endpoints and thus do not support the above verb and noun structure available above:


  get/info
get/info
  get/metrics
get/metrics
  list/peers
list/peers
  list/lisp-eids
list/lisp-eids
  stop
stop
  validate/address
validate/address


Direct endpoints support filters and operators.
Direct endpoints support filters and operators.
Line 18: Line 18:
Returns a summary of information about this node.
Returns a summary of information about this node.


  system/get/info
system/get/info


Return JSON object:
==== Example Response JSON ====


  {
{
    "version": "5.1.0-rc2 Tritium++ CLI [LLD][x64]",
  "version": "5.1.0-rc2 Tritium++ CLI [LLD][x64]",
    "protocolversion": 3010000,
  "protocolversion": 3010000,
    "walletversion": 10001,
  "walletversion": 10001,
    "timestamp": 1658759654,
  "timestamp": 1658759654,
    "hostname": "localhost",
  "hostname": "localhost",
    "directory": "/home/nexus/.Nexus/",
  "directory": "/home/nexus/.Nexus/",
    "address": "11.79.25.105",
  "address": "11.79.25.105",
    "private": false,
  "private": false,
    "hybrid": false,
  "hybrid": false,
    "multiuser": false,
  "multiuser": false,
    "litemode": false,
  "litemode": false,
    "blocks": 4553990,
  "blocks": 4553990,
    "synchronizing": false,
  "synchronizing": false,
    "synccomplete": 100,
  "synccomplete": 100,
    "syncprogress": 100,
  "syncprogress": 100,
    "txtotal": 0,
  "txtotal": 0,
    "connections": 41
  "connections": 41
  }
}
  [Completed in 0.070190 ms]
 
=== get/metrics ===
 
Returns metrics and statistics for the ledger, registers, sigchains, trust and reserves.
 
system/get/metrics
 
==== Example Response JSON ====
 
{
  "registers": {
    "total": 183908,
    "names": {
      "global": 38,
      "local": 60668,
      "namespaced": 29
  },
  "namespaces": 14,
  "objects": {
    "accounts": 91400,
    "assets": 123,
    "crypto": 30362,
    "tokenized": 51,
    "tokens": 134
  },
  "state": {
    "raw": 0,
    "readonly": 706
  },
  "sigchains": 30351,
  "trust": {
    "total": 501,
    "stake": 30155872.897004,
    "trust": 8360292851
  },
  "reserves": {
    "ambassador": 332.180905,
    "developer": 222.343689,
    "fee": 108889.217,
    "hash": 91.32012,
    "prime": 32.78941
  }
}

Latest revision as of 14:57, 6 October 2024

The System API provides public access to information about this node. This includes data such as the version of software the node is running, ledger and mempool state, node IP address, and number of connected peers.

Direct Endpoints

The following commands are direct endpoints and thus do not support the above verb and noun structure available above:

get/info
get/metrics
list/peers
list/lisp-eids
stop
validate/address

Direct endpoints support filters and operators.

get/info

Returns a summary of information about this node.

system/get/info

Example Response JSON

{
  "version": "5.1.0-rc2 Tritium++ CLI [LLD][x64]",
  "protocolversion": 3010000,
  "walletversion": 10001,
  "timestamp": 1658759654,
  "hostname": "localhost",
  "directory": "/home/nexus/.Nexus/",
  "address": "11.79.25.105",
  "private": false,
  "hybrid": false,
  "multiuser": false,
  "litemode": false,
  "blocks": 4553990,
  "synchronizing": false,
  "synccomplete": 100,
  "syncprogress": 100,
  "txtotal": 0,
  "connections": 41
}

get/metrics

Returns metrics and statistics for the ledger, registers, sigchains, trust and reserves.

system/get/metrics

Example Response JSON

{
  "registers": {
    "total": 183908,
    "names": {
      "global": 38,
      "local": 60668,
      "namespaced": 29
  },
  "namespaces": 14,
  "objects": {
    "accounts": 91400,
    "assets": 123,
    "crypto": 30362,
    "tokenized": 51,
    "tokens": 134
  },
  "state": {
    "raw": 0,
    "readonly": 706
  },
  "sigchains": 30351,
  "trust": {
    "total": 501,
    "stake": 30155872.897004,
    "trust": 8360292851
  },
  "reserves": {
    "ambassador": 332.180905,
    "developer": 222.343689,
    "fee": 108889.217,
    "hash": 91.32012,
    "prime": 32.78941
  }
}