I'd like to use the ArcGIS API for Python to identify all of the groups in the organization that have Shared Update capabilities. The API Reference page says there is a group property of "users_update_items" but it is not recognized as a property when trying to query for it in a script. I've seen reference of alternate query syntax for querying other properties (like isInvitation in place of is_invitation_only) but cannot find any documentation on how to query for these "special" groups. Has anybody else had any luck?
Solved! Go to Solution.
https://developers.arcgis.com/rest/users-groups-and-items/common-parameters.htm
You can get the group and then check the group capabilities. If the updateitemcontrol capability is returned, it's shared update. If it's not returned, it's not. You'll need to handle it this way - i.e. get capabilities, then if it exists. Not that it's false as it won't be there.
gm=arcgis.gis.GroupManager(myGIS)
myGroup=gm.get("groupID")
myGroup.capabilites
As @ChristopherCounsell notes, what you are looking for is a group's capabilities. If you set the parameter users_update_items=True when you create a group, then 'updateitemcontrol' is added to the group's capabilities.
There are other capabilities a group can have, such as "distributed", so you should not rely solely on testing that capabilities is not null. I would recommend explicitly testing that 'updateitemcontrol' is in the group's list of capabilities.
You can specify a capability as part of your group search query, so one way to retrieve a list of shared update groups is:
shared_udpate_groups = gis.groups.search(
# A shared update group has 'updateitemcontrol' as one of its capabilites.
query = 'capabilities:updateitemcontrol',
# 10,000 appears to be a hard limit.
# If more than 10,000 might be returned, then split up your query and aggregate the results.
max_groups = 10000
)
https://developers.arcgis.com/rest/users-groups-and-items/common-parameters.htm
You can get the group and then check the group capabilities. If the updateitemcontrol capability is returned, it's shared update. If it's not returned, it's not. You'll need to handle it this way - i.e. get capabilities, then if it exists. Not that it's false as it won't be there.
gm=arcgis.gis.GroupManager(myGIS)
myGroup=gm.get("groupID")
myGroup.capabilites
As @ChristopherCounsell notes, what you are looking for is a group's capabilities. If you set the parameter users_update_items=True when you create a group, then 'updateitemcontrol' is added to the group's capabilities.
There are other capabilities a group can have, such as "distributed", so you should not rely solely on testing that capabilities is not null. I would recommend explicitly testing that 'updateitemcontrol' is in the group's list of capabilities.
You can specify a capability as part of your group search query, so one way to retrieve a list of shared update groups is:
shared_udpate_groups = gis.groups.search(
# A shared update group has 'updateitemcontrol' as one of its capabilites.
query = 'capabilities:updateitemcontrol',
# 10,000 appears to be a hard limit.
# If more than 10,000 might be returned, then split up your query and aggregate the results.
max_groups = 10000
)
Thanks gentlemen! That's exactly what I was looking for!