Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/php/263.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
是否可以使用PHP SOAP客户端通过SoftLayer API作为特定用户添加票证响应?_Php_Api_Soap_Ibm Cloud Infrastructure - Fatal编程技术网

是否可以使用PHP SOAP客户端通过SoftLayer API作为特定用户添加票证响应?

是否可以使用PHP SOAP客户端通过SoftLayer API作为特定用户添加票证响应?,php,api,soap,ibm-cloud-infrastructure,Php,Api,Soap,Ibm Cloud Infrastructure,我正在尝试使用SoftLayer API(通过PHP客户端)向现有票证添加更新,作为我们主帐户下的特定用户(API用户的兄弟) 我试图实现的是,作为API用户,我调用SoftLayer\u Ticket::addUpdate,传递一个SoftLayer\u Ticket\u Update对象,该对象看起来类似于: { editorID: user1_id_here, editorType: "USER", entry: 'My update here' } 我有user

我正在尝试使用SoftLayer API(通过PHP客户端)向现有票证添加更新,作为我们主帐户下的特定用户(API用户的兄弟)

我试图实现的是,作为API用户,我调用
SoftLayer\u Ticket::addUpdate
,传递一个
SoftLayer\u Ticket\u Update
对象,该对象看起来类似于:

{
    editorID: user1_id_here,
    editorType: "USER",
    entry: 'My update here'
}
我有
user1
的ID,但是当我在
SoftLayer\u Ticket\u Update
对象中传递它时,更新仍然作为API用户附加:

{
    createDate:"2016-05-17T08:24:50-07:00"
    editorId:api_users_id
    editorType:"USER"
    entry:"Another update for our glorious leader..."
    id:#########
    ticketId:########
}
票证更新代码片段:

    $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)
使用SoftLayer API有什么方法可以做到这一点吗?或者问题源于授予API用户的权限,或者我正试图将更新添加为API用户的同级?任何帮助都将不胜感激

我们的平台比较旧,所以我们使用的是较旧版本的SoftLayer PHP SOAP客户端(估计大约在2010/2011年初)


提前谢谢你

抱歉,这是不可能的。您无法设置editorId,此值由系统使用更新票证的用户的userID设置


关于

对不起,这是不可能的。您无法设置editorId,此值由系统使用更新票证的用户的userID设置


问候

嗨,尼尔森,非常感谢您的回复!我很好奇,是否有任何方法可以使用SL API作为特定用户添加票据回复?或者每个想要这样做的用户都需要自己的API密钥吗?不,这是不可能的,如果你想作为一个特定的用户回答,你需要使用该用户(我的意思是你需要该用户的用户名和API密钥,并使用该用户更新该票据)嗨,Nelson,非常感谢你的回复!我很好奇,是否有任何方法可以使用SL API作为特定用户添加票据回复?或者每个想这样做的用户都需要自己的API密钥吗?不,这是不可能的,如果你想作为一个特定的用户回答,你需要使用该用户(我的意思是你需要该用户的用户名和API密钥,并使用该用户更新该票据)