Events

Query on-chain events by their name in the specified blocks heights or block IDs.

get/events

Request

  • Base URL
    https://rest-testnet.onflow.org/v1
  • URL
    https://rest-testnet.onflow.org/v1/events
  • Auth
    none declared

Query parameters

typestring required

The qualified event type.

string uint64
OR
'final' | 'sealed'

The start height of the block range for events. Must be used together with end_height. This parameter is incompatible with block_ids.

string uint64
OR
'final' | 'sealed'

The end height of the block range for events. Must be used together with start_height. This parameter is incompatible with block_ids.

block_idsIdentifier[]

List of block IDs. Either provide this parameter or both height parameters. This parameter is incompatible with heights parameters.

selectstring[]

A comma-separated list indicating which properties of the content to return.

agreeing_executors_countstring uint64

A minimum number of execution receipts for the execution result.

required_executor_idsIdentifier[]

A set of execution node IDs, one of which must have produced the execution result.

include_executor_metadataboolean

Specifies whether or not to include the executor metadata in the response.

Response

OK

block_idstring hexadecimal

A 32-byte unique identifier for an entity.

block_heightstring
block_timestampstring date-time

Example response

{
  "metadata": {
    "executor_metadata": {
      "execution_result_id": null,
      "executor_ids": [
        null,
        null
      ]
    }
  },
  "_links": {
    "_self": "_self"
  },
  "block_timestamp": "2000-01-23T04:56:07.000+00:00",
  "block_height": "block_height",
  "block_id": "block_id",
  "events": [
    {
      "transaction_id": null,
      "payload": "",
      "transaction_index": "transaction_index",
      "type": "type",
      "event_index": "event_index"
    },
    {
      "transaction_id": null,
      "payload": "",
      "transaction_index": "transaction_index",
      "type": "type",
      "event_index": "event_index"
    }
  ]
}

Changes

    • info

      added the new optional query request parameter agreeing_executors_count

    • info

      added the new optional query request parameter include_executor_metadata

    • info

      added the new optional query request parameter required_executor_ids

    • info

      added the optional property to the response with the status

    • warning

      deleted the query request parameter agreeing_executors_count

    • warning

      deleted the query request parameter include_executor_metadata

    • warning

      deleted the query request parameter required_executor_ids

    • warning

      removed the optional property from the response with the status