AnsweredAssumed Answered

Correct syntax for GroupMigrationManager

Question asked by EAnderson_DHSGMO on Oct 6, 2020

Hello,


We recently upgraded our Enterprise environment to 10.8.1 and are looking forward to taking advantage of the GroupMigrationManager tools within the ArcGIS API for Python. 

 

However, the documentation linked above is lacking. I am unsure what the proper syntax would be to export and then import the group content EPK file. 

 

The following seems to work:

 

gis = GIS(PORTALURL,USERNAME,PASSWORD)

grp = gis.groups.get("<GROUPID>")
grpmgr = arcgis.gis.GroupMigrationManager(grp)
grpcnt = grpmgr.create()

 

This creates a new folder in my Content called "exports" and has an EPK item. However, there is no way to download this file through the UI. When I use the following to try and load this into a different 10.8.1 Portal, I get the error following:

 

gis = GIS(PORTALURL2,USERNAME,PASSWORD)

grp = gis.groups.get("<GROUPID>")
grpmgr = arcgis.gis.GroupMigrationManager(grp)
grpcnt = grpmgr.load(epk_file=grpcnt)

 

Traceback (most recent call last):
File "C:\AdminScripts\GroupMigration.py", line 9, in <module>
grpcnt = grpmgr.load(epk_item=grpcnt)
File "C:\....\__init__.py", line 1305, in load
assert isinstance(epk_item, Item)
AssertionError

 

Can anyone please help explain what the proper syntax is to export and then import these EPK files? I wish the documentation provided better examples.

 

Thank you in advance.

Outcomes