Listing Block Transactions
Function
Listing Block Transactions
URI
GET /v2/agent/apis/channel/{channel_name}/blocks/{block_num}/transactions
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
channel_name |
Yes |
String |
Channel name. The value can contain 4 to 24 characters and cannot be the same as the system channel name (testchainid). |
block_num |
Yes |
String |
Block ID. |
Request Parameters
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
X-Auth-Token |
Yes |
String |
User token. |
Response Parameters
Status code: 200
Parameter |
Type |
Description |
---|---|---|
[items] |
Array of ShowTransactionDetailRes objects |
Success |
Parameter |
Type |
Description |
---|---|---|
read_set |
Map<String,Array<KVRead>> |
Read set "map[string][]*kvrwset.KVRead key:chaincode value". |
write_set |
Map<String,Array<KVWrite>> |
Write set "map[string][]KVWrite key:chaincode value". |
validation_code |
String |
Validation code. |
endorser_organizations |
Array of strings |
Endorsing organizations. |
proposal_hash |
String |
Request data hash. |
transaction_summary |
Object |
Transaction details. |
Parameter |
Type |
Description |
---|---|---|
key |
String |
Read key. |
version |
version object |
Version of the key in the read set. |
Parameter |
Type |
Description |
---|---|---|
block_num |
Integer |
Block quantity. |
tx_num |
Integer |
Transaction quantity. |
Parameter |
Type |
Description |
---|---|---|
key |
String |
Write key. |
is_delete |
Boolean |
Indication of whether to delete. |
value |
String |
Write value. |
Parameter |
Type |
Description |
---|---|---|
organization_name |
String |
Creator organization. |
type |
String |
Transaction type. |
transaction_id |
String |
Transaction ID. |
chaincode_name |
String |
Chaincode name. |
timestamp |
String |
Timestamp. |
channel_name |
String |
Channel name. |
creator_msp |
String |
Identity information. |
chaincode_version |
String |
Chaincode version. |
block_number |
Integer |
Block ID. |
Status code: 400
Parameter |
Type |
Description |
---|---|---|
error_code |
String |
Error code. |
error_message |
String |
Error description. |
error_msg |
String |
Error description. |
Example Requests
GET https://192.168.0.90:30603/v2/agent/apis/channel/channel/blocks/1/transactions
Example Responses
Status code: 200
Success
[ { "transaction_summary" : { "block_number" : 29, "transaction_id" : "6d704b217e17e16de71029b70f17a1ced35c055279f655dfd096bebf978a0546", "channelName" : "channel", "creator_msp" : "282f3c713ea1cec646aa7c640defca9c4f64bd88MSP", "type" : "ENDORSER_TRANSACTION", "chaincode_name" : "kvtest", "chaincode_version" : "1.0", "timestamp" : "2021-01-20T19:30:28+08:00", "organization_name" : "organization" }, "validation_code" : "VALID", "endorser_organizations" : [ "282f3c713ea1cec646aa7c640defca9c4f64bd88MSP" ], "proposal_hash" : "k1h2ewweWGrWNmmcu7UvzJ8Aw2G190SQzV+lBAAl4gw=", "read_set" : { "kvtest" : null, "lscc" : [ { "key" : "kvtest", "version" : { "block_num" : 2 } } ] }, "write_set" : { "kvtest" : [ { "key" : "a1", "is_delete" : false, "value" : "1" } ], "lscc" : [ ] } } ]
Status code: 400
Bad Request
{ "error_code" : "BCS.4000013", "error_msg" : "request body is too large" }
Status Codes
Status Code |
Description |
---|---|
200 |
Success |
400 |
Bad Request |
Error Codes
See Error Codes.
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot