
# 查询交易列表
#### 功能介绍
查询交易列表
#### 调试
您可以在[API Explorer](https://console.huaweicloud.com/apiexplorer/#/openapi/BCS/doc?api=ListTransactions)中调试该接口，支持自动认证鉴权。API Explorer可以自动生成SDK代码示例，并提供SDK代码示例调试功能。
#### URI
GET /v2/agent/apis/channel/{channel_name}/transactions
表1路径参数 
| 参数           | 是否必选 | 参数类型   | 描述                                        |
|:---|:---|:---|:---|
| channel_name | 是    | String | 通道名称，名称长度限制：4-24，不能与系统通道名称（testchainid）相同 |
表2Query参数 
| 参数            | 是否必选 | 参数类型    | 描述                        |
|:---|:---|:---|:---|
| is_pagination | 否    | Boolean | 是否分页，默认为否                 |
| offset        | 否    | Integer | 偏移量，默认为0                  |
| limit         | 否    | Integer | 每页显示的条目数量，默认为10，取值范围为1-50 |
#### 请求参数
表3请求Header参数 
| 参数           | 是否必选 | 参数类型   | 描述      |
|:---|:---|:---|:---|
| X-Auth-Token | 是    | String | 用户Token |
   
#### 响应参数
**状态码： 200**
表4响应Body参数 
| 参数    | 参数类型                                                                                    | 描述   |
|:---|:---|:---|
| count | Integer                                                                                 | 交易总数 |
| data  | Array of [TransactionSummary] objects | 交易   |
   
 表5TransactionSummary 
| 参数                | 参数类型    | 描述    |
|:---|:---|:---|
| 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 |
   
#### 错误码
请参见[错误码](https://support.huaweicloud.com/devg-bcs/ErrorCode.html)。
