0

我正在尝试删除这样的用户配置文件:

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 参考的搜索。

4

1 回答 1

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

于 2015-12-08T15:31:43.243 回答