(**kwargs)
return response
Makes a call to the ignored database.
    Content:
        {
            "ignored": List[Dict]: list of dictionaries representing ignored alerts
        }
        Each item in "ignored" has fields in IGNORED_FIELDS
Makes a call to the ignored database.
    Content:
        {
            "ignored": List[Dict]: list of dictionaries representing ignored alerts
        }
        Each item in "ignored" has fields in IGNORED_FIELDS
Makes a call to the ignored database . Content : { ignored : List [ Dict ] : list of dictionaries representing ignored alerts } Each item in ignored has fields in IGNORED_FIELDS
def ignored(**kwargs):
    # type: (**Any) -> Dict[str, Any]
    '''
    Makes a call to the ignored database.
    Content:
        {
            "ignored": List[Dict]: list of dictionaries representing ignored alerts
        }
        Each item in "ignored" has fields in IGNORED_FIELDS
    '''
    response = build_response()
    args = kwargs
    build_arguments(DEFAULT_IGNORED_ARGUMENTS, args, response)

    query = IGNORED_QUERY
    params = [] # type: List[Any]

    if args['ldap'] is not None:
        query += build_where(build_in(LDAP_IN, len(args['ldap'])), False)
        params.extend(args['ldap'])

    query += IGNORED_ORDER_BY
    query += LIMIT
    params.append(args['limit'])

    try:
        raw_results = SQLEngine.execute(query, params)
    except SQLEngineException:
        response['error'] = 'Invalid parameters'
        return response

    results = build_query_dict(IGNORED_FIELDS, raw_results)

    # Convert datetimes to timestamps
    for ignored in results:
        ignored['until'] = int(ignored['until'].strftime('%s'))

    response['content']['ignored'] = results
    response['ok'] = True
    return response
def ignored ( * * kwargs ) : # type: (**Any) -> Dict[str, Any] response = build_response ( ) args = kwargs build_arguments ( DEFAULT_IGNORED_ARGUMENTS , args , response ) query = IGNORED_QUERY params = [ ] # type: List[Any] if args [ 'ldap' ] is not None : query += build_where ( build_in ( LDAP_IN , len ( args [ 'ldap' ] ) ) , False ) params . extend ( args [ 'ldap' ] ) query += IGNORED_ORDER_BY query += LIMIT params . append ( args [ 'limit' ] ) try : raw_results = SQLEngine . execute ( query , params ) except SQLEngineException : response [ 'error' ] = 'Invalid parameters' return response results = build_query_dict ( IGNORED_FIELDS , raw_results ) # Convert datetimes to timestamps for ignored in results : ignored [ 'until' ] = int ( ignored [ 'until' ] . strftime ( '%s' ) ) response [ 'content' ] [ 'ignored' ] = results response [ 'ok' ] = True return response