aboutsummaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authorWladimir J. van der Laan <laanwj@gmail.com>2015-02-10 12:04:50 +0100
committerWladimir J. van der Laan <laanwj@gmail.com>2015-02-10 12:08:07 +0100
commitd48ce48093faf1a0778b424397a2879a93e5fb5e (patch)
tree46c66a3c288b70603cb2b7069e57b6ad9e7f6e75 /doc
parenta9565863e09a32729bd6ce33f31889099b3d75cb (diff)
parent2c0f901ea90e3efab5e15abeba011597cfdd92c1 (diff)
downloadbitcoin-d48ce48093faf1a0778b424397a2879a93e5fb5e.tar.xz
Merge #5548: [REST] add /rest/chaininfos
2c0f901 [REST] rest/chaininfos add documentation (Jonas Schnelli) 59582c8 [REST] add /rest/chaininfos (Jonas Schnelli)
Diffstat (limited to 'doc')
-rw-r--r--doc/REST-interface.md14
1 files changed, 13 insertions, 1 deletions
diff --git a/doc/REST-interface.md b/doc/REST-interface.md
index 0af650b4e8..23154ee903 100644
--- a/doc/REST-interface.md
+++ b/doc/REST-interface.md
@@ -10,6 +10,8 @@ Supported API
Given a transaction hash,
Returns a transaction, in binary, hex-encoded binary or JSON formats.
+For full TX query capability, one must enable the transaction index via "txindex=1" command line / configuration option.
+
`GET /rest/block/BLOCK-HASH.{bin|hex|json}`
`GET /rest/block/notxdetails/BLOCK-HASH.{bin|hex|json}`
@@ -20,7 +22,17 @@ The HTTP request and response are both handled entirely in-memory, thus making m
With the /notxdetails/ option JSON response will only contain the transaction hash instead of the complete transaction details. The option only affects the JSON response.
-For full TX query capability, one must enable the transaction index via "txindex=1" command line / configuration option.
+`GET /rest/chaininfo.json`
+
+Returns various state info regarding block chain processing.
+Only supports JSON as output format.
+* chain : (string) current network name as defined in BIP70 (main, test, regtest)
+* blocks : (numeric) the current number of blocks processed in the server
+* headers : (numeric) the current number of headers we have validated
+* bestblockhash : (string) the hash of the currently best block
+* difficulty : (numeric) the current difficulty
+* verificationprogress : (numeric) estimate of verification progress [0..1]
+* chainwork : (string) total amount of work in active chain, in hexadecimal
Risks
-------------