I'm trying to build a Historian Query that will allow me to see Transactions (and their original inputs). I was kind of trying out an idea based on this issue https://github.com/hyperledger/composer/issues/1850, but that was fixed in the Composer Playground. So now I'm wondering how I can achieve this in the REST API without relying on events to hold the transaction input information.
The query I'm using from following the documentation on queries is:
query HistorianRecords {
description: "Select from HistorianRecords"
statement: SELECT org.hyperledger.composer.system.HistorianRecord
}
That returns me information like this
{
"$class": "org.hyperledger.composer.system.HistorianRecord",
"transactionId": "c1bcd961-41bb-43a3-b5ee-c1c3694f7736",
"transactionType": "Transfer",
"transactionInvoked": "resource:org.hyperledger.composer.system.Transaction#c1bcd961-41bb-43a3-b5ee-c1c3694f7736",
"eventsEmitted": [],
"transactionTimestamp": "2017-09-04T07:55:54.405Z"
}
None of the input information for the transaction displayed.
I'd like to get the information like how the Online Playground displays it, which basically includes the transaction inputs, ie. in the sample network where you input asset and newValue
{
"$class": "org.acme.sample.SampleTransaction",
"asset": "resource:org.acme.sample.SampleAsset#a",
"newValue": "123",
"transactionId": "0b7aa7b5-ffed-4fe7-9a60-c883085b88e8",
"timestamp": "2017-09-04T08:50:53.346Z"
}
My network involves the sending of payments from participant to participant, not being able to see who passed how much to who basically renders the blockchain pointless.
How can I do this using the queries?