KB Article #182627

REST API: View the assigned Business Units for a Delegated Administrator with API v2.0

Problem

The API call GET /myself does not return any value for the businessUnits field even when the Delegated Administrator is part of one or more Business Units.


Example:


curl -k -u DELEGATED_ADMINISTRATOR:DELEGATED_ADMINISTRATOR_PASSWORD -X GET https://HOSTNAME:ADMINPORT/api/v2.0/myself?fields=businessUnits%2CloginName%2CroleName



Resolution

The assigned Business Units for any Administrator with "Delegated Administrator" Role can be viewed with the API call below:


curl -k -u MASTER_ADMINISTRATOR:ADMIN_PASSWORD -X GET https://HOSTNAME:ADMINPORT/api/v2.0/administrators/DELEGATED_ADMIN_NAME?fields=businessUnits%2CloginName%2CroleName



Note: These API calls return only the Login Name, Role, and Business Units for the given Administrator. To view all fields, remove ?fields=businessUnits%2CloginName%2CroleName from the URL part.


In the above command replace:


MASTER_ADMINISTRATOR:ADMIN_PASSWORD with the proper master admin credentials

DELEGATED_ADMIN_NAME with the Delegated Administrator name for which we want to check the assigned Business Units

HOSTNAME with the hotname or IP of SecureTransport

ADMINPORT with the port, on which the ST's admin service runs on