查询区块交易列表
功能介绍
查询区块交易列表
URI
GET /v2/agent/apis/channel/{channel_name}/blocks/{block_num}/transactions
参数 | 是否必选 | 参数类型 | 描述 |
|---|---|---|---|
channel_name | 是 | String | 通道名称,名称长度限制:4-24,不能与系统通道名称(testchainid)相同 |
block_num | 是 | String | 区块号 |
请求参数
参数 | 是否必选 | 参数类型 | 描述 |
|---|---|---|---|
X-Auth-Token | 是 | String | 用户Token |
响应参数
状态码: 200
参数 | 参数类型 | 描述 |
|---|---|---|
[数组元素] | Array of ShowTransactionDetailRes objects | Success |
参数 | 参数类型 | 描述 |
|---|---|---|
read_set | Map<String,Array<KVRead>> | 读集 "map[string][]KVRead key:chaincode value:键值对数组" |
write_set | Map<String,Array<KVWrite>> | 写集 "map[string][]KVWrite key:chaincode value:键值对数组" |
validation_code | String | 验证代码 |
endorser_organizations | Array of strings | 背书组织 |
proposal_hash | String | 请求数据哈希 |
transaction_summary | Object | 交易详情 |
参数 | 参数类型 | 描述 |
|---|---|---|
organization_name | String | 创建者组织 |
type | String | 交易类型 |
transaction_id | String | 交易id |
chaincode_name | String | 链码名称 |
timestamp | String | 时间戳 |
channel_name | String | 通道名称 |
creator_msp | String | 身份信息 |
chaincode_version | String | 链码版本 |
block_number | Integer | 区块号 |
状态码: 400
参数 | 参数类型 | 描述 |
|---|---|---|
error_code | String | 错误码 |
error_message | String | 错误描述 |
error_msg | String | 错误描述 |
请求示例
GET https://192.168.0.90:30603/v2/agent/apis/channel/channel/blocks/1/transactions
响应示例
状态码: 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" : [ ]
}
} ] 状态码: 400
Bad Request
{
"error_code" : "BCS.4000013",
"error_msg" : "request body is too large"
} 状态码
状态码 | 描述 |
|---|---|
200 | Success |
400 | Bad Request |

