# List rules

Launch stage: Beta

`GET /api/2.0/lakewatch/rules`

Lists rules, with optional filtering and pagination.

API scopes: lakewatch

## Query parameters

- `page_size` (int32, optional)
  Maximum number of rules to return. The server may return fewer. If unset
   or 0, the server picks a default page size.
- `page_token` (string, optional)
  Page token from a previous `ListRules` response, used to fetch the next
   page of results.
- `filter` (string, optional)
  Filter expression that restricts the results, such as `rule_name = "my_rule"` to return
   only the rule with that name. The name is matched against the current UC name, which
   reads report in `effective_rule_name`.
- `catalog_name` (string, required)
  Name of the Unity Catalog catalog to list rules from. Required.
- `schema_name` (string, optional)
  Name of a Unity Catalog schema in `catalog_name`. If set, only rules in this schema are
   returned. If unset, rules in all schemas of the catalog are returned.
- `view` (string, optional)
  How much of each rule to return. Defaults to `RULE_VIEW_FULL`. `RULE_VIEW_BASIC` returns
   only each rule's identity and Unity Catalog location.
  Possible values:
  - `RULE_VIEW_BASIC`
  - `RULE_VIEW_FULL`

## Returns

Returns a list of Rule objects.

## Response

```json
{
  "rules": [
    {
      "name": "rules/550e8400-e29b-41d4-a716-446655440000",
      "rule_id": "string",
      "catalog_name": "string",
      "schema_name": "string",
      "effective_catalog_name": "string",
      "effective_schema_name": "string",
      "rule_name": "string",
      "effective_rule_name": "string",
      "description": "string",
      "version": 0,
      "create_time": "string",
      "update_time": "string",
      "created_by": {},
      "updated_by": {},
      "etag": "string",
      "annotations": {},
      "owner": {},
      "run_as_principal": "string",
      "effective_run_as_principal": "string",
      "category": "string",
      "severity": "string",
      "fidelity": "FIDELITY_DEVELOPMENT",
      "objective": "string",
      "mitre": [
        {}
      ],
      "deduplication": "DEDUPLICATION_DEFAULT",
      "deduplication_time_window": "string",
      "schedule": {},
      "batch": {},
      "output": {},
      "status": {},
      "suppress_until_time": "string",
      "original_content_pack": {},
      "compute_workspace_id": "string",
      "content_resource_id": "string",
      "references": [
        "string"
      ],
      "runbook": "string",
      "timerange": {}
    }
  ],
  "next_page_token": "string"
}
```

