def cli(obj, ids, query, filters):
    """Show raw data for alerts."""
    client = obj['client']
    if ids:
        query = [('id', x) for x in ids]
    elif query:
        query = [('q', query)]
    else:
        query = build_query(filters)
    alerts = client.search(query)

    headers = {'id': 'ID', 'rawData': 'RAW DATA'}
    click.echo(
        tabulate([{'id': a.id, 'rawData': a.raw_data} for a in alerts], headers=headers, tablefmt=obj['output']))
def cli ( obj , ids , query , filters ) : client = obj [ 'client' ] if ids : query = [ ( 'id' , x ) for x in ids ] elif query : query = [ ( 'q' , query ) ] else : query = build_query ( filters ) alerts = client . search ( query ) headers = { 'id' : 'ID' , 'rawData' : 'RAW DATA' } click . echo ( tabulate ( [ { 'id' : a . id , 'rawData' : a . raw_data } for a in alerts ] , headers = headers , tablefmt = obj [ 'output' ] ) )
Show raw data for alerts.