Get a List of Block's Data
get
/console/admin/api/v2/channels/{channelName}/blocks
Using the channel name, a block ID range, you can get a list of the block's data for a range of blocks on a channel, including transactions, deployments, and invocations. This API returns 1000 blocks data at most. If no parameter is specified, it will return the latest 1000 blocks. If only fromId(since) is input, the toId(until) will be set as the current ledger height by default. If only toId(until) is input, the fromId(since) will be set as 0 by default. If the query range is beyond this value, an error message will be returned.
Request
Supported Media Types
- application/json
Path Parameters
-
channelName(required): string
Channel name
Query Parameters
-
fromId: number
Begining ID of the selected block range
-
toId: number
The end ID of the selected block range
Response
Supported Media Types
- application/json
200 Response
Retrieved block statistics information successfully
Nested Schema : data
Type:
object
Nested Schema : header
Type:
object
400 Response
Invalid arguments
401 Response
Unauthorized
500 Response
Internal server error
Default Response
Unexpected error