Dev:API - System: Difference between revisions

From Nexus Wiki
Jump to navigation Jump to search
No edit summary
No edit summary
 
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]",
    "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]


{
  "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 ===
=== get/metrics ===
Line 48: Line 46:
Returns metrics and statistics for the ledger, registers, sigchains, trust and reserves.
Returns metrics and statistics for the ledger, registers, sigchains, trust and reserves.


  system/get/metrics
system/get/metrics


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


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

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
  }
}