Select to view content in your preferred language

Can you use clone_items to move items from one portal to another?

3623
2
Jump to solution
04-09-2018 03:21 PM
JamesGustine
Regular Contributor

Will this work for moving items from one portal to another?  

arcgis.gis module — arcgis 1.4.0 documentation 

If not, is there a copy_items with a source and target?

Thanks!

0 Kudos
1 Solution

Accepted Solutions
by Anonymous User
Not applicable

The ago-clone-items repo is deprecated since the functionality was moved into the Python API.

You can use the Python API to deep clone items and their dependencies using "clone_items" like the following:

source_gis = arcgis.gis.GIS("https://arcgis.com","username","password")

target_gis = arcgis.gis.GIS("https://server.com/portal", "username","password")

item = source_gis.content.get("<item-id>")

target_gis.content.clone_items([item])

View solution in original post

2 Replies
DerekLaw
Esri Esteemed Contributor
0 Kudos
by Anonymous User
Not applicable

The ago-clone-items repo is deprecated since the functionality was moved into the Python API.

You can use the Python API to deep clone items and their dependencies using "clone_items" like the following:

source_gis = arcgis.gis.GIS("https://arcgis.com","username","password")

target_gis = arcgis.gis.GIS("https://server.com/portal", "username","password")

item = source_gis.content.get("<item-id>")

target_gis.content.clone_items([item])