Search code examples
pythonibm-cloud-infrastructure

Softlayer API information needed on using SoftLayer_Ticket with subjectId


I have found an example on how to create a ticket via the Softlayer API:

And I have found the documentation on the SoftLayer_Ticket data type:

What I cannot find is a list of "internal identifiers" that the subjectId type can use. In the example above subjectId: 1121 creates a ticket for Hardware Firewall Question (ID 1121), but I do not know where to find the correct subjectId for other problems. Can somebody show me where to look?


Solution

  • The code to get the subjects IDs is in the same example:

    import SoftLayer
    from pprint import pprint as pp
    
    client = SoftLayer.Client()
    subjects = client['Ticket_Subject'].getAllObjects()
    pp(subjects)
    

    Here the documentation of the method:

    http://sldn.softlayer.com/reference/services/SoftLayer_Ticket_Subject http://sldn.softlayer.com/reference/services/SoftLayer_Ticket_Subject/getAllObjects

    Regards