softlayer API return Permission denied to getRever

2019-09-14 19:45发布

问题:

I was Call getReverseDomainRecords of subnet but ruturn "Permission denied to getReverseDomainRecords. ", which permissions are need for this user for call api?

(com.softlayer.api.ApiException$Internal: Permission denied to getReverseDomainRecords.)

回答1:

You need to add the following permission to the user "Manage DNS, Reverse DNS and WHOIS".

From Portal, please go to: Users> select the user>Portal Permissions> services.

To add permissions to a user via API, please review: Failed to add permission to a SoftLayer user ID

In our case the following request helps us to add "Manage DNS, Reverse DNS and WHOIS" permission

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

Method: POST

Json payload:

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

Regards.