You can call this operation to query a block based on the height of the block on a blockchain in Ant Blockchain.
Debugging
Request parameters
Parameter | Type | Required | Example | Description |
---|---|---|---|---|
AntChainId | String | Yes | pYogqb9v |
The ID of the blockchain on which you want to query the block based on the block height. |
Height | Long | Yes | 1234 |
The height of the block to query. |
Action | String | No | DescribeAntChainBlock |
The operation that you want to perform. Set the value to DescribeAntChainBlock. |
RegionId | String | No | cn-hangzhou |
The ID of the region where Ant Blockchain is used. |
Response parameters
Parameter | Type | Example | Description |
---|---|---|---|
RequestId | String | 4DDA2E72-778A-4D79-BE70-448A26A57227 |
The ID of the request. |
Result |
The result of the operation. |
||
AntChainId | String | pYogqb9v |
The ID of the blockchain to which the block belongs. |
BlockHash | String | aeec5963f8deeeae820aaf302f0c925db9fa8d07b9898dac782335f817554e47 |
The hash of the block. |
CreateTime | Long | 1562851727742 |
The time when the block was created. |
Height | Integer | 1234 |
The height of the block. |
PreviousHash | String | e11767c7b9d92563663a76f10c69e8354788001e2c9e6bd9267239a81d3bb523 |
The hash of the previous block. |
RootTxHash | String | 0000000000000000000000000000000000000000000000000000000000000000 |
The root transaction hash of the block. |
TransSummaryList | String | [] |
The information about the transactions stored in the block. |
TransactionSize | Integer | 0 |
The number of transactions stored in the block. |
Version | Long | 2 |
The version of the block. |
Examples
Sample requests
http(s)://[Endpoint]/? Action=DescribeAntChainBlock
&<Common request parameters>
Sample success responses
JSON
format
{
"successResponse":true,
"requestId":"4DDA2E72-778A-4D79-BE70-448A26A57227",
"data":{
"Result":{
"PreviousHash":"e11767c7b9d92563663a76f10c69e8354788001e2c9e6bd9267239a81d3bb523",
"BlockHash":"aeec5963f8deeeae820aaf302f0c925db9fa8d07b9898dac782335f817554e47",
"RootTxHash":"0000000000000000000000000000000000000000000000000000000000000000",
"TransSummaryList":[],
"CreateTime":1562851727742,
"Height":1234,
"AntChainId":"pYogqb9v",
"TransactionSize":0,
"Version":2
},
"RequestId":"4DDA2E72-778A-4D79-BE70-448A26A57227"
},
"code":"200"
}
Error codes
For a list of error codes, visit the API Error Center.