getindexinfo
getindexinfo ( "index_name" ) Returns the status of one or all available indices currently running in the node. Arguments: 1. index_name (string, optional) Filter results for an index with a specific name. Result: { (json object) "name" : { (json object) The name of the index "synced" : true|false, (boolean) Whether the index is synced or not "best_block_height" : n (numeric) The block height to which the index is synced }, ... } Examples: > bitcoin-cli getindexinfo > curl --user myusername --data-binary '{"jsonrpc": "2.0", "id": "curltest", "method": "getindexinfo", "params": []}' -H 'content-type: application/json' http://127.0.0.1:8332/ > bitcoin-cli getindexinfo txindex > curl --user myusername --data-binary '{"jsonrpc": "2.0", "id": "curltest", "method": "getindexinfo", "params": [txindex]}' -H 'content-type: application/json' http://127.0.0.1:8332/
Signature
getindexinfo(index_name?: string) → any Code samples
curl --user "$RPC_USER:$RPC_PASS" \
--data-binary '{"jsonrpc":"1.0","id":"docs","method":"getindexinfo","params":["\"<index_name>\""]}' \
-H 'content-type: text/plain;' \
http://127.0.0.1:8332/ Parameters
| Name | Type | Req. | Description |
|---|---|---|---|
| index_name | string | — | Filter results for an index with a specific name. |
Result
Type: any
{ (json object) "name" : { (json object) The name of the index "synced" : true|false, (boolean) Whether the index is synced or not "best_block_height" : n (numeric) The block height to which the index is synced }, ... }
Source: services/core-node/bcore/src/rpc/node.cpp:357
C++ symbol: getindexinfo