Returns blocks in a given milestone by index.
GEThttp://127.0.0.1:8000/api/explorer/v2/milestones/by-index/:milestoneIndex/blocks
Returns block IDs in a given milestone by index sorted by white flag index.
Request
Path Parameters
The milestone index to be used.
Query Parameters
Describes the sort order, either by oldest or newest. This value is NOT overridden by the cursor, and thus can be used to back-page.
Requested page size. Overridden by the cursor if provided.
The cursor which can be used to retrieve the next logical page of results.
Responses
- 200
- 400
- 404
- 500
Successful operation.
- application/json
- Schema
- Example (from schema)
- default
Schema
blocks object[]required
The cursor which can be used to retrieve the next logical page of results.
{
"blocks": [
{
"blockId": "string",
"payloadType": 0
}
],
"cursor": "string"
}
{
"blocks": [
{
"blockId": "0xd0d361341fa3bb2f6855039a82ee9ea470c3336eaf34d22767fdfa901ba63e31",
"payloadType": 0
},
{
"blockId": "0x7a09324557e9200f39bf493fc8fd6ac43e9ca750c6f6d884cc72386ddcb7d695",
"payloadType": 0
},
{
"blockId": "0xfa0de75d225cca2799395e5fc340702fc7eac821d2bdd79911126f131ae097a2",
"payloadType": 0
}
],
"cursor": "4.100"
}
Unsuccessful operation: indicates that the provided parameters are invalid.
- application/json
- Schema
- Example (from schema)
Schema
error objectrequired
{
"error": {
"code": 400,
"message": "invalid data provided"
}
}
Unsuccessful operation: indicates that the requested data was not found.
- application/json
- Schema
- Example (from schema)
Schema
error objectrequired
{
"error": {
"code": 404,
"message": "could not find data"
}
}
Unsuccessful operation: indicates that an unexpected, internal server error happened which prevented the node from fulfilling the request.
- application/json
- Schema
- Example (from schema)
Schema
error objectrequired
{
"error": {
"code": 500,
"message": "internal server error"
}
}
- curl
- python
- go
- nodejs
- ruby
- csharp
- php
- java
- powershell
- CURL
curl -L -X GET 'http://127.0.0.1:8000/api/explorer/v2/milestones/by-index/:milestoneIndex/blocks' \
-H 'Accept: application/json'