November 23, 2017
List roles.

The script retrieves all the roles in a brand account.
It displays the same result like in

Important manual pages

Author: SoftLayer Technologies, Inc. <>

import SoftLayer.API
import json

USERNAME = 'set me'
API_KEY = 'set me'

client = SoftLayer.create_client_from_env(username=USERNAME, api_key=API_KEY)

accountService = client['SoftLayer_Account']
objectMask = "mask[userCount]"

    result = accountService.getPermissionRoles(mask=objectMask)
    print(json.dumps(result, sort_keys=True, indent=2, separators=(',', ': ')))
except SoftLayer.SoftLayerAPIError as e:
    print("Unable to list the roles. "
          % (e.faultCode, e.faultString))


If this article contains any error, or leaves any of your questions unanswered, please help us out by opening up a github issue.
Open an issue