---
title: "Update event rule"
method: PUT
path: "/eventrules/{name}"
tags: ["event manager"]
---

# Update event rule

`PUT /eventrules/{name}`

Updates an existing event rule

## Request body

- EventRuleMinimal
  - `id` integer
  - `name` string — unique name
  - `status` 0 | 1 — status: * `0` disabled * `1` enabled
  - `description` string — optional description
  - `created_at` integer — creation time as unix timestamp in milliseconds
  - `updated_at` integer — last update time as unix timestamp in millisecond
  - `trigger` 1 | 2 | 3 | 4 | 5 | 6 | 7 — Supported event trigger types: * `1` - Filesystem event * `2` - Provider event * `3` - Schedule * `4` - IP blocked * `5` - Certificate renewal * `6` - On demand, like schedule but executed on demand * `7` - Identity provider login
  - `conditions` EventConditions
    - `fs_events` string[]
    - `provider_events` string[]
    - `schedules` Schedule[]
      - `hour` string
      - `day_of_week` string
      - `day_of_month` string
      - `month` string
    - `idp_login_event` 0 | 1 | 2 — IDP login events: - `0` any login event - `1` user login event - `2` admin login event
    - `options` ConditionOptions
      - `names` ConditionPattern[]
        - `pattern` string
        - `inverse_match` boolean
      - `group_names` ConditionPattern[]
        - `pattern` string
        - `inverse_match` boolean
      - `role_names` ConditionPattern[]
        - `pattern` string
        - `inverse_match` boolean
      - `fs_paths` ConditionPattern[]
        - `pattern` string
        - `inverse_match` boolean
      - `protocols` string[]
      - `provider_objects` string[]
      - `min_size` integer
      - `max_size` integer
      - `concurrent_execution` boolean — allow concurrent execution from multiple nodes
  - `actions` EventActionMinimal[]
    - `name` string
    - `order` integer — execution order
    - `relation_options` EventActionOptions
      - `is_failure_action` boolean
      - `stop_on_failure` boolean
      - `execute_sync` boolean

## Response `200`

successful operation

- ApiResponse
  - `message` string — message, can be empty
  - `error` string — error description if any

## Other responses

- `400` — Bad Request
- `401` — Unauthorized
- `403` — Forbidden
- `404` — Not Found
- `500` — Internal Server Error
- `default` — Unexpected Error

---

[API](https://skmtc.net/kanton-bern/apis/sftpgo.md) · [All operations](https://skmtc.net/kanton-bern/apis/sftpgo/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/kanton-bern/sftpgo/versions/d8d616a479b0/schema)
