aboutsummaryrefslogtreecommitdiff
path: root/doc/REST-interface.md
AgeCommit message (Collapse)Author
2023-03-15Merge bitcoin/bitcoin#26207: rest: add verbose and mempool_sequence query ↵Andrew Chow
params for mempool/contents 1ff5d61dfdaf8987e5619162662e4c760af76a43 doc: add mempool/contents rest verbose and mempool_sequence args (Andrew Toth) 52a31dccc92366efb36db3b94920bdf8b05b264c tests: mempool/contents verbose and mempool_sequence query params tests (Andrew Toth) a518fff0f2e479064dd4cff6c29fb54c72c1407b rest: add verbose and mempool_sequence query params for mempool/contents (Andrew Toth) Pull request description: The verbose mempool json response can get very large. This adds an option to return the non-verbose response of just the txids. It is identical to the rpc response so the diff here is minimal. This also adds the mempool_sequence parameter for rpc consistency. Verbose defaults to true to remain backwards compatible. It uses query parameters to be compatible with the efforts in https://github.com/bitcoin/bitcoin/issues/25752. ACKs for top commit: achow101: ACK 1ff5d61dfdaf8987e5619162662e4c760af76a43 stickies-v: re-ACK [1ff5d61](https://github.com/bitcoin/bitcoin/pull/26207/commits/1ff5d61dfdaf8987e5619162662e4c760af76a43) pablomartin4btc: tested ACK 1ff5d61dfdaf8987e5619162662e4c760af76a43. Tree-SHA512: 1bf08a7ffde2e7db14dc746e421feedf17d84c4b3f1141e79e36feb6014811dfde80e1d8dbc476c15ff705de2d3c967b3081dcd80536d76b7edf888f1a92e9d1
2022-10-13Merge bitcoin/bitcoin#25412: rest: add `/deploymentinfo` endpointAndrew Chow
a8250e30f16f2919ea5aa122b2880b076bd398a3 doc: add release note about `/rest/deploymentinfo` (brunoerg) 5c960200242d237f2cf74309b8fd29e8162682ed doc: add `/deploymentinfo` in REST-interface (brunoerg) 3e44bee08eb93e086179b92007649d47652aa439 test: add coverage for `/rest/deploymentinfo` (brunoerg) 91497031cbd74a0665b7fc31eb6b73bfb7bd0d40 rest: add `/deploymentinfo` (brunoerg) Pull request description: #23508 added a new RPC named `getdeploymentinfo`, it moved the softfork section from `getblockchaininfo` into this new one. In the REST interface, we have an endpoint named`/rest/chaininfo.json` (which refers to `getblockchaininfo`), so, this PR adds a new REST endpoint named `/deploymentinfo` which refers to `getdeploymentinfo`. You can use it by passing a block hash, e.g: '/rest/deploymentinfo/<BLOCKHASH>.json' or you can use it without passing a block hash to get the 'deploymentinfo' for the last block. ACKs for top commit: jonatack: re-ACK a8250e30f16f2919ea5aa122b2880b076bd398a3 rebase-only since my last review at c65f82bb achow101: ACK a8250e30f16f2919ea5aa122b2880b076bd398a3 stickies-v: re-ACK https://github.com/bitcoin/bitcoin/commit/a8250e30f16f2919ea5aa122b2880b076bd398a3 Tree-SHA512: 0735183b6828d51a72ed0e2be5a09b314ac4693f548982c6e9adaa0ef07a55aa428d3b2d1b1de70b83169811a663a8624b686166e5797f624dcc00178b9796e6
2022-10-13Merge bitcoin/bitcoin#24467: doc: minor improvements in getutxos REST ↵fanquake
endpoint synopsis c456302d4258e3abc4b8afde20fba808632771b2 doc: minor improvements in getutxos REST endpoint synopsis (Sebastian Falbesoner) Pull request description: Describing an optional sub-path as `<checkmempool>` in the synopsis could be misleading as the angle brackets normally indicate that the field has to be replaced a custom value. Clarify that by showing two variants instead, similar to the `block` endpoint with the `notxdetails` option: ``` #### Blocks `GET /rest/block/<BLOCK-HASH>.<bin|hex|json>` `GET /rest/block/notxdetails/<BLOCK-HASH>.<bin|hex|json>` ``` Further improvements: - uppercase `<TXID>` and `<N>`, to match the description of the other endpoints - s/getutxo command/getutxos endpoint/ - describe what the `checkmempool` option does - s/serialisation/serialization/ (the US spelling is more dominant than the UK spelling in the project, and there is indeed no other instance of the string "serialis*" in the source tree, except once in a release note) - link to BIP64 within the text instead of only showing bare URL - mention that BIP64 is only relevant for `bin` and `hex` output formats - show two endpoint formats of the block section as list ACKs for top commit: stickies-v: ACK c456302d4258e3abc4b8afde20fba808632771b2 - also checked that current master (cc12b8947) doesn't have any other lines changes that would require updates as per the outlined improvement points. Tree-SHA512: b025aac0812397f5fbf78c805c13aeb5afa6862a049d13c0b101178799cdaff1ccd3abc368a5c103ea6ebf17cdff76584c54638d0f8d303d81ade2d71443d305
2022-10-05doc: add mempool/contents rest verbose and mempool_sequence argsAndrew Toth
2022-10-02Merge bitcoin/bitcoin#24084: doc: add information about status code 404 for ↵fanquake
some endpoints (rest) 0811cbfc2868ee80c522fd426f188f10b06cd421 doc: add info about status code 404 for some rest endpoints (brunoerg) Pull request description: This PR adds an explanation about status code 404 for 2 endpoints (`/rest/tx/ `and `/rest/blockhashbyheight/`) in`REST-interface.md`. There are other endpoints that already cover it. ACKs for top commit: [deleted]: reACK https://github.com/bitcoin/bitcoin/pull/24084/commits/0811cbfc2868ee80c522fd426f188f10b06cd421 shaavan: ACK 0811cbfc2868ee80c522fd426f188f10b06cd421 Tree-SHA512: a01ac6653f706b7a7e4a4679a2b81e448381f31460ac4bcfc179af6186401cffae7b49a82f3a52c89e556acd5c16c159ce752c7a678177900ddf2e4e5c72fe6b
2022-08-16doc: add `/deploymentinfo` in REST-interfacebrunoerg
2022-04-20doc: add reference to `getrawmempool` RPC in `/mempool/contents` REST docbrunoerg
2022-04-19Merge bitcoin/bitcoin#24776: docs: update /rest/chaininfo doc referring to ↵MarcoFalke
RPC help 1d95b5c78368575c8885a5bf659cdb4d6261f124 doc: cleanups to mempool rest endpoints (brunoerg) b941dec0a975d441fe08117e84d72aca4c5731bc docs: update `/rest/chaininfo` doc referring to RPC help (brunoerg) Pull request description: Internally, `/rest/chaininfo` gets the infos from `getblockchaininfo` and I just realized the documentation of it in `REST-interface.md` is outdated compared to the `getblockchaininfo` RPC one. This PR removes the documentation of the fields and adds a reference to the RPC help. ACKs for top commit: jonatack: ACK 1d95b5c78368575c8885a5bf659cdb4d6261f124 Tree-SHA512: 643db202e13e8372105460b0871facb11586dc0ff5e86ec9e105a178bcfeefa3555bb047cd28cfaeb3e747f5a2055e27961813c9e299ba7b2d36151e81049507
2022-04-18doc: cleanups to mempool rest endpointsbrunoerg
2022-04-18docs: update `/rest/chaininfo` doc referring to RPC helpbrunoerg
2022-04-05Update /<count>/ endpoints to use a '?count=' query parameter insteadstickies-v
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.
2022-03-30doc: minor improvements in getutxos REST endpoint synopsisSebastian Falbesoner
Describing an optional sub-path as <checkmempool> in the synopsis could be misleading as the angle brackets normally indicate that the field has to be replaced a custom value. Clarify that by showing two variants instead, similar to the block endpoint with the notxdetails option. Further improvements: - uppercase <TXID> and <N>, to match the description of the other endpoints - s/getutxo command/getutxos endpoint/ - describe what the checkmempool option does - s/serialisation/serialization/ (the US spelling is more dominant than the UK spelling in the project, and there is indeed no other instance of the string "serialis*" in the source tree, except once in a release note) - link to BIP64 within the text instead of only showing bare URL - mention that BIP64 is only relevant for bin and hex output formats - show two endpoint formats of the block section as list
2022-01-26transaction decoding infer output descriptorsGregory Sanders
2022-01-24doc: add info about status code 404 for some rest endpointsbrunoerg
2021-10-17Update REST docs with new accessorsMatt Corallo
2021-03-23rpc: deprecate `addresses` and `reqSigs` from rpc outputsMichael Dietz
1) add a new sane "address" field (for outputs that have an identifiable address, which doesn't include bare multisig) 2) with -deprecatedrpc: leave "reqSigs" and "addresses" intact (with all weird/wrong behavior they have now) 3) without -deprecatedrpc: drop "reqSigs" and "addresses" entirely, always.
2021-01-28rpc: Return total fee in mempoolMarcoFalke
Also, add missing lock annotations
2021-01-12doc, rpc: add missing signet mentions in network name listsSebastian Falbesoner
2020-12-17Merge #19050: doc: Add warning for rest interface limitationMarcoFalke
5c3eaf9983043db1b61a98c95d692a6958670b86 doc: Add warnings for http interfaces limitations (Fabian Jahr) Pull request description: `libevent`, which is used for our rest interface, can use up all of the available file descriptors in a system if too many connections are opened at once. If a new block is connected at the same time and can not be written to disk because there are no file descriptors available, the node crashes. Based on my investigation so far the issue is best solved upstream which means we have to wait for the next release (2.2). In the meantime it would be good if we would warn users of this limitation. See #11368 for more background. ACKs for top commit: MarcoFalke: ACK 5c3eaf9983043db1b61a98c95d692a6958670b86 Tree-SHA512: 73914538588477ead19068f5832fdcc8e0eb736e51f73b3aca501c93165e5ad634c2511a3fcffff251adcd3efda23a742b48211ad9d3b2a29cdeac17201d06a1
2020-06-29Merge #19390: doc/REST-interface: Remove stale infofanquake
fd9c213c6e42cedd8a03c2f721ff46790cded76b doc/REST-interface: Remove stale info (Luke Dashjr) Pull request description: Clean merge to 0.19+ ACKs for top commit: fanquake: ACK fd9c213c6e42cedd8a03c2f721ff46790cded76b MarcoFalke: ACK fd9c213c6e42cedd8a03c2f721ff46790cded76b Tree-SHA512: ac3ffaa72226380ed8b8ab505518d0dc4350bfcc4625dfd27a2350fbb972a8d2bb4255307926eb331c49232023bcb283a659f0d87e4ecbf654982341242f7d36
2020-06-26doc/REST-interface: Remove stale infoLuke Dashjr
2020-06-01doc: Add warnings for http interfaces limitationsFabian Jahr
2020-04-28fix: update rest info on block size and jsonChris Abrams
2019-11-01doc: Remove explicit network name referencesFabian Jahr
2019-09-17doc: Fix whitespace errs in .md files, bitcoin.conf, Info.plist.in, and ↵Jon Layton
find_bdb48.m4
2019-03-22rpc: Expose g_is_mempool_loaded via getmempoolinfo and /rest/mempool/info.jsonBen Woosley
And use it to fix a race condition in mempool_persist.py: https://travis-ci.org/Empact/bitcoin/jobs/487577243 Since e.g. getrawmempool returns errors based on this status, this enables users to test it for readiness.
2019-02-17Address test todos by removing -txindex to nodes.Amiti Uttarwar
Originally added when updating getrawtransaction to stop searching unspent utxos.
2019-01-22Merge #14353: REST: add blockhash call, fetch blockhash by heightJonas Schnelli
42ff30ec6 [Docs] add short documentation for /rest/blockhashbyheight (Jonas Schnelli) 579d418f7 [QA] add rest tests for /rest/blockhashbyheight/<HEIGHT>.<FORMAT> (Jonas Schnelli) eb9ef04c4 REST: add "blockhashbyheight" call, fetch blockhash by height (Jonas Schnelli) Pull request description: Completes the REST interface for trivial block exploring by adding a call that allows to fetch the blockhash in the main chain by a given height. Tree-SHA512: 94be9e56718f857279b11cc16dfa8d04f3b5a762e87ae54281b4d87247c71c844895f4944d5a47f09056bf851f4c4761ac4fbdbaaee957265d14de5c1c73e8d2
2019-01-21[Docs] add short documentation for /rest/blockhashbyheightJonas Schnelli
2019-01-16doc: /rest/block responds with 404 if block does not existJoão Barbosa
2019-01-16doc: Explain empty result of /rest/headersJoão Barbosa
2018-10-30doc: Add external interface consistency guaranteesMarcoFalke
2018-03-02Fix typos and cleanupDimitris Apostolou
[ci-skip]
2017-09-06Merge #10825: net: set regtest JSON-RPC port to 18443 to avoid conflict with ↵Wladimir J. van der Laan
testnet 18332 ce3baa193 changed regtest RPCport to 18443 to avoid conflict with testnet 18332 (Ferdinando M. Ametrano) Pull request description: using the same JSON-RPC default port for both testnet and regtest prevents running both at the same time on the same machine. Since RPCport=P2Pport-1 for both mainnet and testnet, and regtest P2Pport being 18444, 18443 is proposed for regtest RPCport Documentation has been updated (or created where missing); manpages doc/man/bitcoin*.1 could include information for regtest too Tree-SHA512: d42185f7ef54dc918ece19b543c8681d08bb9c5a971394e21f2d9a1091734b091b08df69fab622c207b46f402cf9323ded5b7a33fbd0af722388930169124e7f
2017-08-16Merge #10680: Fix inconsistencies and grammar in various filesMarcoFalke
1d8df0141 Fix MD formatting in REST-interface.md and spelling mistake in test_runner.py (MeshCollider) 41f3e84aa Fix inconsistencies and grammar in various files (MeshCollider) Pull request description: Just a simple fix of some inconsistent capitalization, formatting and grammar in a few files (no code changes) Tree-SHA512: 60b12a5a5c69a1af4a25b7db0b32ed806ed62ad2966cee08b3792a7cfa7f51848fd485349b4c09e60a7eedfdf55ee730c51daa066d6e226ae404c93342bf3e13
2017-08-04changed regtest RPCport to 18443 to avoid conflict with testnet 18332Ferdinando M. Ametrano
2017-07-01Fix MD formatting in REST-interface.md and spelling mistake inMeshCollider
test_runner.py
2017-06-30REST/RPC example updateMichael Rotarius
2016-08-24Add default port numbers to REST docdjpnewton
2015-08-14Implement REST mempool API, add test and documentation.Pavel Janík
2015-07-19Documenting pruned, pruneheight and softforks in getblockchaininfoSimon Males
2015-07-18Include pruned state in chaininfo.jsonSimon Males
2015-07-15doc: Remove recommendation to add old repos for libd4.8*tailsjoin
It is unreasonable to ask to change the global package configuration just to build a package. Not only that, this is potentially harmful to the system. Also do a few punctuation fixes in REST-interface.md.
2015-07-05[REST] add JSON support for /rest/headers/Jonas Schnelli
2015-05-27[REST] remove json input for getutxos, limit to query max. 15 outpointsJonas Schnelli
Remove possibility to send json encoded parameters to `/rest/getutxos/` to avoid possible DoS scenarios. The JSON output option is untouched.
2015-05-18[Docs] fix and improve REST documentationJonas Schnelli
- fix bad formatting of getutxos - added getztxos example - fix different command syntax
2015-05-06Merge pull request #5420Wladimir J. van der Laan
6b4feb8 [QA] rest.py RPC test: change setgenerate() to generate() (Jonas Schnelli) 97ee866 [REST] getutxos REST command (based on Bip64) (Jonas Schnelli)
2015-04-23[REST] update documentationJonas Schnelli
- add documentation for /rest/headers - reformat sections
2015-04-21[QA] rest.py RPC test: change setgenerate() to generate()Jonas Schnelli
2015-04-20Update REST URL to match realitypaveljanik