November 23, 2017
Get the planned events.

Important manual pages:

Author: SoftLayer Technologies, Inc. <>

import SoftLayer.API
import json
import datetime

USERNAME = 'set me'
API_KEY = 'set me'

# Gets the current date.
now =
now = now.strftime("%m/%d/%Y")

# Creates the API service.
client = SoftLayer.create_client_from_env(username=USERNAME, api_key=API_KEY)
notificationEventService = client['SoftLayer_Notification_Occurrence_Event']

# Declares a object mask to get more information about the events.
objectMask = "mask[updateCount,statusCode,notificationOccurrenceEventType[keyName],impactedUsers[user[id],acknowledgedFlag]]"

# Declares a object filter to get the planned events whose status is active and the end date of the event is greater than today.
objectFilter = { "endDate" : {"operation" : "greaterThanDate", "options":  [{"name": "date","value": [now]}]} , "notificationOccurrenceEventType" : {"keyName" : {"operation" : "PLANNED"}},"statusCode": {"keyName" : {"operation": "in","options":[{"name": "data", "value": ["ACTIVE"]}]}}}

    events = notificationEventService.getAllObjects(mask=objectMask, filter=objectFilter)
    print(json.dumps(events, sort_keys=True, indent=2, separators=(',', ': ')))
except SoftLayer.SoftLayerAPIError as e:
    print("Unable to retrieve the events. " % (e.faultCode, e.faultString))


If this article contains any error, or leaves any of your questions unanswered, please help us out by opening up a github issue.
Open an issue