def create_alert(ldap, title, description, reason):
    # type: (str, str, str, str) -> Dict[str, Any]
    '''
    Creates a new alert.
    Args:
        ldap: The username of the person to send an alert to
        title: The internal title
        description: A short slug that describes the alert/user visible title
        reason: The reason for creating the alert
    Content:
        Empty.
    '''
    response = build_response()
    try:
        create_new_alert(title, ldap, description, reason)
    except SQLEngineException:
        response['error'] = 'Invalid parameters'
        return response
    response['ok'] = True
    return response
Creates a new alert.
Args:
ldap: The username of the person to send an alert to
title: The internal title
description: A short slug that describes the alert/user visible title
reason: The reason for creating the alert
Content:
Empty.
frontend/securitybot_api.py