Listing Transactions
Function
Listing Transactions
URI
GET /v2/agent/apis/channel/{channel_name}/transactions
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
channel_name |
Yes |
String |
Channel name. The value can contain 4 to 24 characters and cannot be the same as the system channel name (testchainid). |
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
is_pagination |
No |
Boolean |
Whether to display records on different pages. By default, pagination is not enabled. Default: false |
offset |
No |
Integer |
Offset. The default value is 0. Minimum: 0 Default: 0 |
limit |
No |
Integer |
Number of records displayed on each page. The default value is 10. The value ranges from 1 to 50. Minimum: 1 Maximum: 50 Default: 10 |
Request Parameters
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
X-Auth-Token |
Yes |
String |
User token. |
Response Parameters
Status code: 200
Parameter |
Type |
Description |
---|---|---|
count |
Integer |
Total number of transactions. |
data |
Array of TransactionSummary objects |
Transaction. |
Parameter |
Type |
Description |
---|---|---|
organization_name |
String |
Creator organization. |
type |
String |
Transaction type. |
transaction_id |
String |
Transaction ID. |
chaincode_name |
String |
Chaincode name. |
timestamp |
String |
Timestamp. |
channel_name |
String |
Channel name. |
creator_msp |
String |
Identity information. |
chaincode_version |
String |
Chaincode version. |
block_number |
Integer |
Block ID. |
Status code: 400
Parameter |
Type |
Description |
---|---|---|
error_code |
String |
Error code. |
error_message |
String |
Error description. |
error_msg |
String |
Error description. |
Example Requests
Default mode request.
GET https://192.168.0.90:30603/v2/agent/apis/channel/channel/transactions
Paging mode request.
GET https://192.168.0.90:30603/v2/agent/apis/channel/channel/transactions?is_pagination=true&offset=1&limit=50
Example Responses
Status code: 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" } ] }
Status code: 400
Bad Request
{ "error_code" : "BCS.4000013", "error_msg" : "request body is too large" }
Status Codes
Status Code |
Description |
---|---|
200 |
Success |
400 |
Bad Request |
Error Codes
See Error Codes.
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot