# Update the rule config for a catalog

Launch stage: Beta

`PATCH /api/2.0/lakewatch/{name=catalogs/*/ruleConfig}`

Updates the detection-rule configuration for a catalog.

API scopes: lakewatch

## Path parameters

- `name` (string, required, ID, Immutable)

## Query parameters

- `update_mask` (string, required)
- `etag` (string, optional)
  Optimistic-concurrency precondition: if set and it does not match the
   resource's current `etag`, the update is rejected as a conflict (HTTP 409).

## Request body

- `default_schedule` (object, optional)
  Default schedule for rules that don't specify one.
  - `at_least_every` (string, optional)
    Defines the minimum cadence as a duration string. It may contain components
     for days, hours, minutes, and seconds (e.g. `5d`, `5d3h`, `3d2h5m12s`,
     `12m16s`).
  - `cron_expression` (string, optional)
    Defines the schedule using a Quartz cron expression.
  - `continuous` (boolean, optional)
    Runs the rule continuously. Detection rules do not accept it: batch rules reject it, and
     streaming rules run continuously without it.
  - `enabled` (boolean, optional)
    Sets whether the job is scheduled to run. Defaults to true.
- `detection_categories` (array of string, optional)
  Available detection categories a rule can be tagged with. Reads return the
   value as supplied. When empty, rules can be tagged with the default categories:
   `Static Signature`, `Fuzzy Signature`, `Behavioral`, `Statistical`, and
   `Learning (AI/ML)`. The categories in effect are reported in
   `effective_detection_categories`.
- `default_signal_collation_window` (string, optional)
  Default duration string for signal deduplication when a rule
   doesn't override it — compact day/hour/minute/second components, e.g.
   `5d`, `1h`. Reads return the value as supplied; there is no server default,
   so it is unset until set. An empty value clears it.
- `default_folder` (string, optional)
  Schema name of the registered folder (in this catalog) that a new rule is
   placed in when the request does not specify a schema. Must name a schema
   registered as a folder. Omit to clear. Reads return the value as supplied; the
   folder's current schema name is reported in `effective_default_folder`.

## Returns

Returns the RuleConfig object.

## Response

```json
{
  "name": "string",
  "version": 0,
  "update_time": "string",
  "updated_by": {
    "id": "string",
    "principal_type": "REGULAR_USER",
    "email": "string",
    "display_name": "string"
  },
  "etag": "string",
  "default_schedule": {
    "at_least_every": "string",
    "cron_expression": "string",
    "continuous": true,
    "enabled": true
  },
  "detection_categories": [
    "string"
  ],
  "default_signal_collation_window": "string",
  "default_folder": "string",
  "effective_detection_categories": [
    "string"
  ],
  "effective_default_folder": "string"
}
```

