You could use an object mask to retrieve this kind of information:
mask[allowedHardware[allowedHost[credential]],allowedVirtualGuests[allowedHost[credential]]]
This would be the usage on a REST request:
https://$username:$apiKey@api.softlayer.com/rest/v3/SoftLayer_Network_Storage_Iscsi/$iscsiId/getObject.json?objectMask=mask[allowedHardware[allowedHost[credential]],allowedVirtualGuests[allowedHost[credential]]]
And here a sample using Python client:
"""
Get credentials for a authorized hosts of a SoftLayer_Network_Storage_Iscsi
Important manual pages
http://sldn.softlayer.com/reference/services/SoftLayer_Network_Storage_Iscsi
License: http://sldn.softlayer.com/article/License
Author: SoftLayer Technologies, Inc. <sldn@softlayer.com>
"""
import SoftLayer
import json
USERNAME = 'set me'
API_KEY = 'set me'
iscsiStorageId = 1234567
client = SoftLayer.create_client_from_env(username=USERNAME, api_key=API_KEY)
networkStorageIscsiService = client['SoftLayer_Network_Storage_Iscsi']
objectMask = 'mask[allowedHardware[allowedHost[credential]],allowedVirtualGuests[allowedHost[credential]]]'
try:
iscsiStorage = networkStorageIscsiService.getObject(mask=objectMask, id=iscsiStorageId)
print(json.dumps(iscsiStorage, sort_keys=True, indent=2, separators=(',', ': ')))
except SoftLayer.SoftLayerAPIError as e:
print("Unable to retrieve the Network Storage Iscsi. faultCode=%s, faultString=%s"
% (e.faultCode, e.faultString))
The next link might provide you further information:
https://sldn.softlayer.com/article/object-masks