November 23, 2017
Get owned account

The script retrieves all the owned accounts for an arbitrary brand,
the script makes a call to getOwnedBrands() method to retrieve
the brands where the account belongs, then it calls the getAllOwnedAccounts()
method to get the owned accounts for every brand.

Important manual pages

Author: SoftLayer Technologies, Inc. <>
import SoftLayer.API

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

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

accountService = client['SoftLayer_Account']
brandService = client['SoftLayer_Brand']

# Getting the brands
brands = accountService.getOwnedBrands()
for brand in brands:
    brandId = brand['id']
    # Getting the owned Accounts
    accounts = brandService.getAllOwnedAccounts(id=brandId)
    for account in accounts: