Failed to add permission to a SoftLayer user ID

一世执手 提交于 2019-12-02 08:11:24

Please use “keyname” instead of “key”.

This is a Rest Example:

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

Method: POST

Json:

{
  "parameters": [
    {
      "keyName": "TICKET_VIEW"
    }
  ]
}

To get all available permissions, please review: SoftLayer_User_Customer_CustomerPermission_Permission::getAllObjects

Update 1:

If you want to use SoftLayer_User_Customer::addBulkPortalPermission, please try the following REST request:

URL:

https://[username]:[apikey]@api.softlayer.com/rest/v3/SoftLayer_User_Customer/[User_Id]/addBulkPortalPermission

Method: POST

Json Payload:

{
  "parameters": [
    [
      {
        "keyName": "TICKET_VIEW"
      }
    ]
  ]
}

Note: In this case, notice that the configuration has 2 "square bracket": ...": [[{"keyName":...

I hope them help you.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!