---
title: "Get all Rules"
method: GET
path: "/streaming/v2/rules"
tags: ["rule"]
---

# Get all Rules

`GET /streaming/v2/rules`

Returns all rules in the system that the user has access to.

## Query parameters

- `name` string

## Response `200`

List of rules returned

- Rule[]
  - `id` string, uuid
  - `name` string, required
  - `description` string
  - `protocol` string, required
  - `network` string, required
  - `type` string, required
  - `isActive` boolean
  - `safeDistance` integer
  - `safeTimeout` integer
  - `condition_type` 'antlr' | 'match_var', required
  - `condition` union, required
    - MatchVar[] — A list of variables used in a matching rule. Each item in the array must reference a valid MatchVar object.
      - `variable_type` string, required
      - `variable_id` string, uuid, required
    - string — A rule expression to define filtering or matching logic. For example, `height > 0` filters out items where the height is not greater than zero.
  - `target` string, uuid, required
  - `template` union
    - string, uuid — An ID representing a specific template.
    - 'UNIFIED_V1' | 'UNIFIED_V1_RAW' | 'ALL_DATA' | 'INPUT_EMAIL' | 'OUTPUT_EMAIL' | 'TX_EMAIL' — Available predefined templates that can be used for event formatting
  - `created_at` string, date-time
  - `updated_at` string, date-time

## Other responses

- `default` — Unexpected error

---

[API](https://skmtc.dev/blockdaemon/apis/staking-api.md) · [All operations](https://skmtc.dev/blockdaemon/apis/staking-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/blockdaemon/staking-api/revisions/f94e296a08a3/schema)
