I've tried scripting the creation of groups by referring to this documentation (arcgis.gis module | ArcGIS API for Python)
Unfortunately, it seems like the documentation is incomplete and scripting seems impossible for the type of groups I'm trying to create where settings have to be done at the point of creation. e.g.
Not so critical are the group membership settings which can be updated (using scripts?) after the groups are created.
I do not know what the valid arguments are to certain parameters. Has anyone figured out how the parameters map to the configurations offered in Portal? If not, how do I find the information? Feeling somewhat let down knowing that the method with the likely implementation is there but it cannot be used because of the documentation.
Solved! Go to Solution.
Hi @JosephSia2
The API allows for these settings when creating a Group using Python from the documentation in the link arcgis.gis module | ArcGIS API for Python, see example below, the last two parameters handle the Administrative and Shared Update capabilities (leaving_disallowed, and users_update_items respectively)
from arcgis import GIS
agol = GIS("home")
grp_item = agol.groups.create(
title="My_Group",
tags="tag1,tag2,tag3",
description="This is the description for a test group for our fake project",
snippet="To summarize this is a test group",
access="private", # private, public, org
is_invitation_only = True,
sort_field = "owner", # title, owner, modified, numviews
sort_order = "asc", # asc or desc
leaving_disallowed = True, # sets as Administrative
users_update_items = True # set to Shared Update
)
Hi @JosephSia2
The API allows for these settings when creating a Group using Python from the documentation in the link arcgis.gis module | ArcGIS API for Python, see example below, the last two parameters handle the Administrative and Shared Update capabilities (leaving_disallowed, and users_update_items respectively)
from arcgis import GIS
agol = GIS("home")
grp_item = agol.groups.create(
title="My_Group",
tags="tag1,tag2,tag3",
description="This is the description for a test group for our fake project",
snippet="To summarize this is a test group",
access="private", # private, public, org
is_invitation_only = True,
sort_field = "owner", # title, owner, modified, numviews
sort_order = "asc", # asc or desc
leaving_disallowed = True, # sets as Administrative
users_update_items = True # set to Shared Update
)
Have manually created the groups and yet to test this but it looks about right.
Will test it over the weekend.
Many thanks. You've likely saved my automation.