Skip to main content

Info API Methods

Info API returns basic info about the node

The API provides the following functions and endpoints:

Client lib APIs:

/info#

Returns basic info about the node.

Parameters#

None.

Examples#

cURL#

curl --location 'http://localhost:8080/info'

Client lib - Info#

Information of a node can be retrieved via Info() (*jsonmodels.InfoResponse, error)

info, err := goshimAPI.Info()if err != nil {    // return error}
// will print the responsefmt.Println(string(info))

Response example#

{  "version": "v0.6.2",  "networkVersion": 30,  "tangleTime": {    "messageID": "6ndfmfogpH9H8C9X9Fbb7Jmuf8RJHQgSjsHNPdKUUhoJ",    "time": 1621879864032595415,    "synced": true  },  "identityID": "D9SPFofAGhA5V9QRDngc1E8qG9bTrnATmpZMdoyRiBoW",  "identityIDShort": "XBgY5DsUPng",  "publicKey": "9DB3j9cWYSuEEtkvanrzqkzCQMdH1FGv3TawJdVbDxkd",  "solidMessageCount": 74088,  "totalMessageCount": 74088,  "enabledPlugins": [    "Activity",    "Analysis-Client",    "Autopeering",    "Banner",    "CLI",    "Clock",    "Config",    "Consensus",    "DRNG",    "Dashboard",    "Database",    "Gossip",    "Graceful Shutdown",    "Logger",    "Mana",    "ManaRefresher",    "Manualpeering",    "MessageLayer",    "Metrics",    "NetworkDelay",    "PoW",    "PortCheck",    "Profiling",    "Prometheus",    "RemoteLog",    "RemoteLogMetrics",    "WebAPI",    "WebAPI DRNG Endpoint",    "WebAPI Mana Endpoint",    "WebAPI WeightProvider Endpoint",    "WebAPI autopeering Endpoint",    "WebAPI data Endpoint",    "WebAPI faucet Endpoint",    "WebAPI healthz Endpoint",    "WebAPI info Endpoint",    "WebAPI ledgerstate Endpoint",    "WebAPI message Endpoint",    "WebAPI tools Endpoint",    "snapshot"  ],  "disabledPlugins": [    "Analysis-Dashboard",    "Analysis-Server",    "Faucet",    "ManaEventLogger",    "Spammer",    "TXStream"  ],  "mana": {    "access": 1,    "accessTimestamp": "2021-05-24T20:11:05.451224937+02:00",    "consensus": 10439991680906,    "consensusTimestamp": "2021-05-24T20:11:05.451228137+02:00"  },  "manaDelegationAddress": "1HMQic52dz3xLY2aeDXcDhX53LgbsHghdfD8eGXR1qVHy",  "mana_decay": 0.00003209,  "scheduler": {    "running": true,    "rate": "5ms",    "nodeQueueSizes": {}  },  "rateSetter": {    "rate": 20000,    "size": 0  }}

Results#

Return fieldTypeDescription
versionStringVersion of GoShimmer.
networkVersionuint32Network Version of the autopeering.
tangleTimeTangleTimeTangleTime sync status
identityIDstringIdentity ID of the node encoded in base58.
identityIDShortstringIdentity ID of the node encoded in base58 and truncated to its first 8 bytes.
publicKeystringPublic key of the node encoded in base58
messageRequestQueueSizeintThe number of messages a node is trying to request from neighbors.
solidMessageCountintThe number of solid messages in the node's database.
totalMessageCountintThe number of messages in the node's database.
enabledPlugins[]stringList of enabled plugins.
disabledPlugins[]stringList if disabled plugins.
manaManaMana values.
manaDelegationAddressstringMana Delegation Address.
mana_decayfloat64The decay coefficient of bm2.
schedulerSchedulerScheduler is the scheduler used.
rateSetterRateSetterRateSetter is the rate setter used.
errorstringError message. Omitted if success.
  • Type TangleTime
fieldTypeDescription
messageIDstringID of the last confirmed message.
timeint64Issue timestamp of the last confirmed message.
syncedboolFlag indicating whether node is in sync.
  • Type Scheduler
fieldTypeDescription
runningboolFlag indicating whether Scheduler has started.
ratestringRate of the scheduler.
nodeQueueSizesmap[string]intThe size for each node queue.
  • Type RateSetter
fieldTypeDescription
ratefloat64The rate of the rate setter..
sizeintThe size of the issuing queue.
  • Type Mana
fieldTypeDescription
accessfloat64Access mana assigned to the node.
accessTimestamptime.TimeTime when the access mana was calculated.
consensusfloat64Consensus mana assigned to the node.
consensusTimestamptime.TimeTime when the consensus mana was calculated.

/healthz#

Returns HTTP code 200 if everything is running correctly.

Parameters#

None.

Examples#

cURL#

curl --location 'http://localhost:8080/healthz'

Client lib#

This method is not available in client lib

Results#

Empty response with HTTP 200 success code if everything is running correctly. Error message is returned if failed.