Select to view content in your preferred language

How to create a ArcGIS online group with some specific settings using ArcGIS python api?

784
0
10-14-2023 04:23 AM
SriyankarDandapat
New Contributor

Those line of code create a new group with some specific properties and settings. But its not work for display_settings properties and Group membership settings (Who can view this group?) I set as "only group member". Please let me know if any ArcGIS python api reference sample code will help to be able to set the settings.

from arcgis.gis import GIS
gis = GIS("https://www.arcgis.com", "user_name", "password")
group_properties = {
"title": "My_Group",
"tags": "GIS",
"description": "Only for testing",
"access": "org",  # Set the access level (org, public, private)
"display_settings": "apps",
"is_invitation_only": 'True',
"leaving_disallowed": 'True'
}
new_group = gis.groups.create(**group_properties)
new_group.protected = True
new_group.update()
Tags (1)
0 Kudos
0 Replies