查询某个区块中交易信息
功能介绍
查询某个区块中交易信息(仅支持专享版)
URI
GET /v1/store/block/transactions
| 参数 | 是否必选 | 参数类型 | 描述 | 
|---|---|---|---|
| block_id | 是 | String | 区块id | 
请求参数
无
响应参数
状态码:200
| 参数 | 参数类型 | 描述 | 
|---|---|---|
| count | Integer | 区块中交易总数 | 
| txs | Array of Transaction objects | 交易列表 | 
| 参数 | 参数类型 | 描述 | 
|---|---|---|
| tx_id | String | 交易id | 
| type | String | 交易类型COMMON_TRANSACTION:普通交易,VOTE_TRANSACTION:投票交易 | 
| block_id | Integer | 区块号 | 
| creator | String | 创建者 | 
| create_time | String | 创建时间 | 
| chaincode_name | String | 合约名称 | 
| endorsor_orgs | Array of strings | 背书组织 | 
| read_set | Array of Readset objects | 读集 | 
| write_set | Array of Writeset objects | 写集 | 
状态码:400
| 参数 | 参数类型 | 描述 | 
|---|---|---|
| error_code | String | 错误码 | 
| error_msg | String | 错误描述 | 
请求示例
无
响应示例
状态码:200
区块中交易列表
{
  "count" : 1,
  "txs" : [ {
    "tx_id" : "55d054add46cd24ae28df1dbe099d3601f84ad97403212d5be878a7c9c773df6",
    "type" : "COMMON_TRANSACTION",
    "block_id" : 176,
    "creator" : "user-1.org1.hwchain-tdc-eff8ed1eb.svc.cluster.local",
    "create_time" : "2022-04-08T01:39:57Z",
    "chaincode_name" : "tdccontract",
    "endorsor_orgs" : [ "org1" ],
    "read_set" : [ {
      "key" : "",
      "version" : [ {
        "block_num" : 0,
        "tx_num" : ""
      } ]
    } ],
    "write_set" : [ {
      "key" : "",
      "value" : [ ],
      "signature" : [ ]
    } ]
  } ]
}
 状态码
| 状态码 | 描述 | 
|---|---|
| 200 | 区块中交易列表 | 
| 400 | 错误响应 | 
 
  