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

查询交易列表

功能介绍

查询交易列表

调试

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

URI

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

表1 路径参数

参数

是否必选

参数类型

描述

channel_name

String

通道名称,名称长度限制:4-24,不能与系统通道名称(testchainid)相同

表2 Query参数

参数

是否必选

参数类型

描述

is_pagination

Boolean

是否分页,默认为否

缺省值:false

offset

Integer

偏移量,默认为0

最小值:0

缺省值:0

limit

Integer

每页显示的条目数量,默认为10,取值范围为1-50

最小值:1

最大值:50

缺省值:10

请求参数

表3 请求Header参数

参数

是否必选

参数类型

描述

X-Auth-Token

String

用户Token

响应参数

状态码: 200

表4 响应Body参数

参数

参数类型

描述

count

Integer

交易总数

data

Array of TransactionSummary objects

交易

表5 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

表6 响应Body参数

参数

参数类型

描述

error_code

String

错误码

error_message

String

错误描述

error_msg

String

错误描述

请求示例

  • 默认模式请求

    GET  https://192.168.0.90:30603/v2/agent/apis/channel/channel/transactions
  • 分页模式请求

    GET  https://192.168.0.90:30603/v2/agent/apis/channel/channel/transactions?is_pagination=true&offset=1&limit=50

响应示例

状态码: 200

Success

{
  "count" : 1,
  "data" : [ {
    "block_number" : 0,
    "transaction_id" : "",
    "channel_name" : "channel",
    "creator_msp" : "e784724be5ed75f59b2809e4f0965a10679ae113MSP",
    "type" : "CONFIG",
    "chaincode_name" : "",
    "chaincode_version" : "",
    "timestamp" : "2021-01-20T14:38:27+08:00",
    "organization_name" : "orderer"
  } ]
}

状态码: 400

Bad Request

{
  "error_code" : "BCS.4000013",
  "error_msg" : "request body is too large"
}

状态码

状态码

描述

200

Success

400

Bad Request

错误码

请参见错误码

分享:

    相关文档

    相关产品