All URIs are relative to https://rest-canary.onflow.org/v1/
Method | HTTP request | Description |
---|---|---|
BlocksGet | Get /blocks | Gets Blocks by Height |
BlocksIdGet | Get /blocks/{id} | Get Blocks by ID. |
[]Block BlocksGet(ctx, optional) Gets Blocks by Height
Get block data by the provided height range or list of heights.
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
optional | *BlocksApiBlocksGetOpts | optional parameters | nil if no parameters |
Optional parameters are passed through a pointer to a BlocksApiBlocksGetOpts struct
Name | Type | Description | Notes |
---|---|---|---|
height | optional.Interface of []BlockHeight | A comma-separated list of block heights to get. This parameter is incompatible with `start_height` and `end_height`. | |
startHeight | optional.Interface of BlockHeight | The start height of the block range to get. Must be used together with `end_height`. This parameter is incompatible with `height`. | |
endHeight | optional.Interface of BlockHeight | The ending height of the block range to get. Must be used together with `start_height`. This parameter is incompatible with `height`. | |
expand | optional.Interface of []string | A comma-separated list indicating which properties of the content to expand. | |
select_ | optional.Interface of []string | A comma-separated list indicating which properties of the content to return. |
No authorization required
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
[]Block BlocksIdGet(ctx, id, optional) Get Blocks by ID.
Get a block data or list of blocks by the provided ID or list of IDs.
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
id | []string | A block ID or comma-separated list of block IDs. | |
optional | *BlocksApiBlocksIdGetOpts | optional parameters | nil if no parameters |
Optional parameters are passed through a pointer to a BlocksApiBlocksIdGetOpts struct
Name | Type | Description | Notes |
---|
expand | optional.Interface of []string| A comma-separated list indicating which properties of the content to expand. | select_ | optional.Interface of []string| A comma-separated list indicating which properties of the content to return. |
No authorization required
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]