aboutsummaryrefslogtreecommitdiff
path: root/doc/REST-interface.md
diff options
context:
space:
mode:
Diffstat (limited to 'doc/REST-interface.md')
-rw-r--r--doc/REST-interface.md8
1 files changed, 8 insertions, 0 deletions
diff --git a/doc/REST-interface.md b/doc/REST-interface.md
index d33165cb82..d21df36130 100644
--- a/doc/REST-interface.md
+++ b/doc/REST-interface.md
@@ -6,6 +6,12 @@ The REST API can be enabled with the `-rest` option.
The interface runs on the same port as the JSON-RPC interface, by default port 8332 for mainnet, port 18332 for testnet,
and port 18443 for regtest.
+REST Interface consistency guarantees
+-------------------------------------
+
+The [same guarantees as for the RPC Interface](/doc/JSON-RPC-interface.md#rpc-consistency-guarantees)
+apply.
+
Supported API
-------------
@@ -21,6 +27,7 @@ For full TX query capability, one must enable the transaction index via "txindex
`GET /rest/block/notxdetails/<BLOCK-HASH>.<bin|hex|json>`
Given a block hash: returns a block, in binary, hex-encoded binary or JSON formats.
+Responds with 404 if the block doesn't exist.
The HTTP request and response are both handled entirely in-memory, thus making maximum memory usage at least 2.66MB (1 MB max block, plus hex encoding) per request.
@@ -30,6 +37,7 @@ With the /notxdetails/ option JSON response will only contain the transaction ha
`GET /rest/headers/<COUNT>/<BLOCK-HASH>.<bin|hex|json>`
Given a block hash: returns <COUNT> amount of blockheaders in upward direction.
+Returns empty if the block doesn't exist or it isn't in the active chain.
#### Blockhash by height
`GET /rest/blockhashbyheight/<HEIGHT>.<bin|hex|json>`