I have a map in ArcGIS pro that I can upload to ArcGIS online using the "Share as Web Map" dialog, which gives me various options for how I want the data copied (in my case it creates an ArcGIS Online web map and a feature layer). I'd like to automate that in Python but having some trouble figuring out how to do it.
This question was asked previously but the answer seems to imply that I have to build the web map from scratch using the ArcGIS Api for Python WebMap object, then call the save() method. Even if I do that, I suspect that does not handle all of the options available on the ArcGIS Pro Share as Web Map dialog.
I was hoping I could do it with more simply with arcpy objects. Has anybody been able to do this? I'm on ArcGIS Pro 2.9.5
Solved! Go to Solution.
The Sharing team has this as an item to be worked on in a future release. There is no specific timeline at this point but if you want to track it you can always create an ArcGIS Idea with the sharing and publishing tag and they can provide updates there.
thanks,
Andrew
Hello @DonMorrison1, have you seen the following page concerning arcpy.sharing?
FeatureSharingDraft—ArcGIS Pro | Documentation
It contains some code samples used to share web layers using this module, might be a good start. I hope that helps!
Right - I have read through that and have coded it in Python but sharing the web layers is not what I need to do. I need to upload the complete map to ArcGIS online - just like it is done with "Share as Web Map"
Those tools don't exist in ArcToolbox, so they won't be available in arcpy but through the various objects and functions in the Sharing portion of the cim as @JohnHughson pointed out.
The Sharing team has this as an item to be worked on in a future release. There is no specific timeline at this point but if you want to track it you can always create an ArcGIS Idea with the sharing and publishing tag and they can provide updates there.
thanks,
Andrew
I just opened an ArcGIS idea on this