---
title: "List all rules"
method: GET
path: "/rules"
tags: ["Rules"]
---

# List all rules

`GET /rules`

## Request

- Base URL: `https://orbitus.netcorecloud.com`
- URL: `https://orbitus.netcorecloud.com/rules`
- Auth: HTTP bearer

Lists rules for the current client, including associated route assignments with weights.

## Headers

- `X-Client-ID` integer

## Response `200`

List of rules.

- Rule[]
  - `id` integer
  - `client_id` integer
  - `rule_name` string
  - `tag` string
  - `priority` integer: Lower number = higher priority.
  - `expression` string: Expression evaluated by `expr.Compile()`. Available variables: `from_address`, `from_domain`, `from_local`, `to_address`, `to_domain`, `to_local`, `headers`, `remote_ip`, `helo`, `size`. Helper functions: `StartsWith()`, `EndsWith()`, `Contains()`, `Matches()`, `ToLower()`, `ToUpper()`, `Trim()`.
  - `enabled` boolean
  - `rule_routes` RuleRouteAssignment[]
    - `id` integer
    - `provider_name` string
    - `route_id` integer
    - `route_name` string
    - `weight` integer: Distribution weight.
    - `enabled` boolean
  - `created_at` string, date-time

---

[API](https://skmtc.dev/netcorecloud/apis/orbit-router.md) - [All operations](https://skmtc.dev/netcorecloud/apis/orbit-router/llms.txt) - [OpenAPI document](https://skmtc.dev/netcorecloud/apis/orbit-router/revisions/680f0a8ab1a3?raw)
