October 2017
Intermediate to advanced
382 pages
11h 26m
English
Working with groups is a very similar experience to content and users; perform a query to get the objects you are looking for, then read or manipulate them. Let's look at some groups in my Portal and see who owns and administers them:
from arcgis.gis import GIS
gis = GIS("https://www.masteringageadmin.com/portal",
"portaladmin", "somepass")
After we create a connection to our GIS, we will search for all groups owned by the portaladmin:
groups = gis.groups.search('owner:portaladmin')
Next, we will iterate through groups, printing out information about the group members:
for group in groups: print(group.title) mems = group.get_members() print("\"tOwner: {0}".format(mems['owner'])) print("\"tAdmins: {0}".format(", ".join(mems['admins']))) ...Read now
Unlock full access