aboutsummaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authorstickies-v <stickies-v@protonmail.com>2022-01-27 22:23:51 +0000
committerstickies-v <stickies-v@protonmail.com>2022-04-05 13:19:37 -0400
commitf959fc0397c3f3615e99bc28d2df549d9d52f277 (patch)
tree5025379c369e3a7e531a1e9a3ce17cd84ad2819e /doc
parenta09497614e9bb603fff36286d9611a25b23eeb02 (diff)
downloadbitcoin-f959fc0397c3f3615e99bc28d2df549d9d52f277.tar.xz
Update /<count>/ endpoints to use a '?count=' query parameter instead
In most RESTful APIs, path parameters are used to represent resources, and query parameters are used to control how these resources are being filtered/sorted/... The old /<count>/ functionality is kept alive to maintain backwards compatibility, but new paths with query parameters are introduced and documented as the default interface so future API methods don't break consistency by using query parameters.
Diffstat (limited to 'doc')
-rw-r--r--doc/REST-interface.md10
1 files changed, 8 insertions, 2 deletions
diff --git a/doc/REST-interface.md b/doc/REST-interface.md
index 1f0a07a284..c359725faf 100644
--- a/doc/REST-interface.md
+++ b/doc/REST-interface.md
@@ -47,18 +47,24 @@ The HTTP request and response are both handled entirely in-memory.
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.
#### Blockheaders
-`GET /rest/headers/<COUNT>/<BLOCK-HASH>.<bin|hex|json>`
+`GET /rest/headers/<BLOCK-HASH>.<bin|hex|json>?count=<COUNT=5>`
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.
+*Deprecated (but not removed) since 24.0:*
+`GET /rest/headers/<COUNT>/<BLOCK-HASH>.<bin|hex|json>`
+
#### Blockfilter Headers
-`GET /rest/blockfilterheaders/<FILTERTYPE>/<COUNT>/<BLOCK-HASH>.<bin|hex|json>`
+`GET /rest/blockfilterheaders/<FILTERTYPE>/<BLOCK-HASH>.<bin|hex|json>?count=<COUNT=5>`
Given a block hash: returns <COUNT> amount of blockfilter headers in upward
direction for the filter type <FILTERTYPE>.
Returns empty if the block doesn't exist or it isn't in the active chain.
+*Deprecated (but not removed) since 24.0:*
+`GET /rest/blockfilterheaders/<FILTERTYPE>/<COUNT>/<BLOCK-HASH>.<bin|hex|json>`
+
#### Blockfilters
`GET /rest/blockfilter/<FILTERTYPE>/<BLOCK-HASH>.<bin|hex|json>`