2015-12-08 74 views
0

我試圖刪除這樣的用戶配置文件:SoftLayer的REST API,以刪除用戶配置文件

curl -X DELETE -k -n "https://api.softlayer.com/rest/v3/SoftLayer_User_Customer/406673.json" 

{"error":"Function (\"deleteObject\") is not a valid method for this service.","code":"SoftLayer_Exception_Public"} 

如何刪除/刪除用戶配置文件?當然希望返回API參考的搜索。

回答

0

要刪除用戶,請嘗試以下REST請求:

https://[username]:[apikey]@api.softlayer.com/rest/v3/SoftLayer_User_Customer/[user_id]/editObject 

方法:POST 的Json有效載荷:

{ 
    "parameters": [ 
    { 
     "userStatusId": 1021 
    } 
    ] 
} 

該用戶的狀態可以是:

1001 = Active; 
1002 = Disabled; 
1003 = Inactive; 
1021 = cancel_pending; 
1022 = VPN Only 

參考文獻: http://sldn.softlayer.com/reference/services/SoftLayer_User_Customer/editObject

+0

謝謝。這工作。 –

+0

不客氣:) – mcruz

相關問題