<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: How to publish a feature service to ArcGIS Online from an mxd USING PYTHON? in ArcGIS Online Questions</title>
    <link>https://community.esri.com/t5/arcgis-online-questions/how-to-publish-a-feature-service-to-arcgis-online/m-p/130442#M6316</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I tried the approach you suggested but was unable to successfully publish the service as a scheduled task (or manually while not logged in through Desktop). I'm very interested in any other suggestions you or other folks may have that would enable running the update FS as a scheduled task.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks!&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Erik&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 12 Sep 2013 15:09:47 GMT</pubDate>
    <dc:creator>ErikEndrulat</dc:creator>
    <dc:date>2013-09-12T15:09:47Z</dc:date>
    <item>
      <title>How to publish a feature service to ArcGIS Online from an mxd USING PYTHON?</title>
      <link>https://community.esri.com/t5/arcgis-online-questions/how-to-publish-a-feature-service-to-arcgis-online/m-p/130425#M6299</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi All, &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I would like to automate publishing feature services - from an mxd using Python to my AG Online account.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I did this successfully manually using the menu: Share as -&amp;gt; Service, Publish a service - Feature Access Capabilities etc...&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Using Python, I managed to publish the &lt;/SPAN&gt;&lt;STRONG&gt;service definition file&lt;/STRONG&gt;&lt;SPAN&gt; on AG Online using:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;arcpy.mapping.CreateMapSDDraft()&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;arcpy.mapping.AnalyzeForSD()&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;arcpy.StageService_server()&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;arcpy.UploadServiceDefinition_server()&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;But I could not find a way to publish a &lt;/SPAN&gt;&lt;STRONG&gt;feature service&lt;/STRONG&gt;&lt;SPAN&gt; to AG Online! I must be missing something. Any help would be really appreciated.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks in advance!&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 26 Mar 2013 02:06:00 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-online-questions/how-to-publish-a-feature-service-to-arcgis-online/m-p/130425#M6299</guid>
      <dc:creator>BenoitMetzger</dc:creator>
      <dc:date>2013-03-26T02:06:00Z</dc:date>
    </item>
    <item>
      <title>Re: How to publish a feature service to ArcGIS Online from an mxd USING PYTHON?</title>
      <link>https://community.esri.com/t5/arcgis-online-questions/how-to-publish-a-feature-service-to-arcgis-online/m-p/130426#M6300</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;The following code will publish a hosted feature service. Change the following:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;- Line 5, the workspace&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;- Line 11, the name you want to give the service&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;- Line 58, the username and password to your AGO account&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="plain" name="code"&gt;import arcpy import xml.dom.minidom as DOM&amp;nbsp; import os&amp;nbsp; workspace = 'C:/Temp/hosted publishing/'&amp;nbsp; # Reference map document for CreateSDDraft function. mapDoc = arcpy.mapping.MapDocument(r'C:\Temp\betty4.mxd') # Create service and sddraft variables for CreateSDDraft function. sddraft = workspace + 'HostedMS.sddraft' service = 'FeatureService' arcpy.mapping.CreateMapSDDraft(mapDoc, sddraft, service, 'MY_HOSTED_SERVICES', summary="test", tags='test') con = 'My Hosted Services' sd = workspace + service + '.sd'&amp;nbsp; doc = DOM.parse(sddraft)&amp;nbsp; # Read the sddraft xml. doc = DOM.parse(sddraft) # Change service from map service to feature service typeNames = doc.getElementsByTagName('TypeName') for typeName in typeNames: &amp;nbsp;&amp;nbsp;&amp;nbsp; # Get the TypeName we want to disable. &amp;nbsp;&amp;nbsp;&amp;nbsp; if typeName.firstChild.data == "MapServer": &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; typeName.firstChild.data = "FeatureServer"&amp;nbsp; #Turn off caching configProps = doc.getElementsByTagName('ConfigurationProperties')[0] propArray = configProps.firstChild propSets = propArray.childNodes for propSet in propSets: &amp;nbsp;&amp;nbsp;&amp;nbsp; keyValues = propSet.childNodes &amp;nbsp;&amp;nbsp;&amp;nbsp; for keyValue in keyValues: &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if keyValue.tagName == 'Key': &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if keyValue.firstChild.data == "isCached": &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; # turn on caching &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; keyValue.nextSibling.firstChild.data = "false"&amp;nbsp; #Turn on feature access capabilities configProps = doc.getElementsByTagName('Info')[0] propArray = configProps.firstChild propSets = propArray.childNodes for propSet in propSets: &amp;nbsp;&amp;nbsp;&amp;nbsp; keyValues = propSet.childNodes &amp;nbsp;&amp;nbsp;&amp;nbsp; for keyValue in keyValues: &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if keyValue.tagName == 'Key': &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if keyValue.firstChild.data == "WebCapabilities": &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; # turn on caching &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; keyValue.nextSibling.firstChild.data = "Query,Create,Update,Delete,Uploads,Editing"&amp;nbsp; outXml = workspace + 'HostedMSNew.sddraft'&amp;nbsp; f = open(outXml, 'w')&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; doc.writexml( f )&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; f.close() analysis = arcpy.mapping.AnalyzeForSD(outXml) #print analysis #arcpy.SignOutFromPortal_server() arcpy.SignInToPortal_server("username","password","http://www.arcgis.com/") arcpy.StageService_server(outXml, sd) arcpy.UploadServiceDefinition_server(sd, con)&lt;/PRE&gt;&lt;DIV style="display:none;"&gt; &lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 29 Mar 2013 20:51:20 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-online-questions/how-to-publish-a-feature-service-to-arcgis-online/m-p/130426#M6300</guid>
      <dc:creator>JeffMoulds</dc:creator>
      <dc:date>2013-03-29T20:51:20Z</dc:date>
    </item>
    <item>
      <title>Re: How to publish a feature service to ArcGIS Online from an mxd USING PYTHON?</title>
      <link>https://community.esri.com/t5/arcgis-online-questions/how-to-publish-a-feature-service-to-arcgis-online/m-p/130427#M6301</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;This worked great for me!&amp;nbsp; You saved me a bunch of time. Thanks.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Now, I'm just wondering if anyone knows how to set the sharing during publishing using python.&amp;nbsp; I can see references to it in the documentation for UploadServiceDefinition_server, but I cannot figure out the syntax when it is the only optional setting you need.&amp;nbsp; And, does it work in AGOL?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Mary Ellen&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 03 Apr 2013 20:18:54 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-online-questions/how-to-publish-a-feature-service-to-arcgis-online/m-p/130427#M6301</guid>
      <dc:creator>MaryEllen_Perko</dc:creator>
      <dc:date>2013-04-03T20:18:54Z</dc:date>
    </item>
    <item>
      <title>Re: How to publish a feature service to ArcGIS Online from an mxd USING PYTHON?</title>
      <link>https://community.esri.com/t5/arcgis-online-questions/how-to-publish-a-feature-service-to-arcgis-online/m-p/130428#M6302</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi Jeff, &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;thanks for your help, I will give that a go... but from what i read it seems to be working &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Mary Helen, not too sure if thsi is what you want... here is a line i wrote which worked a little while ago (it was sharing the service on AGOL from memory):&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;arcpy.UploadServiceDefinition_server("C:\\...", "My Hosted Services", '', '', "NEW", "folder", "STARTED","OVERRIDE_DEFINITION", "&lt;/SPAN&gt;&lt;STRONG&gt;SHARE_ONLINE&lt;/STRONG&gt;&lt;SPAN&gt;","PRIVATE", "NO_SHARE_ORGANIZATION", "")&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Cheers.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 04 Apr 2013 23:28:42 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-online-questions/how-to-publish-a-feature-service-to-arcgis-online/m-p/130428#M6302</guid>
      <dc:creator>BenoitMetzger</dc:creator>
      <dc:date>2013-04-04T23:28:42Z</dc:date>
    </item>
    <item>
      <title>Re: How to publish a feature service to ArcGIS Online from an mxd USING PYTHON?</title>
      <link>https://community.esri.com/t5/arcgis-online-questions/how-to-publish-a-feature-service-to-arcgis-online/m-p/130429#M6303</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi, I have manually created/published the ArcGIS online feature service from arcmap as a one time activity.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;The data in the mxd will keep on changing and I have updated the data in the mxd.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Since the data is changing, each time I will have to update the already published feature service. Manually we can publishing the service and select overwrite existing service. The same I want to automatize through python script. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;As the script for creating new feature service and also sharing the feature service was provided in the thread, can you please urgently help me by providing the python script for updating the data of the existing feature service. We do not have to change service definition of the already published feature service. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Urgent help would be appreciated.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks and regards,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Kaushal Shah.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 11 Apr 2013 13:36:16 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-online-questions/how-to-publish-a-feature-service-to-arcgis-online/m-p/130429#M6303</guid>
      <dc:creator>KaushalShah</dc:creator>
      <dc:date>2013-04-11T13:36:16Z</dc:date>
    </item>
    <item>
      <title>Re: How to publish a feature service to ArcGIS Online from an mxd USING PYTHON?</title>
      <link>https://community.esri.com/t5/arcgis-online-questions/how-to-publish-a-feature-service-to-arcgis-online/m-p/130430#M6304</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Add the following 2 pieces into Jeff's code and it'll allow you to use UploadService (after staging of course) on an existing service (because it overwrites the service).&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;typeReplace = 'esriServiceDefinitionType_Replacement'
statePublished = 'esriSDState_Published'
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 
myTagsType = doc.getElementsByTagName('Type')
for myTagType in myTagsType:
&amp;nbsp;&amp;nbsp;&amp;nbsp; if myTagType.parentNode.tagName == 'SVCManifest':
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if myTagType.hasChildNodes():
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; myTagType.firstChild.data = typeReplace

myTagsState = doc.getElementsByTagName('State')
for myTagState in myTagsState:
&amp;nbsp;&amp;nbsp;&amp;nbsp; if myTagState.parentNode.tagName == 'SVCManifest':
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if myTagState.hasChildNodes():
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; myTagState.firstChild.data = statePublished&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 07:20:23 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-online-questions/how-to-publish-a-feature-service-to-arcgis-online/m-p/130430#M6304</guid>
      <dc:creator>KevinHibma</dc:creator>
      <dc:date>2021-12-11T07:20:23Z</dc:date>
    </item>
    <item>
      <title>Re: How to publish a feature service to ArcGIS Online from an mxd USING PYTHON?</title>
      <link>https://community.esri.com/t5/arcgis-online-questions/how-to-publish-a-feature-service-to-arcgis-online/m-p/130431#M6305</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Thanks a ton for the help. This helped me overwrite the existing feature service without deleting it manually. I am saved.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;But here I believe that we had to add the new part of the code that you provided BEFORE the staging of the service definition and not after the line arcpy.StageService_server(outXml, sd). You mentioned otherwise. So the new code comes before the "outXml = workspace + 'HostedMSNew.sddraft' of the main code.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Can you also help me provide an insight on the map service being overwritten. If we have already created the Map using the original feature service, and then overwrite the existing feature service, will the previous maps work with the same shared url. Hope I am clear in my requirement.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Lots of Regards,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Kaushal Shah.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 22 Apr 2013 12:20:40 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-online-questions/how-to-publish-a-feature-service-to-arcgis-online/m-p/130431#M6305</guid>
      <dc:creator>KaushalShah</dc:creator>
      <dc:date>2013-04-22T12:20:40Z</dc:date>
    </item>
    <item>
      <title>Re: How to publish a feature service to ArcGIS Online from an mxd USING PYTHON?</title>
      <link>https://community.esri.com/t5/arcgis-online-questions/how-to-publish-a-feature-service-to-arcgis-online/m-p/130432#M6306</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I've been following this thread, which has helped me a lot, so let me start with a big THANK YOU! I already have a script that updates my&amp;nbsp; feature service but... this needs the desktop installed to run right?&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;For example: If you publish this as gp task on ArcGIS for Server the upload part will throw this error:&lt;/SPAN&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;
ExecuteError: Failed to execute. Parameters are not valid.
ERROR 000732: Server: Dataset My Hosted Services does not exist or is not supported
Failed to execute (UploadServiceDefinition).
&lt;/PRE&gt;&lt;BR /&gt;&lt;SPAN&gt;Is there a way around this or the way is to have ArcGIS For Desktop installed, and the "ArcGISConnection.exe" process running?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 07:20:26 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-online-questions/how-to-publish-a-feature-service-to-arcgis-online/m-p/130432#M6306</guid>
      <dc:creator>TiagoRibeiro</dc:creator>
      <dc:date>2021-12-11T07:20:26Z</dc:date>
    </item>
    <item>
      <title>Re: How to publish a feature service to ArcGIS Online from an mxd USING PYTHON?</title>
      <link>https://community.esri.com/t5/arcgis-online-questions/how-to-publish-a-feature-service-to-arcgis-online/m-p/130433#M6307</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Kaushal Shah:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Right, the code is to modify the XML, thus it must go before stage.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;As long as the service name doesn't change, the link should remain the same. The hosted service account id is a set of letters and numbers which to the best of my knowledge doesnt change. So to the best of my knowledge, it should be ok.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;tribeiro:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;You've made a GP Service to perform this publishing routine?&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I'd strongly recommend against that. The Upload and Stage tools (which are required in this workflow) are not designed to be re-published in your own geoprocessing service. I'd suggest making it a scheduled task on one of your desktop machines.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 22 Apr 2013 14:24:57 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-online-questions/how-to-publish-a-feature-service-to-arcgis-online/m-p/130433#M6307</guid>
      <dc:creator>KevinHibma</dc:creator>
      <dc:date>2013-04-22T14:24:57Z</dc:date>
    </item>
    <item>
      <title>Re: How to publish a feature service to ArcGIS Online from an mxd USING PYTHON?</title>
      <link>https://community.esri.com/t5/arcgis-online-questions/how-to-publish-a-feature-service-to-arcgis-online/m-p/130434#M6308</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;&lt;BR /&gt;tribeiro:&lt;BR /&gt;You've made a GP Service to perform this publishing routine?&lt;BR /&gt;I'd strongly recommend against that. The Upload and Stage tools (which are required in this workflow) are not designed to be re-published in your own geoprocessing service. I'd suggest making it a scheduled task on one of your desktop machines.&lt;BR /&gt;&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks for the reply Kevin, that's what I thought, and the scheduled task approach was (and now will be) my next step.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Any plans of making those tools, Upload and Stage, available through geoprocessing services in the future?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 22 Apr 2013 14:31:33 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-online-questions/how-to-publish-a-feature-service-to-arcgis-online/m-p/130434#M6308</guid>
      <dc:creator>TiagoRibeiro</dc:creator>
      <dc:date>2013-04-22T14:31:33Z</dc:date>
    </item>
    <item>
      <title>Re: How to publish a feature service to ArcGIS Online from an mxd USING PYTHON?</title>
      <link>https://community.esri.com/t5/arcgis-online-questions/how-to-publish-a-feature-service-to-arcgis-online/m-p/130435#M6309</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Not in 10.2, and no plans to the best of my knowledge after that.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;What these tools do, and how they work is not conducive to being used in a service. I'd say at best they would act like a scheduled task that could be modified slightly at execution time.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I say this as the server will most likely have to have the MXD + Data you want to publish. It would be a pretty involved service to that gets both the MXD and all required data from the client, extracts it somehow, and then publishes. So I'm making the assumption your server already has the data/mxds on it. If thats the case, setting it up as a scheduled task would probably be more straight forward.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I'm not saying these as a service cant be done - I'm just saying its something that we haven't tested and I could imagine a few areas which will be difficult to overcome. As such, I'd take the "easier" approach of just making a scheduled task.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 22 Apr 2013 15:06:09 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-online-questions/how-to-publish-a-feature-service-to-arcgis-online/m-p/130435#M6309</guid>
      <dc:creator>KevinHibma</dc:creator>
      <dc:date>2013-04-22T15:06:09Z</dc:date>
    </item>
    <item>
      <title>Re: How to publish a feature service to ArcGIS Online from an mxd USING PYTHON?</title>
      <link>https://community.esri.com/t5/arcgis-online-questions/how-to-publish-a-feature-service-to-arcgis-online/m-p/130436#M6310</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Just for anyone else who comes upon this thread...&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Jeff and I posted a blog with the python script to:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;-CreateMapSDDraft, Analyze, Stage and Upload for map documents to be pushed to ArcGIS.com as a hosted feature service /w overwrite and shared to arcgis.com turned on.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;A href="http://blogs.esri.com/esri/arcgis/2013/04/23/updating-arcgis-com-hosted-feature-services-with-python/"&gt;http://blogs.esri.com/esri/arcgis/2013/04/23/updating-arcgis-com-hosted-feature-services-with-python/&lt;/A&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 23 Apr 2013 15:29:17 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-online-questions/how-to-publish-a-feature-service-to-arcgis-online/m-p/130436#M6310</guid>
      <dc:creator>KevinHibma</dc:creator>
      <dc:date>2013-04-23T15:29:17Z</dc:date>
    </item>
    <item>
      <title>Re: How to publish a feature service to ArcGIS Online from an mxd USING PYTHON?</title>
      <link>https://community.esri.com/t5/arcgis-online-questions/how-to-publish-a-feature-service-to-arcgis-online/m-p/130437#M6311</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I've attempted to use this sample and am able to successfully update feature services with 10.1, but not with 10.2. I'm encountering the following error: &lt;/SPAN&gt;&lt;BR /&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;ExecuteError: Failed to execute. Parameters are not valid.&lt;BR /&gt;ERROR 000732: Server: Dataset My Hosted Services does not exist or is not supported&lt;BR /&gt;WARNING 001404: You are not signed in to ArcGIS Online.&lt;BR /&gt;Failed to execute (UploadServiceDefinition).&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;SPAN&gt;[ATTACH=CONFIG]27306[/ATTACH]&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;This appears to be an issue with the arcpy SignInToPortal function. I'm able to publish/overwrite the service with 10.2 only when I comment out the SignInToPortal line and sign in separately using ArcGIS Desktop. Is anyone else having this problem with ArcGIS 10.2? Are there any workarounds?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Erik&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 09 Sep 2013 21:57:19 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-online-questions/how-to-publish-a-feature-service-to-arcgis-online/m-p/130437#M6311</guid>
      <dc:creator>ErikEndrulat</dc:creator>
      <dc:date>2013-09-09T21:57:19Z</dc:date>
    </item>
    <item>
      <title>Re: How to publish a feature service to ArcGIS Online from an mxd USING PYTHON?</title>
      <link>https://community.esri.com/t5/arcgis-online-questions/how-to-publish-a-feature-service-to-arcgis-online/m-p/130438#M6312</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;I'm able to publish/overwrite the service with 10.2 only when I comment out the SignInToPortal line and sign in separately using ArcGIS Desktop. Is anyone else having this problem with ArcGIS 10.2? Are there any workarounds?&lt;BR /&gt;&lt;BR /&gt;Thanks,&lt;BR /&gt;Erik&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Since 10.2, this is how I have had to publish/overwrite services as well.&amp;nbsp; Not that big of a deal but I do wish that somewhere it would have been stated that SignInToPortal doesn't work like it used to.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 10 Sep 2013 00:26:06 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-online-questions/how-to-publish-a-feature-service-to-arcgis-online/m-p/130438#M6312</guid>
      <dc:creator>DanikBourdeau2</dc:creator>
      <dc:date>2013-09-10T00:26:06Z</dc:date>
    </item>
    <item>
      <title>Re: How to publish a feature service to ArcGIS Online from an mxd USING PYTHON?</title>
      <link>https://community.esri.com/t5/arcgis-online-questions/how-to-publish-a-feature-service-to-arcgis-online/m-p/130439#M6313</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Danik, Erik,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;With the 10.2 release, the authentication method for Portal has changed, as such the SignIntoPortal tool is no longer necessary.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;We're currently investigating why the tool is causing these sorts of issues. (It should have just passed through the tool with a warning message indicating you need to Sign In from the ArcMap menu)&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;To get around the issue for now:&lt;/SPAN&gt;&lt;BR /&gt;&lt;UL&gt;&lt;BR /&gt;&lt;LI&gt;Dont use the SignIn tool in your script/workflows&lt;/LI&gt;&lt;BR /&gt;&lt;LI&gt;Any machine you want to run this script from, must first open ArcMap, and use File &amp;gt; Sign In with the automatic option checked&lt;/LI&gt;&lt;BR /&gt;&lt;/UL&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 10 Sep 2013 14:19:24 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-online-questions/how-to-publish-a-feature-service-to-arcgis-online/m-p/130439#M6313</guid>
      <dc:creator>KevinHibma</dc:creator>
      <dc:date>2013-09-10T14:19:24Z</dc:date>
    </item>
    <item>
      <title>Re: How to publish a feature service to ArcGIS Online from an mxd USING PYTHON?</title>
      <link>https://community.esri.com/t5/arcgis-online-questions/how-to-publish-a-feature-service-to-arcgis-online/m-p/130440#M6314</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Kevin,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Great, thanks for weighing in on the changes in 10.2 regarding the SignIn function.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Do you have a recommended workflow to update feature services using a scheduled task when a user isn't logged into the machine. Is that no longer possible?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks much,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Erik&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 10 Sep 2013 15:22:27 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-online-questions/how-to-publish-a-feature-service-to-arcgis-online/m-p/130440#M6314</guid>
      <dc:creator>ErikEndrulat</dc:creator>
      <dc:date>2013-09-10T15:22:27Z</dc:date>
    </item>
    <item>
      <title>Re: How to publish a feature service to ArcGIS Online from an mxd USING PYTHON?</title>
      <link>https://community.esri.com/t5/arcgis-online-questions/how-to-publish-a-feature-service-to-arcgis-online/m-p/130441#M6315</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;From the previous testing I've done, the following should do what you want:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;UL&gt;&lt;BR /&gt;&lt;LI&gt;Log on to the machine, open ArcMap, and sign in (make note of the account you logged into Windows with)&lt;/LI&gt;&lt;BR /&gt;&lt;LI&gt;Make sure you've checked the automatic sign in on the Portal sign in box.&lt;/LI&gt;&lt;BR /&gt;&lt;LI&gt;Create your scheduled task (it must run under the same windows user account from above)&lt;/LI&gt;&lt;BR /&gt;&lt;/UL&gt;&lt;BR /&gt;&lt;SPAN&gt;The key here is to log in once, have it be remembered, then have the task run under the user account which had logged in previously.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Of course, make sure the SignInToPortal tool has been commented out.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;If I get time later this afternoon I'll give this another go.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 10 Sep 2013 15:34:15 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-online-questions/how-to-publish-a-feature-service-to-arcgis-online/m-p/130441#M6315</guid>
      <dc:creator>KevinHibma</dc:creator>
      <dc:date>2013-09-10T15:34:15Z</dc:date>
    </item>
    <item>
      <title>Re: How to publish a feature service to ArcGIS Online from an mxd USING PYTHON?</title>
      <link>https://community.esri.com/t5/arcgis-online-questions/how-to-publish-a-feature-service-to-arcgis-online/m-p/130442#M6316</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I tried the approach you suggested but was unable to successfully publish the service as a scheduled task (or manually while not logged in through Desktop). I'm very interested in any other suggestions you or other folks may have that would enable running the update FS as a scheduled task.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks!&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Erik&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 12 Sep 2013 15:09:47 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-online-questions/how-to-publish-a-feature-service-to-arcgis-online/m-p/130442#M6316</guid>
      <dc:creator>ErikEndrulat</dc:creator>
      <dc:date>2013-09-12T15:09:47Z</dc:date>
    </item>
    <item>
      <title>Re: How to publish a feature service to ArcGIS Online from an mxd USING PYTHON?</title>
      <link>https://community.esri.com/t5/arcgis-online-questions/how-to-publish-a-feature-service-to-arcgis-online/m-p/130443#M6317</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Erik,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Are you getting an error when running the python script? Or are you having a problem creating a scheduled task?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 16 Sep 2013 17:54:33 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-online-questions/how-to-publish-a-feature-service-to-arcgis-online/m-p/130443#M6317</guid>
      <dc:creator>JeffMoulds</dc:creator>
      <dc:date>2013-09-16T17:54:33Z</dc:date>
    </item>
    <item>
      <title>Re: How to publish a feature service to ArcGIS Online from an mxd USING PYTHON?</title>
      <link>https://community.esri.com/t5/arcgis-online-questions/how-to-publish-a-feature-service-to-arcgis-online/m-p/130444#M6318</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I get the error when running the python script, and the scheduled task fails (presumably from the same error but I haven't logged the errors yet).&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 16 Sep 2013 17:57:23 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-online-questions/how-to-publish-a-feature-service-to-arcgis-online/m-p/130444#M6318</guid>
      <dc:creator>ErikEndrulat</dc:creator>
      <dc:date>2013-09-16T17:57:23Z</dc:date>
    </item>
  </channel>
</rss>

