Skip to content

v1api (old API)

brokensound77 edited this page Jan 18, 2017 · 1 revision

##Using the old API

(now v1_api)

##Simple usage:

from alapi.v1_api import AlPseudoAPI

AlertLogic = AlPseudoAPI(username, password)

####Getting Events To get a single event

result = AlertLogic.get_event(customer_id, incident_id)

Getting multiple events

event_list = ['12345', '67890', '13579', '24680']  # list of event IDs
results = AlertLogic.get_events(customer_id, event_list)

If you have and API key, you can use the built in method to populate the events list

events = AlertLogic.get_events_from_incident(customer_id, incident_id, api_key)
results = AlertLogic.get_events(customer_id, events)

For a summary of the events passed, you can set summary=True

results = AlertLogic.get_events(customer_id, events, summary=True)
Clone this wiki locally