Timestamp of block as header: /transactions/tx_id

For reasoning, see:
https://github.com/bigchaindb/bigchaindb/pull/830#issuecomment-262774345
This commit is contained in:
tim 2016-11-24 18:03:46 +01:00
parent 8e91e14e86
commit 0c651f6b11

View File

@ -44,6 +44,11 @@ Transactions
This endpoint returns only a transaction from a ``VALID`` or ``UNDECIDED``
block on ``bigchain``, if exists.
A transaction itself doesn't include a ``timestamp`` property. Only the
block a transaction was included in has a unix ``timestamp`` property. It is
returned by this endpoint in a HTTP custom entity header called
``X-BigchainDB-Timestamp``.
:param tx_id: transaction ID
:type tx_id: hex string
@ -60,6 +65,7 @@ Transactions
HTTP/1.1 200 OK
Content-Type: application/json
X-BigchainDB-Timestamp: 1234567890
{
"transaction": {
@ -107,6 +113,7 @@ Transactions
"version": 1
}
:resheader X-BigchainDB-Timestamp: A unix timestamp describing when a transaction was included into a valid block. The timestamp provided is taken from the block the transaction was included in.
:resheader Content-Type: ``application/json``
:statuscode 200: A transaction with that ID was found.