Select to view content in your preferred language

Correct syntax for GroupMigrationManager

10-06-2020 06:23 AM
Occasional Contributor


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:


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:


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

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

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.

0 Kudos
1 Reply
Regular Contributor

Yes, you can download on the following url:

avec EPK_ITEM_ID, l'id de l'item .epk.
Hope that help.
On my side I cannot make the import works using ArcGIS for Python I face another issue.
I have to do it manually on the REST API:
Hope that helps
0 Kudos