Skip to content

Instantly share code, notes, and snippets.

@underscorephil
Created September 9, 2013 15:35
Show Gist options
  • Save underscorephil/6497304 to your computer and use it in GitHub Desktop.
Save underscorephil/6497304 to your computer and use it in GitHub Desktop.
import SoftLayer.API
from pprint import pprint as pp
apiUsername = ''
apiKey = ''
client = SoftLayer.Client(
username=apiUsername,
api_key=apiKey,
)
object_mask = "mask.status"
tickets = client['Account'].getTickets(mask=object_mask)
for i in xrange(len(tickets) - 1, -1, -1):
ticket = tickets[i]
if 'Open' not in ticket['status']['name']:
del tickets[i]
pp(tickets)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment