Dev:API - System: Difference between revisions

From Nexus Wiki
Jump to navigation Jump to search
m Nexus wiki moved page API - System to Dev:API - System without leaving a redirect
No edit summary
Line 42: Line 42:
   }
   }
   [Completed in 0.070190 ms]
   [Completed in 0.070190 ms]
=== get/metrics ===
Returns metrics and statistics for the ledger, registers, sigchains, trust and reserves.
  system/get/metrics
Return JSON object:
  {
    "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
    }
  }
  [Completed in 1020.804545 ms]

Revision as of 08:06, 4 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

Return JSON object:

 {
   "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
 }
 [Completed in 0.070190 ms]


get/metrics

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

 system/get/metrics

Return JSON object:

 {
   "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
   }
 }
 [Completed in 1020.804545 ms]