Skip to content

Commit

Permalink
[REST] update documentation
Browse files Browse the repository at this point in the history
- add documentation for /rest/headers
- reformat sections
  • Loading branch information
jonasschnelli committed Apr 23, 2015
1 parent b6ea3bc commit 2ccfc63
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions doc/REST-interface.md
Expand Up @@ -5,13 +5,16 @@ The REST API can be enabled with the `-rest` option.

Supported API
-------------

####Transactions
`GET /rest/tx/TX-HASH.{bin|hex|json}`

Given a transaction hash,
Returns a transaction, in binary, hex-encoded binary or JSON formats.

For full TX query capability, one must enable the transaction index via "txindex=1" command line / configuration option.

####Blocks
`GET /rest/block/BLOCK-HASH.{bin|hex|json}`
`GET /rest/block/notxdetails/BLOCK-HASH.{bin|hex|json}`

Expand All @@ -22,6 +25,15 @@ The HTTP request and response are both handled entirely in-memory, thus making m

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>`

Given a block hash,
Returns <COUNT> amount of blockheaders in upward direction.

JSON is not supported.

####Chaininfos
`GET /rest/chaininfo.json`

Returns various state info regarding block chain processing.
Expand Down

0 comments on commit 2ccfc63

Please sign in to comment.