<?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 Publishing A Survey from Survey123 Programmatically in ArcGIS API for Python Questions</title>
    <link>https://community.esri.com/t5/arcgis-api-for-python-questions/publishing-a-survey-from-survey123/m-p/794345#M1718</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi there,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;At my workplace, we have developed a survey for our field agents that must be populated with existent information on a fairly regular basis (think about once per hour), and itself populate several online-hosted feature layers for our GIS team on roughly the same time-frame. Naturally, I turned to python and windows task scheduler to try and do this for me, roughly following the same steps as are outlined in &lt;A _jive_internal="true" href="https://community.esri.com/groups/survey123/blog/2017/12/08/an-alternative-way-to-update-the-media-folder-of-a-survey123-form-item"&gt;this&lt;/A&gt; blog post. While the fundamentals of this seem sound, I've run into a couple of issues trying to implement it.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It should first be stated that I was not able to use this code itself, as it relies on the arcrest module (which ESRI seems to recommend against using, in favor of the new python API) and I cannot seem to get any of my layers to download as zipfiles.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thankfully, my own scripting can do more or less the same thing as Mr. Wilson's, and I was able to get it to the point where the necessary feature layers were updated online and a csv with updated information was created and added to the media folder in the survey. The only step I have left, that I cannot figure out how to get around, is the actual publishing of the survey itself. Is there some method in the api to publish a survey that is currently stored locally? I have been trying to use the arcgis.apps survey123 submodule, but cannot find an "update" method.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for any help you can offer.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;UPDATE: I ended up giving in and using the ArcREST module, using my python3 script to update the csv, then Phil's to save and upload it. I would still love to see how this can be done with the arcgis API, so that I can roll everything into one, but this system works for the time being.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 19 Jul 2019 14:20:00 GMT</pubDate>
    <dc:creator>ChapmanWhite</dc:creator>
    <dc:date>2019-07-19T14:20:00Z</dc:date>
    <item>
      <title>Publishing A Survey from Survey123 Programmatically</title>
      <link>https://community.esri.com/t5/arcgis-api-for-python-questions/publishing-a-survey-from-survey123/m-p/794345#M1718</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi there,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;At my workplace, we have developed a survey for our field agents that must be populated with existent information on a fairly regular basis (think about once per hour), and itself populate several online-hosted feature layers for our GIS team on roughly the same time-frame. Naturally, I turned to python and windows task scheduler to try and do this for me, roughly following the same steps as are outlined in &lt;A _jive_internal="true" href="https://community.esri.com/groups/survey123/blog/2017/12/08/an-alternative-way-to-update-the-media-folder-of-a-survey123-form-item"&gt;this&lt;/A&gt; blog post. While the fundamentals of this seem sound, I've run into a couple of issues trying to implement it.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It should first be stated that I was not able to use this code itself, as it relies on the arcrest module (which ESRI seems to recommend against using, in favor of the new python API) and I cannot seem to get any of my layers to download as zipfiles.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thankfully, my own scripting can do more or less the same thing as Mr. Wilson's, and I was able to get it to the point where the necessary feature layers were updated online and a csv with updated information was created and added to the media folder in the survey. The only step I have left, that I cannot figure out how to get around, is the actual publishing of the survey itself. Is there some method in the api to publish a survey that is currently stored locally? I have been trying to use the arcgis.apps survey123 submodule, but cannot find an "update" method.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for any help you can offer.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;UPDATE: I ended up giving in and using the ArcREST module, using my python3 script to update the csv, then Phil's to save and upload it. I would still love to see how this can be done with the arcgis API, so that I can roll everything into one, but this system works for the time being.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 19 Jul 2019 14:20:00 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-python-questions/publishing-a-survey-from-survey123/m-p/794345#M1718</guid>
      <dc:creator>ChapmanWhite</dc:creator>
      <dc:date>2019-07-19T14:20:00Z</dc:date>
    </item>
    <item>
      <title>Re: Publishing A Survey from Survey123 Programmatically</title>
      <link>https://community.esri.com/t5/arcgis-api-for-python-questions/publishing-a-survey-from-survey123/m-p/794346#M1719</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;Just happend to see this question!&lt;/P&gt;&lt;P&gt;Have you ever tried the following to update the survey using new python api?&lt;/P&gt;&lt;PRE style="color: #a9b7c6; background-color: #2b2b2b; font-size: 9.8pt;"&gt;&lt;SPAN style="color: #cc7832;"&gt;import &lt;/SPAN&gt;arcgis&lt;/PRE&gt;&lt;PRE style="color: #a9b7c6; background-color: #2b2b2b; font-size: 9.8pt;"&gt;gis = arcgis.GIS(&amp;lt;PORTAL&amp;gt;&lt;SPAN style="color: #cc7832;"&gt;,&amp;lt;USERNAME&amp;gt;&lt;/SPAN&gt;&lt;SPAN style="color: #cc7832;"&gt;, &amp;lt;PWD&amp;gt;&lt;/SPAN&gt;)&lt;/PRE&gt;&lt;PRE style="color: #a9b7c6; background-color: #2b2b2b; font-size: 9.8pt;"&gt;gis.content.get(&amp;lt;item id of the survey in portal&amp;gt;).update(&lt;SPAN style="color: #aa4926;"&gt;data&lt;/SPAN&gt;=PATH TO ZIPPED SURVEY FOLDER)&lt;/PRE&gt;&lt;P&gt;Arun&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 23 Mar 2020 04:04:33 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-python-questions/publishing-a-survey-from-survey123/m-p/794346#M1719</guid>
      <dc:creator>ArunSebastian2</dc:creator>
      <dc:date>2020-03-23T04:04:33Z</dc:date>
    </item>
  </channel>
</rss>

