Files
authentik/website/docs/developer-docs/api/reference/events-rules-update.api.mdx
Tana M Berry 7a6d44d0df first pass
2024-10-22 15:10:13 -05:00

765 lines
34 KiB
Plaintext

---
id: events-rules-update
title: "events_rules_update"
description: "NotificationRule Viewset"
sidebar_label: "events_rules_update"
hide_title: true
hide_table_of_contents: true
api: eJztWNtu2zgQ/RVCWKC7qG2lzqXdPDXbBoWBpg2Sui+p16AkymZDkVqSsus19O87Q0qWfE16w770JZGl4XDmzJnhcJaBypmmlis5SILzgM2YtGasC8HMuMgTalnQCRJmYs1zlAKZd8rylMdu0Q0Iko+czQ2zIJhTTTNmmTbB+d0y4CieUzuFTxI+4K8oGxcFT+CNiacso8H5MrCLHL8Zq7mcwJdU6YxaeOMky00DLshwOHhNvDjhCZjM0wU+2yk3pG0fQQN7oFKzfwquGfhodcHKUSewdIJWVi4HIy/DjP1LJQu0KlbSwid8pHkuKo3hZ4NGLLfNV9FnFtuH4bplmlPB/2UaEdMYAMuZQU0epG1AMi7fMjkBIM+fARxWU2lypa1pCVOt6QJkuWWZ+QZUb5kA88l8yuMpaXYgZqoKkZCIkcKwhFhFJHq0ALDdK90jgxTeSUaoZsQ4NSzpuO+yHYs5F4IoKRaoDNTOJeHSidEC/kIU78lw0EPTDERFc+viQIV4nzo+MVlkGDLUGiMx51RL7xwVgCIGcdNry61gzj2v8RJ1YPzXvX8FwdZKmMr/en8i4EE4G2PNIBuSNZeM92lKZ8yZPdGqyB/GHrKhEIJGaBjScdOY1yzlAKc3xekkKnVYG0/xNVibABnAkFCZVOBa5UIjWGoJy3K76KznxlzJJxbWSbcQHCjbeXLn2ThqINxk8o3PF1hXbiUYhjAufAghcqsAw69R6XIN6CWNp33/6Oh/Srj8/jHRgsgn74G3dbRqQK6jjNTJtDt1fyXrr2T9SclaOTCGLFgH/nB2vHEW/rSU8OpXSVFk4zV9HDJ84jZdV3AogbgZmwIMREhbApFSglG55eDQIU+TxPPfhcCHxYUfka+1GQcjNC1V1fk6IqyWjvcd25sgba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P92zRHlmWI5CdQtnHewgY7T+/8qZ1P6CSZvlWVSo79YqLOGa5PSg7ahWA6yHSJqqmkpkrOoGmc0Qf/jpLlUPKJbV7t4TuTk4KOkFZr9JV4QLD1/SkPrc79UPr9riOBUTRSXxQ90xCJGtoLP5GXMryP1y9tkU=
sidebar_class_name: "put api-method"
info_path: docs/developer-docs/api/reference/authentik
custom_edit_url: null
hide_send_button: true
---
import ApiTabs from "@theme/ApiTabs";
import DiscriminatorTabs from "@theme/DiscriminatorTabs";
import MethodEndpoint from "@theme/ApiExplorer/MethodEndpoint";
import SecuritySchemes from "@theme/ApiExplorer/SecuritySchemes";
import MimeTabs from "@theme/MimeTabs";
import ParamsItem from "@theme/ParamsItem";
import ResponseSamples from "@theme/ResponseSamples";
import SchemaItem from "@theme/SchemaItem";
import SchemaTabs from "@theme/SchemaTabs";
import Heading from "@theme/Heading";
import OperationTabs from "@theme/OperationTabs";
import TabItem from "@theme/TabItem";
<Heading
as={"h1"}
className={"openapi__heading"}
children={"events_rules_update"}
>
</Heading>
<MethodEndpoint
method={"put"}
path={"/events/rules/{pbm_uuid}/"}
>
</MethodEndpoint>
NotificationRule Viewset
<Heading
id={"request"}
as={"h2"}
className={"openapi-tabs__heading"}
children={"Request"}
>
</Heading>
<details
style={{"marginBottom":"1rem"}}
className={"openapi-markdown__details"}
data-collapsed={false}
open={true}
>
<summary
style={{}}
>
<h3
className={"openapi-markdown__details-summary-header-params"}
>
Path Parameters
</h3>
</summary><div>
<ul>
<ParamsItem
className={"paramsItem"}
param={{"in":"path","name":"pbm_uuid","schema":{"type":"string","format":"uuid"},"description":"A UUID string identifying this Notification Rule.","required":true}}
>
</ParamsItem>
</ul>
</div>
</details><MimeTabs
className={"openapi-tabs__mime"}
>
<TabItem
label={"application/json"}
value={"application/json-schema"}
>
<details
style={{}}
className={"openapi-markdown__details mime"}
data-collapsed={false}
open={true}
>
<summary
style={{}}
className={"openapi-markdown__details-summary-mime"}
>
<h3
className={"openapi-markdown__details-summary-header-body"}
>
Body
</h3><strong
className={"openapi-schema__required"}
>
required
</strong>
</summary><div
style={{"textAlign":"left","marginLeft":"1rem"}}
>
</div><ul
style={{"marginLeft":"1rem"}}
>
<SchemaItem
collapsible={false}
name={"name"}
required={true}
schemaName={"string"}
qualifierMessage={"**Possible values:** `non-empty`"}
schema={{"type":"string","minLength":1}}
>
</SchemaItem><SchemaItem
collapsible={false}
name={"transports"}
required={false}
schemaName={"uuid[]"}
qualifierMessage={undefined}
schema={{"type":"array","items":{"type":"string","format":"uuid"},"description":"Select which transports should be used to notify the user. If none are selected, the notification will only be shown in the authentik UI."}}
>
</SchemaItem><SchemaItem
collapsible={false}
name={"severity"}
required={false}
schemaName={"SeverityEnum (string)"}
qualifierMessage={"**Possible values:** [`notice`, `warning`, `alert`]"}
schema={{"enum":["notice","warning","alert"],"type":"string","title":"SeverityEnum"}}
>
</SchemaItem><SchemaItem
collapsible={false}
name={"group"}
required={false}
schemaName={"uuid"}
qualifierMessage={undefined}
schema={{"type":"string","format":"uuid","nullable":true,"description":"Define which group of users this notification should be sent and shown to. If left empty, Notification won't ben sent."}}
>
</SchemaItem>
</ul>
</details>
</TabItem>
</MimeTabs><div>
<div>
<ApiTabs
label={undefined}
id={undefined}
>
<TabItem
label={"200"}
value={"200"}
>
<div>
</div><div>
<MimeTabs
className={"openapi-tabs__mime"}
schemaType={"response"}
>
<TabItem
label={"application/json"}
value={"application/json"}
>
<SchemaTabs
className={"openapi-tabs__schema"}
>
<TabItem
label={"Schema"}
value={"Schema"}
>
<details
style={{}}
className={"openapi-markdown__details response"}
data-collapsed={false}
open={true}
>
<summary
style={{}}
className={"openapi-markdown__details-summary-response"}
>
<strong>
Schema
</strong>
</summary><div
style={{"textAlign":"left","marginLeft":"1rem"}}
>
</div><ul
style={{"marginLeft":"1rem"}}
>
<SchemaItem
collapsible={false}
name={"pk"}
required={true}
schemaName={"uuid"}
qualifierMessage={undefined}
schema={{"type":"string","format":"uuid","readOnly":true,"title":"Pbm uuid"}}
>
</SchemaItem><SchemaItem
collapsible={false}
name={"name"}
required={true}
schemaName={"string"}
qualifierMessage={undefined}
schema={{"type":"string"}}
>
</SchemaItem><SchemaItem
collapsible={false}
name={"transports"}
required={false}
schemaName={"uuid[]"}
qualifierMessage={undefined}
schema={{"type":"array","items":{"type":"string","format":"uuid"},"description":"Select which transports should be used to notify the user. If none are selected, the notification will only be shown in the authentik UI."}}
>
</SchemaItem><SchemaItem
collapsible={false}
name={"severity"}
required={false}
schemaName={"SeverityEnum (string)"}
qualifierMessage={"**Possible values:** [`notice`, `warning`, `alert`]"}
schema={{"enum":["notice","warning","alert"],"type":"string","title":"SeverityEnum"}}
>
</SchemaItem><SchemaItem
collapsible={false}
name={"group"}
required={false}
schemaName={"uuid"}
qualifierMessage={undefined}
schema={{"type":"string","format":"uuid","nullable":true,"description":"Define which group of users this notification should be sent and shown to. If left empty, Notification won't ben sent."}}
>
</SchemaItem><SchemaItem
collapsible={true}
className={"schemaItem"}
>
<details
style={{}}
className={"openapi-markdown__details"}
>
<summary
style={{}}
>
<span
className={"openapi-schema__container"}
>
<strong
className={"openapi-schema__property"}
>
group_obj
</strong><span
className={"openapi-schema__name"}
>
object
</span><span
className={"openapi-schema__divider"}
>
</span><span
className={"openapi-schema__required"}
>
required
</span>
</span>
</summary><div
style={{"marginLeft":"1rem"}}
>
<div
style={{"marginTop":".5rem","marginBottom":".5rem"}}
>
Group Serializer
</div><SchemaItem
collapsible={false}
name={"pk"}
required={true}
schemaName={"uuid"}
qualifierMessage={undefined}
schema={{"type":"string","format":"uuid","readOnly":true,"title":"Group uuid"}}
>
</SchemaItem><SchemaItem
collapsible={false}
name={"num_pk"}
required={true}
schemaName={"integer"}
qualifierMessage={undefined}
schema={{"type":"integer","readOnly":true}}
>
</SchemaItem><SchemaItem
collapsible={false}
name={"name"}
required={true}
schemaName={"string"}
qualifierMessage={undefined}
schema={{"type":"string"}}
>
</SchemaItem><SchemaItem
collapsible={false}
name={"is_superuser"}
required={false}
schemaName={"boolean"}
qualifierMessage={undefined}
schema={{"type":"boolean","description":"Users added to this group will be superusers."}}
>
</SchemaItem><SchemaItem
collapsible={false}
name={"parent"}
required={false}
schemaName={"uuid"}
qualifierMessage={undefined}
schema={{"type":"string","format":"uuid","nullable":true}}
>
</SchemaItem><SchemaItem
collapsible={false}
name={"parent_name"}
required={true}
schemaName={"string"}
qualifierMessage={undefined}
schema={{"type":"string","readOnly":true,"nullable":true}}
>
</SchemaItem><SchemaItem
collapsible={false}
name={"users"}
required={false}
schemaName={"integer[]"}
qualifierMessage={undefined}
schema={{"type":"array","items":{"type":"integer"}}}
>
</SchemaItem><SchemaItem
collapsible={true}
className={"schemaItem"}
>
<details
style={{}}
className={"openapi-markdown__details"}
>
<summary
style={{}}
>
<span
className={"openapi-schema__container"}
>
<strong
className={"openapi-schema__property"}
>
users_obj
</strong><span
className={"openapi-schema__name"}
>
object[]
</span><span
className={"openapi-schema__divider"}
>
</span><span
className={"openapi-schema__nullable"}
>
nullable
</span><span
className={"openapi-schema__required"}
>
required
</span>
</span>
</summary><div
style={{"marginLeft":"1rem"}}
>
<li>
<div
style={{"fontSize":"var(--ifm-code-font-size)","opacity":"0.6","marginLeft":"-.5rem","paddingBottom":".5rem"}}
>
Array [
</div>
</li><SchemaItem
collapsible={false}
name={"pk"}
required={true}
schemaName={"ID (integer)"}
qualifierMessage={undefined}
schema={{"type":"integer","readOnly":true,"title":"ID"}}
>
</SchemaItem><SchemaItem
collapsible={false}
name={"username"}
required={true}
schemaName={"string"}
qualifierMessage={"**Possible values:** `<= 150 characters`, Value must match regular expression `^[\\w.@+-]+$`"}
schema={{"type":"string","description":"Required. 150 characters or fewer. Letters, digits and @/./+/-/_ only.","pattern":"^[\\w.@+-]+$","maxLength":150}}
>
</SchemaItem><SchemaItem
collapsible={false}
name={"name"}
required={true}
schemaName={"string"}
qualifierMessage={undefined}
schema={{"type":"string","description":"User's display name."}}
>
</SchemaItem><SchemaItem
collapsible={false}
name={"is_active"}
required={false}
schemaName={"Active (boolean)"}
qualifierMessage={undefined}
schema={{"type":"boolean","title":"Active","description":"Designates whether this user should be treated as active. Unselect this instead of deleting accounts."}}
>
</SchemaItem><SchemaItem
collapsible={false}
name={"last_login"}
required={false}
schemaName={"date-time"}
qualifierMessage={undefined}
schema={{"type":"string","format":"date-time","nullable":true}}
>
</SchemaItem><SchemaItem
collapsible={false}
name={"email"}
required={false}
schemaName={"email"}
qualifierMessage={"**Possible values:** `<= 254 characters`"}
schema={{"type":"string","format":"email","title":"Email address","maxLength":254}}
>
</SchemaItem><SchemaItem
collapsible={false}
name={"attributes"}
required={false}
schemaName={"object"}
qualifierMessage={undefined}
schema={{"type":"object"}}
>
</SchemaItem><SchemaItem
collapsible={false}
name={"uid"}
required={true}
schemaName={"string"}
qualifierMessage={undefined}
schema={{"type":"string","readOnly":true}}
>
</SchemaItem><li>
<div
style={{"fontSize":"var(--ifm-code-font-size)","opacity":"0.6","marginLeft":"-.5rem"}}
>
]
</div>
</li>
</div>
</details>
</SchemaItem><SchemaItem
collapsible={false}
name={"attributes"}
required={false}
schemaName={"object"}
qualifierMessage={undefined}
schema={{"type":"object"}}
>
</SchemaItem><SchemaItem
collapsible={false}
name={"roles"}
required={false}
schemaName={"uuid[]"}
qualifierMessage={undefined}
schema={{"type":"array","items":{"type":"string","format":"uuid"}}}
>
</SchemaItem><SchemaItem
collapsible={true}
className={"schemaItem"}
>
<details
style={{}}
className={"openapi-markdown__details"}
>
<summary
style={{}}
>
<span
className={"openapi-schema__container"}
>
<strong
className={"openapi-schema__property"}
>
roles_obj
</strong><span
className={"openapi-schema__name"}
>
object[]
</span><span
className={"openapi-schema__divider"}
>
</span><span
className={"openapi-schema__required"}
>
required
</span>
</span>
</summary><div
style={{"marginLeft":"1rem"}}
>
<li>
<div
style={{"fontSize":"var(--ifm-code-font-size)","opacity":"0.6","marginLeft":"-.5rem","paddingBottom":".5rem"}}
>
Array [
</div>
</li><SchemaItem
collapsible={false}
name={"pk"}
required={true}
schemaName={"uuid"}
qualifierMessage={undefined}
schema={{"type":"string","format":"uuid","readOnly":true,"title":"Uuid"}}
>
</SchemaItem><SchemaItem
collapsible={false}
name={"name"}
required={true}
schemaName={"string"}
qualifierMessage={"**Possible values:** `<= 150 characters`"}
schema={{"type":"string","maxLength":150}}
>
</SchemaItem><li>
<div
style={{"fontSize":"var(--ifm-code-font-size)","opacity":"0.6","marginLeft":"-.5rem"}}
>
]
</div>
</li>
</div>
</details>
</SchemaItem>
</div>
</details>
</SchemaItem>
</ul>
</details>
</TabItem><TabItem
label={"Example (from schema)"}
value={"Example (from schema)"}
>
<ResponseSamples
responseExample={"{\n \"pk\": \"3fa85f64-5717-4562-b3fc-2c963f66afa6\",\n \"name\": \"string\",\n \"transports\": [\n \"3fa85f64-5717-4562-b3fc-2c963f66afa6\"\n ],\n \"severity\": \"notice\",\n \"group\": \"3fa85f64-5717-4562-b3fc-2c963f66afa6\",\n \"group_obj\": {\n \"pk\": \"3fa85f64-5717-4562-b3fc-2c963f66afa6\",\n \"num_pk\": 0,\n \"name\": \"string\",\n \"is_superuser\": true,\n \"parent\": \"3fa85f64-5717-4562-b3fc-2c963f66afa6\",\n \"parent_name\": \"string\",\n \"users\": [\n 0\n ],\n \"users_obj\": [\n {\n \"pk\": 0,\n \"username\": \"string\",\n \"name\": \"string\",\n \"is_active\": true,\n \"last_login\": \"2024-07-29T15:51:28.071Z\",\n \"email\": \"user@example.com\",\n \"attributes\": {},\n \"uid\": \"string\"\n }\n ],\n \"attributes\": {},\n \"roles\": [\n \"3fa85f64-5717-4562-b3fc-2c963f66afa6\"\n ],\n \"roles_obj\": [\n {\n \"pk\": \"3fa85f64-5717-4562-b3fc-2c963f66afa6\",\n \"name\": \"string\"\n }\n ]\n }\n}"}
language={"json"}
>
</ResponseSamples>
</TabItem>
</SchemaTabs>
</TabItem>
</MimeTabs>
</div>
</TabItem><TabItem
label={"400"}
value={"400"}
>
<div>
</div><div>
<MimeTabs
className={"openapi-tabs__mime"}
schemaType={"response"}
>
<TabItem
label={"application/json"}
value={"application/json"}
>
<SchemaTabs
className={"openapi-tabs__schema"}
>
<TabItem
label={"Schema"}
value={"Schema"}
>
<details
style={{}}
className={"openapi-markdown__details response"}
data-collapsed={false}
open={true}
>
<summary
style={{}}
className={"openapi-markdown__details-summary-response"}
>
<strong>
Schema
</strong>
</summary><div
style={{"textAlign":"left","marginLeft":"1rem"}}
>
</div><ul
style={{"marginLeft":"1rem"}}
>
<SchemaItem
collapsible={false}
name={"non_field_errors"}
required={false}
schemaName={"string[]"}
qualifierMessage={undefined}
schema={{"type":"array","items":{"type":"string"}}}
>
</SchemaItem><SchemaItem
collapsible={false}
name={"code"}
required={false}
schemaName={"string"}
qualifierMessage={undefined}
schema={{"type":"string"}}
>
</SchemaItem><SchemaItem
name={"property name*"}
required={false}
schemaName={"any"}
qualifierMessage={undefined}
schema={{"type":"object","description":"Validation Error","properties":{"non_field_errors":{"type":"array","items":{"type":"string"}},"code":{"type":"string"}},"additionalProperties":{},"title":"ValidationError"}}
collapsible={false}
discriminator={false}
>
</SchemaItem>
</ul>
</details>
</TabItem><TabItem
label={"Example (from schema)"}
value={"Example (from schema)"}
>
<ResponseSamples
responseExample={"{\n \"non_field_errors\": [\n \"string\"\n ],\n \"code\": \"string\"\n}"}
language={"json"}
>
</ResponseSamples>
</TabItem>
</SchemaTabs>
</TabItem>
</MimeTabs>
</div>
</TabItem><TabItem
label={"403"}
value={"403"}
>
<div>
</div><div>
<MimeTabs
className={"openapi-tabs__mime"}
schemaType={"response"}
>
<TabItem
label={"application/json"}
value={"application/json"}
>
<SchemaTabs
className={"openapi-tabs__schema"}
>
<TabItem
label={"Schema"}
value={"Schema"}
>
<details
style={{}}
className={"openapi-markdown__details response"}
data-collapsed={false}
open={true}
>
<summary
style={{}}
className={"openapi-markdown__details-summary-response"}
>
<strong>
Schema
</strong>
</summary><div
style={{"textAlign":"left","marginLeft":"1rem"}}
>
</div><ul
style={{"marginLeft":"1rem"}}
>
<SchemaItem
collapsible={false}
name={"detail"}
required={true}
schemaName={"string"}
qualifierMessage={undefined}
schema={{"type":"string"}}
>
</SchemaItem><SchemaItem
collapsible={false}
name={"code"}
required={false}
schemaName={"string"}
qualifierMessage={undefined}
schema={{"type":"string"}}
>
</SchemaItem>
</ul>
</details>
</TabItem><TabItem
label={"Example (from schema)"}
value={"Example (from schema)"}
>
<ResponseSamples
responseExample={"{\n \"detail\": \"string\",\n \"code\": \"string\"\n}"}
language={"json"}
>
</ResponseSamples>
</TabItem>
</SchemaTabs>
</TabItem>
</MimeTabs>
</div>
</TabItem>
</ApiTabs>
</div>
</div>