events
Client for the Event Webhooks endpoints.
These are top-level @app routes under /api/events/webhooks (defined in
refs/owui_source_main/backend/open_webui/main.py, not in a router module). All
four endpoints require administrator access. The event webhooks system replaced
the old per-instance /api/webhook URL endpoints in Open WebUI 0.10.0.
Classes
EventsClient
EventsClient(client: OWUIClientBase)
Bases: ResourceBase
Client for the Event Webhooks admin endpoints.
- Code Reference client Classes OpenWebUI Attributes events
Source code in src/owui_client/client_base.py
Functions
get_event_webhooks
get_event_webhooks() -> List[EventWebhook]
List all configured event webhooks.
Returns the normalized webhook list stored under the events.webhooks
config key. Invalid entries in the stored config are skipped by the
backend rather than causing an error.
Returns:
| Type | Description |
|---|---|
List[EventWebhook]
|
List[EventWebhook]: All event webhooks (may be empty). |
Source code in src/owui_client/routers/events.py
create_event_webhook
create_event_webhook(
form_data: EventWebhookForm,
) -> EventWebhook
Create an event webhook (always appends).
Submits the form to POST /api/events/webhooks. Because EventWebhookForm
does not expose id, this always appends a new webhook with a
server-generated id; the backend's underlying upsert-by-id path is not
reachable from this client. The URL is validated against the server URL
allow-list and event filters are validated against the event catalog.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
form_data
|
EventWebhookForm
|
Creation body; |
required |
Returns:
| Type | Description |
|---|---|
EventWebhook
|
|
Raises:
| Type | Description |
|---|---|
HTTPStatusError
|
|
Source code in src/owui_client/routers/events.py
update_event_webhook
update_event_webhook(
webhook_id: str, form_data: EventWebhookUpdateForm
) -> EventWebhook
Update an existing event webhook by id.
Only the non-None fields on form_data are merged onto the stored
webhook. The URL (if provided) and event filters are re-validated.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
webhook_id
|
str
|
The id of the webhook to update. |
required |
form_data
|
EventWebhookUpdateForm
|
Partial update body. |
required |
Returns:
| Type | Description |
|---|---|
EventWebhook
|
|
Raises:
| Type | Description |
|---|---|
HTTPStatusError
|
|
Source code in src/owui_client/routers/events.py
delete_event_webhook
Delete an event webhook by id.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
webhook_id
|
str
|
The id of the webhook to delete. Deleting the special
|
required |
Returns:
| Type | Description |
|---|---|
bool
|
|
Raises:
| Type | Description |
|---|---|
HTTPStatusError
|
|