AnsweredAssumed Answered

How to publish a feature service to ArcGIS Online from an mxd USING PYTHON?

Question asked by benvousaime on Mar 25, 2013
Latest reply on Sep 13, 2018 by frederickkellner_usfs
Hi All,

I would like to automate publishing feature services - from an mxd using Python to my AG Online account.

I did this successfully manually using the menu: Share as -> Service, Publish a service - Feature Access Capabilities etc...

Using Python, I managed to publish the service definition file on AG Online using:
arcpy.mapping.CreateMapSDDraft()
arcpy.mapping.AnalyzeForSD()
arcpy.StageService_server()
arcpy.UploadServiceDefinition_server()

But I could not find a way to publish a feature service to AG Online! I must be missing something. Any help would be really appreciated.

Thanks in advance!

Outcomes