API version 2.3.0
The Item object copy() and copy_item() both create a shallow copy of a feature service. If I edit the data in the copy it is reflected in the original.
The Item object copy_feature_layer_collection() creates a deep copy but does not include data and only copies the schema.
When I attempt to use clone_items() from the manager I get a consistent error.
from arcgis.gis import GIS
## Access AGOL
agol = GIS("home")
## get item object to clone
item = agol.content.get("ITEM_ID")
## use the ContentManager clone_items()
new_item = agol.content.clone_items(
items = [item]
)
print(new_item)
The error...
arcgis._impl.common._clone._ItemCreateException: ("Failed to create Feature Service MY_NEW_FEATURE_SERVICE: A general exception was raised: HTTPSConnectionPool(host='services-eu1.arcgis.com', port=443): Max retries exceeded with url: /xImpnbbhc3YDkwTJ/arcgis/rest/services/County_Boundaries_d56b3/FeatureServer/0/applyEdits (Caused by ResponseError('too many 413 error responses'))", <Item title:"MY_NEW_FEATURE_SERVICE" type:Feature Layer Collection owner:FinalDraftMapping>)
Any help greatly appreciated. How do I make a deep copy of a feature service within the same ArcGIS Online instance. Is the only way to use copy_feature_layer_collection() and then append in the data from the original feature service?
Cheers,
Glen