0
0
Fork 0
mirror of https://github.com/bitcoin/bitcoin.git synced 2025-03-05 14:06:27 -05:00

Merge bitcoin/bitcoin#24084: doc: add information about status code 404 for some endpoints (rest)

0811cbfc28 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 0811cbfc28

Tree-SHA512: a01ac6653f706b7a7e4a4679a2b81e448381f31460ac4bcfc179af6186401cffae7b49a82f3a52c89e556acd5c16c159ce752c7a678177900ddf2e4e5c72fe6b
This commit is contained in:
fanquake 2022-10-02 16:29:16 +01:00
commit 13ec2c1913
No known key found for this signature in database
GPG key ID: 2EEB9F5CC09526C1

View file

@ -31,6 +31,7 @@ Supported API
`GET /rest/tx/<TX-HASH>.<bin|hex|json>` `GET /rest/tx/<TX-HASH>.<bin|hex|json>`
Given a transaction hash: returns a transaction in binary, hex-encoded binary, or JSON formats. 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. 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. To query for a confirmed transaction, enable the transaction index via "txindex=1" command line / configuration option.
@ -76,6 +77,7 @@ Responds with 404 if the block doesn't exist.
`GET /rest/blockhashbyheight/<HEIGHT>.<bin|hex|json>` `GET /rest/blockhashbyheight/<HEIGHT>.<bin|hex|json>`
Given a height: returns hash of block in best-block-chain at height provided. Given a height: returns hash of block in best-block-chain at height provided.
Responds with 404 if block not found.
#### Chaininfos #### Chaininfos
`GET /rest/chaininfo.json` `GET /rest/chaininfo.json`