Search code examples
ibm-cloud-infrastructure

SoftLayer API - "Use password on file" option in Tickets?


I am trying to automate my team's processes, which involve cutting tickets to SoftLayer. When we cut tickets, we associate the affected device with the ticket, but we select the "Use password on file" option, rather than entering in the password for the device. I have looked through much of the SL API documentation and have not come across this as an option when using createStandardTicket.

Is "Use password on file" an option that may be specified anywhere in the createStandardTicket API method? If so, where? If not, would it be possible to build this attribute into the API?

Thanks!


Solution

  • Please try the following REST example:

    URL:

    https://[username]:[apikey]@api.softlayer.com/rest/v3/ SoftLayer_Ticket/createStandardTicket
    

    Method: POST

    Json Payload:

    {
        "parameters": [
            {
                "subjectId": 1522,
                "assignedUserId": 205831
            },
            "Ticket api test - it is using password on file",
            13548553,
            "UsePasswordOnFile",
            "",
            "",
            "",
            "VIRTUAL_GUEST"                     
        ]
    }
    

    Where:

    • Contents --> "Ticket api test - it is using password on file",
    • attachmentId --> 13548553
    • rootPassword -->"UsePasswordOnFile"

    • controlPanelPassword --> "",
    • accessPort --> ""
    • attachedFiles --> ""
    • attachmentType --> "VIRTUAL_GUEST"

    Reference: SoftLayer_Ticket/createStandardTicket

    Note: the order of parameters after setting of “templateObject” is very important.