查询交易列表
功能介绍
查询交易列表
URI
GET /v2/agent/apis/channel/{channel_name}/transactions
参数 | 是否必选 | 参数类型 | 描述 |
|---|---|---|---|
channel_name | 是 | String | 通道名称,名称长度限制:4-24,不能与系统通道名称(testchainid)相同 |
参数 | 是否必选 | 参数类型 | 描述 |
|---|---|---|---|
is_pagination | 否 | Boolean | 是否分页,默认为否 缺省值:false |
offset | 否 | Integer | 偏移量,默认为0 最小值:0 缺省值:0 |
limit | 否 | Integer | 每页显示的条目数量,默认为10,取值范围为1-50 最小值:1 最大值:50 缺省值:10 |
请求参数
参数 | 是否必选 | 参数类型 | 描述 |
|---|---|---|---|
X-Auth-Token | 是 | String | 用户Token |
响应参数
状态码: 200
参数 | 参数类型 | 描述 |
|---|---|---|
count | Integer | 交易总数 |
data | Array of TransactionSummary objects | 交易 |
参数 | 参数类型 | 描述 |
|---|---|---|
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/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 |
错误码
请参见错误码。

