'Create a rule
Create a new rule for the given project.
{method} {path}
"name": "My rule name",
"conditions": [],
"actions": [],
"actionMatch": "all"'

def post(self, request, project):

    serializer = RuleSerializer(context={'project': project}, data=request.DATA)
    if serializer.is_valid():
        rule = serializer.save(rule=Rule())
        self.create_audit_entry(request=request, organization=project.organization, target_object=rule.id, event=AuditLogEntryEvent.RULE_ADD, data=rule.get_audit_log_data())
        alert_rule_created.send(project=project, rule=rule, sender=self)
        return Response(serialize(rule, request.user))
    return Response(serializer.errors, status=status.HTTP_400_BAD_REQUEST)
