GET transactions/id examples --> samples

This commit is contained in:
diminator 2016-12-26 16:36:21 +01:00 committed by tim
parent 56b4da02c9
commit a8f8c7f4a9
2 changed files with 5 additions and 55 deletions

View File

@ -53,6 +53,7 @@ Host: example.com
TPLS['get-tx-response'] = """\
HTTP/1.1 200 OK
Content-Type: application/json
X-BigchainDB-Timestamp: 1482766245
%(tx)s
"""

View File

@ -54,64 +54,13 @@ Transactions
**Example request**:
.. sourcecode:: http
GET /transactions/2d431073e1477f3073a4693ac7ff9be5634751de1b8abaa1f4e19548ef0b4b0e HTTP/1.1
Host: example.com
.. literalinclude:: samples/get-tx-request.http
:language: http
**Example response**:
.. sourcecode:: http
HTTP/1.1 200 OK
Content-Type: application/json
X-BigchainDB-Timestamp: 1234567890
{
"transaction": {
"conditions": [
{
"cid": 0,
"condition": {
"uri": "cc:4:20:GG-pi3CeIlySZhQoJVBh9O23PzrOuhnYI7OHqIbHjkk:96",
"details": {
"signature": null,
"type": "fulfillment",
"type_id": 4,
"bitmask": 32,
"public_key": "2ePYHfV3yS3xTxF9EE3Xjo8zPwq2RmLPFAJGQqQKc3j6"
}
},
"amount": 1,
"owners_after": [
"2ePYHfV3yS3xTxF9EE3Xjo8zPwq2RmLPFAJGQqQKc3j6"
]
}
],
"operation": "CREATE",
"asset": {
"divisible": false,
"updatable": false,
"data": null,
"id": "aebeab22-e672-4d3b-a187-bde5fda6533d",
"refillable": false
},
"metadata": null,
"timestamp": "1477578978",
"fulfillments": [
{
"fid": 0,
"input": null,
"fulfillment": "cf:4:GG-pi3CeIlySZhQoJVBh9O23PzrOuhnYI7OHqIbHjkn2VnQaEWvecO1x82Qr2Va_JjFywLKIOEV1Ob9Ofkeln2K89ny2mB-s7RLNvYAVzWNiQnp18_nQEUsvwACEXTYJ",
"owners_before": [
"2ePYHfV3yS3xTxF9EE3Xjo8zPwq2RmLPFAJGQqQKc3j6"
]
}
]
},
"id": "2d431073e1477f3073a4693ac7ff9be5634751de1b8abaa1f4e19548ef0b4b0e",
"version": 1
}
.. literalinclude:: samples/get-tx-response.http
:language: http
: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``