Skip to content

API Documentation

brokensound77 edited this page Mar 24, 2017 · 5 revisions

Documentation and detailed usage for the API.

Importing:

from alapi import alapi

get_event(event_id, customer_id, username, password[, to_json=False])

Retrieve a single event object from Alert Logic

event_id: event ID to be retrieved
customer_id: customer ID for whom the even belongs to
username: to log into Alert Logic UI
password: Alert Logic UI
to_json: Rather than returning an Event object, a JSON structure is returned instead

returns: an Event object (see Event Object)

event = alapi.get_event(event_id, customer_id, username, password)
print event

# alternatively as json
print event.to_json()

or

event_json = alapi.get_event(event_id, customer_id, username, password, to_json=True)
print event_json

get_events(event_id, customer_id, username, password[, to_json=False])

Retrieve multiple single event object from Alert Logic

event_id: event ID to be retrieved
customer_id: customer ID for whom the even belongs to
username: to log into Alert Logic UI
password: Alert Logic UI
to_json: Rather than returning a dictionary of Event objects, a dictionary of JSON structured Events is returned instead

returns: a dictionary of Event object (see Event Object)


get_incident(incident_id, customer_id, api_key, username, password[, to_json=False])

Retrieve a single Incident object from Alert Logic

incident_id: incident ID to be retrieved
customer_id: customer ID for whom the even belongs to
api_key: API key for customer
username: to log into Alert Logic UI
password: Alert Logic UI
to_json: Rather than returning an Incident object, a JSON structure is returned instead

returns: an Incident object (see Incident Object)


get_incidents(incident_id, customer_id, api_key, username, password[, to_json=False])

Retrieve multiple Incident objects from Alert Logic

incident_id: incident ID to be retrieved
customer_id: customer ID for whom the even belongs to
api_key: API key for customer
username: to log into Alert Logic UI
password: Alert Logic UI
to_json: Rather than returning a dictionary of Incident objects, a dictionary of JSON structured Incidents is returned instead

returns: a dictionary of Incident object (see Incident Object)