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
Path Parameters
Query Parameters
Back to Top

Response

Supported Media Types

200 Response

Retrieved block statistics information successfully
Body ()
Root Schema : blockStatistic
Type: object
Show Source
Nested Schema : activities
Type: array
Show Source
Nested Schema : blocks
Type: array
Show Source
Nested Schema : overview
Type: object
Show Source
Nested Schema : items
Type: object
Show Source
Nested Schema : items
Type: object
Show Source
Nested Schema : data
Type: object
Nested Schema : header
Type: object

400 Response

Invalid arguments
Body ()
Root Schema : 400errorModels
Type: object
Show Source
Example:
{
    "respMesg":"invalid argument"
}

401 Response

Unauthorized

500 Response

Internal server error
Body ()
Root Schema : 500errorModels
Type: object
Show Source

Default Response

Unexpected error
Body ()
Root Schema : errorModel
Type: object
Show Source
Back to Top