Select to view content in your preferred language

Ability to export report of all groups, group members, and group items

382
0
12-14-2023 06:52 AM
Status: Open
AndrewRudin1
Occasional Contributor II

Our ArcGIS Online Org contains 1,000 groups, 2,500 users, and 30,000 items.  I am trying to build BI reports on the usage & access to data within our org.  The scheduled reports for items and users are great for understanding what's available and who owns them.  However, what's missing is who has access to what, and ArcGIS Online groups are the relational key between users and items they might use. It would be helpful to have an additional report that provides this information in bulk.

 

How would I do this today?

I've looked at the REST documentation, and unfortunately I'd have to make thousands of calls to get membership and contents of each group.

First I'd have to query the endpoint https://org.arcgis.com/sharing/rest/community/groups to retrieve an array of all the groups and their basic properties.  These results don't contain info about user that are members or items shared to the group.  Because of that I need to call two separate endpoints for each group.

For the member users, I need to loop over each group and query https://org.arcgis.com/sharing/rest/community/groups/<groupid>/userList .  Then I'll need to re-query with pagination if the user count of a group is above 100.

For the items, I need to loop over each group and query https://org.arcgis.com/sharing/rest/content/groups/<groupid>  .  Then I'll also need to re-query with pagination if item count is above 100.

That's 2000+ HTTP calls to the REST API, so a lot of back and forth latency and load on the API. 

 

What would the solution look like?

I think it would be better to have a process within ArcGIS Online that can quickly extract this data in bulk and export to some kind of report.  I'd like to see the report contain some info about each group (ID, Title, isInvitationOnly, Owner, tags, created, modified, access, protected, autoJoin, isOpenData, is it a shared update group, etc.).  Then it would also have a list of usernames that are members of each group, preferable also with each user's member role in the group.  Finally the report would also have a list of the Item ID's for items shared to the group.

When combined with the existing item and user reports in another tool like Excel or Power BI, this would be enough to analyze the relationships.

Although all the existing reports are provided in CSV format, for this kind of report JSON seems better equipped to handle the array of usernames and item id's.  I'm not very familiar with CSV standards, so maybe there is a way to nest a comma separated list of usernames or  item id's inside using double quotes around the list.  

Alternatively maybe it needs to be 3 different CSV reports:  First has one row per group with the group's properties.  Second is a report of usernames and group Id's they are members of, and the users member role in the group. Third is a report of item id's and the groups they are assigned to.