更新时间:2023-03-27 GMT+08:00
分享

查询交易详情

功能介绍

查询交易详情

调试

您可以在API Explorer中调试该接口,支持自动认证鉴权。API Explorer可以自动生成SDK代码示例,并提供SDK代码示例调试功能。

URI

GET /v2/agent/apis/channel/{channel_name}/transactions/{transaction_id}/detail

表1 路径参数

参数

是否必选

参数类型

描述

channel_name

String

通道名称

transaction_id

String

交易id号

请求参数

表2 请求Header参数

参数

是否必选

参数类型

描述

X-Auth-Token

String

用户Token

响应参数

状态码: 200

表3 响应Body参数

参数

参数类型

描述

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

交易详情

表4 KVRead

参数

参数类型

描述

key

String

读键

version

version object

读集键的版本

表5 version

参数

参数类型

描述

block_num

Integer

区块数

tx_num

Integer

交易数

表6 KVWrite

参数

参数类型

描述

key

String

写键

is_delete

Boolean

是否删除

value

String

写值

表7 TransactionSummary

参数

参数类型

描述

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

表8 响应Body参数

参数

参数类型

描述

error_code

String

错误码

error_message

String

错误描述

error_msg

String

错误描述

请求示例

GET  https://192.168.0.90:30603/v2/agent/apis/channel/channel/transactions/1111111/detail

响应示例

状态码: 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_message" : "request body is too large"
}

状态码

状态码

描述

200

Success

400

Bad Request

错误码

请参见错误码

分享:

    相关文档

    相关产品