Merge bitcoin/bitcoin#24084: doc: add information about status code 404 for 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 0811cbfc28
  shaavan:
    ACK 0811cbfc2868ee80c522fd426f188f10b06cd421

Tree-SHA512: a01ac6653f706b7a7e4a4679a2b81e448381f31460ac4bcfc179af6186401cffae7b49a82f3a52c89e556acd5c16c159ce752c7a678177900ddf2e4e5c72fe6b
This commit is contained in:
fanquake 2022-10-02 16:29:16 +01:00 committed by pasta
parent a56b95b1fb
commit 233429a784
No known key found for this signature in database
GPG Key ID: 52527BEDABE87984

View File

@ -30,6 +30,7 @@ Supported API
`GET /rest/tx/<TX-HASH>.<bin|hex|json>`
Given a transaction hash: returns a transaction in binary, hex-encoded binary, or JSON formats.
Responds with 404 if the transaction doesn't exist.
By default, this endpoint will only search the mempool.
To query for a confirmed transaction, enable the transaction index via "txindex=1" command line / configuration option.
@ -55,6 +56,7 @@ Returns empty if the block doesn't exist or it isn't in the active chain.
`GET /rest/blockhashbyheight/<HEIGHT>.<bin|hex|json>`
Given a height: returns hash of block in best-block-chain at height provided.
Responds with 404 if block not found.
#### Chaininfos
`GET /rest/chaininfo.json`