Failed to add permission to a SoftLayer user ID

后端 未结 1 554
梦毁少年i
梦毁少年i 2021-01-26 10:20
curl -D - -X POST -d @permissionSLUser.in.json -o \"permissionSLUser.out.json\"
\"https://someuser:somepassword@api.softlayer.com/rest/v3/SoftLayer_User_Customer/1234/ad         


        
相关标签:
1条回答
  • 2021-01-26 10:52

    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.

    0 讨论(0)
提交回复
热议问题