Search code examples
phpapisoapibm-cloud-infrastructure

Is it possible to add a ticket response as a specific user via the SoftLayer API using the PHP SOAP client?


I'm attempting to use the SoftLayer API (via the PHP client) to add an update to an existing ticket, as a specific user under our main account (a sibling to our API user).

What I'm trying to achieve is that as the API user, I call SoftLayer_Ticket::addUpdate, passing a SoftLayer_Ticket_Update object that looks similar to:

{
    editorID: user1_id_here,
    editorType: "USER",
    entry: 'My update here'
}

I have user1's ID, however when I pass it in the SoftLayer_Ticket_Update object, the update is still attached as the API user:

{
    createDate:"2016-05-17T08:24:50-07:00"
    editorId:api_users_id
    editorType:"USER"
    entry:"Another update for our glorious leader..."
    id:#########
    ticketId:########
}

Snippet of the ticket update code:

    $slClient = \SoftLayer_client::getClient("Ticket", $ticketID);

    $ticketUpdateObj = new \stdClass();
    $ticketUpdateObj->entry = $update;
    $ticketUpdateObj->editorId = ######;
    $ticketUpdateObj->editor = ######;
    $ticketUpdateObj->editorType = "USER";

    $result = $slClient->addUpdate($ticketUpdateObj);
    ...
    (do other stuff here)

Is there any way to do this with the SoftLayer API? Or is the issue stemming from permissions given to the API user, or that I'm attempting to add the update as a sibling to the API user? Any help would be appreciated!

Our platform is older, so we are using an older version of the SoftLayer PHP SOAP client (guessing circa 2010/early 2011).

Thank you in advance!


Solution

  • Sorry, that is not possbile you cannot set the editorId, this value is set by the system with the userID of the user who updated the ticket.

    Regards