authentik.events.api.notification_mappings

NotificationWebhookMapping API Views

 1"""NotificationWebhookMapping API Views"""
 2
 3from rest_framework.viewsets import ModelViewSet
 4
 5from authentik.core.api.used_by import UsedByMixin
 6from authentik.core.api.utils import ModelSerializer
 7from authentik.events.models import NotificationWebhookMapping
 8
 9
10class NotificationWebhookMappingSerializer(ModelSerializer):
11    """NotificationWebhookMapping Serializer"""
12
13    class Meta:
14        model = NotificationWebhookMapping
15        fields = [
16            "pk",
17            "name",
18            "expression",
19        ]
20
21
22class NotificationWebhookMappingViewSet(UsedByMixin, ModelViewSet):
23    """NotificationWebhookMapping Viewset"""
24
25    queryset = NotificationWebhookMapping.objects.all()
26    serializer_class = NotificationWebhookMappingSerializer
27    filterset_fields = ["name"]
28    ordering = ["name"]
29    search_fields = ["name"]
class NotificationWebhookMappingSerializer(authentik.core.api.utils.ModelSerializer):
11class NotificationWebhookMappingSerializer(ModelSerializer):
12    """NotificationWebhookMapping Serializer"""
13
14    class Meta:
15        model = NotificationWebhookMapping
16        fields = [
17            "pk",
18            "name",
19            "expression",
20        ]

NotificationWebhookMapping Serializer

class NotificationWebhookMappingSerializer.Meta:
14    class Meta:
15        model = NotificationWebhookMapping
16        fields = [
17            "pk",
18            "name",
19            "expression",
20        ]
fields = ['pk', 'name', 'expression']
class NotificationWebhookMappingViewSet(authentik.core.api.used_by.UsedByMixin, rest_framework.viewsets.ModelViewSet):
23class NotificationWebhookMappingViewSet(UsedByMixin, ModelViewSet):
24    """NotificationWebhookMapping Viewset"""
25
26    queryset = NotificationWebhookMapping.objects.all()
27    serializer_class = NotificationWebhookMappingSerializer
28    filterset_fields = ["name"]
29    ordering = ["name"]
30    search_fields = ["name"]

NotificationWebhookMapping Viewset

queryset = <InheritanceQuerySet []>
serializer_class = <class 'NotificationWebhookMappingSerializer'>
filterset_fields = ['name']
ordering = ['name']
search_fields = ['name']
name = None
description = None
suffix = None
detail = None
basename = None