<?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: publish content directly to a named folder in ArcGIS API for Python Questions</title>
    <link>https://community.esri.com/t5/arcgis-api-for-python-questions/publish-content-directly-to-a-named-folder/m-p/1132171#M6990</link>
    <description>&lt;P&gt;If you use the workflow to publish using arcpy "UploadServiceDefinition" you can specify both a portalFolder and a serverFolder in the service definition.&lt;/P&gt;&lt;P&gt;However, depending on what you are publishing sometimes it will just ignore the portalFolder setting.&lt;/P&gt;&lt;P&gt;If you do the upload and then follow it immediately with a "move" the results are more reliable.&lt;/P&gt;&lt;P&gt;Also note that the type of service will determine where it gets published on the server, sometimes it is forced into "Hosted" folder no matter what you give it in serverFolder and if you specify serverFolder="Hosted" for some services it will ignore that and put the service at "/" (root).&lt;/P&gt;&lt;P&gt;Hope this helps someone.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Mon, 10 Jan 2022 20:12:01 GMT</pubDate>
    <dc:creator>Brian_Wilson</dc:creator>
    <dc:date>2022-01-10T20:12:01Z</dc:date>
    <item>
      <title>publish content directly to a named folder</title>
      <link>https://community.esri.com/t5/arcgis-api-for-python-questions/publish-content-directly-to-a-named-folder/m-p/845760#M3660</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi , I haven't been able to find any help on publishing content to a named folder on AGOL/Portal using the python API.&lt;/P&gt;&lt;P&gt;The example I have created in the user home folder and then gives code to move the content, creating a folder in the process.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is this the preferred method?&lt;/P&gt;&lt;P&gt;Or should I be able to publish things directly to a specific folder?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks.&lt;/P&gt;&lt;P&gt;Ian&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 11 Oct 2020 04:22:23 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-python-questions/publish-content-directly-to-a-named-folder/m-p/845760#M3660</guid>
      <dc:creator>IanHamilton2</dc:creator>
      <dc:date>2020-10-11T04:22:23Z</dc:date>
    </item>
    <item>
      <title>Re: publish content directly to a named folder</title>
      <link>https://community.esri.com/t5/arcgis-api-for-python-questions/publish-content-directly-to-a-named-folder/m-p/845761#M3661</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi &lt;A href="https://community.esri.com/migrated-users/332336"&gt;Ian Hamilton&lt;/A&gt;‌,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The Publish method in ArcGIS API for Python doesn't have any parameters to specify a named folder when publishing.&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;A class="link-titled" href="https://developers.arcgis.com/python/api-reference/arcgis.gis.toc.html?highlight=publish#arcgis.gis.Item.publish" title="https://developers.arcgis.com/python/api-reference/arcgis.gis.toc.html?highlight=publish#arcgis.gis.Item.publish"&gt;Publish items&lt;/A&gt;&amp;nbsp;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;However, the Add method in the Content Manager gives you this option to add your item to a named folder then publish it from there.&lt;/P&gt;&lt;P&gt;&lt;CODE class="" style="color: #000000; background: transparent; border: none; font-weight: bold;"&gt;add&lt;/CODE&gt;&lt;SPAN class="" style="color: #555555; font-weight: bold;"&gt;(&lt;/SPAN&gt;&lt;EM class="" style="color: #555555; font-weight: bold;"&gt;&lt;SPAN class=""&gt;item_properties&lt;/SPAN&gt;&lt;/EM&gt;&lt;SPAN style="color: #555555; background-color: #f0f0f0; font-weight: bold;"&gt;,&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;EM class="" style="color: #555555; font-weight: bold;"&gt;&lt;SPAN class=""&gt;data&lt;/SPAN&gt;&lt;SPAN class=""&gt;=&lt;/SPAN&gt;&lt;SPAN class=""&gt;None&lt;/SPAN&gt;&lt;/EM&gt;&lt;SPAN style="color: #555555; background-color: #f0f0f0; font-weight: bold;"&gt;,&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;EM class="" style="color: #555555; font-weight: bold;"&gt;&lt;SPAN class=""&gt;thumbnail&lt;/SPAN&gt;&lt;SPAN class=""&gt;=&lt;/SPAN&gt;&lt;SPAN class=""&gt;None&lt;/SPAN&gt;&lt;/EM&gt;&lt;SPAN style="color: #555555; background-color: #f0f0f0; font-weight: bold;"&gt;,&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;EM class="" style="color: #555555; font-weight: bold;"&gt;&lt;SPAN class=""&gt;metadata&lt;/SPAN&gt;&lt;SPAN class=""&gt;=&lt;/SPAN&gt;&lt;SPAN class=""&gt;None&lt;/SPAN&gt;&lt;/EM&gt;&lt;SPAN style="color: #555555; background-color: #f0f0f0; font-weight: bold;"&gt;,&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;EM class="" style="color: #555555; font-weight: bold;"&gt;&lt;SPAN class=""&gt;owner&lt;/SPAN&gt;&lt;SPAN class=""&gt;=&lt;/SPAN&gt;&lt;SPAN class=""&gt;None&lt;/SPAN&gt;&lt;/EM&gt;&lt;SPAN style="color: #555555; background-color: #f0f0f0; font-weight: bold;"&gt;,&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;EM class="" style="color: #555555; font-weight: bold;"&gt;&lt;SPAN class=""&gt;&lt;SPAN class="" style="background: #f1c40f; font-weight: bold;"&gt;folder&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN class=""&gt;=&lt;/SPAN&gt;&lt;SPAN class=""&gt;None&lt;/SPAN&gt;&lt;/EM&gt;&lt;SPAN style="color: #555555; background-color: #f0f0f0; font-weight: bold;"&gt;,&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;EM class="" style="color: #555555; font-weight: bold;"&gt;&lt;SPAN class=""&gt;item_id&lt;/SPAN&gt;&lt;SPAN class=""&gt;=&lt;/SPAN&gt;&lt;SPAN class=""&gt;None&lt;/SPAN&gt;&lt;/EM&gt;&lt;SPAN class="" style="color: #555555; font-weight: bold;"&gt;)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="" style="color: #555555; font-weight: bold;"&gt;&lt;A class="link-titled" href="https://developers.arcgis.com/python/api-reference/arcgis.gis.toc.html?highlight=add#arcgis.gis.ContentManager.add" title="https://developers.arcgis.com/python/api-reference/arcgis.gis.toc.html?highlight=add#arcgis.gis.ContentManager.add"&gt;Add items&lt;/A&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="" style="color: #555555; font-weight: bold;"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;you also have the option to move items to an already created folder using &lt;EM&gt;&lt;STRONG&gt;move(folder, owner=None)&lt;/STRONG&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;A class="link-titled" href="https://developers.arcgis.com/python/api-reference/arcgis.gis.toc.html?highlight=move#arcgis.gis.Item.move" title="https://developers.arcgis.com/python/api-reference/arcgis.gis.toc.html?highlight=move#arcgis.gis.Item.move"&gt;Move items&lt;/A&gt;&lt;/STRONG&gt;&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 13 Oct 2020 00:47:56 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-python-questions/publish-content-directly-to-a-named-folder/m-p/845761#M3661</guid>
      <dc:creator>MehdiPira1</dc:creator>
      <dc:date>2020-10-13T00:47:56Z</dc:date>
    </item>
    <item>
      <title>Re: publish content directly to a named folder</title>
      <link>https://community.esri.com/t5/arcgis-api-for-python-questions/publish-content-directly-to-a-named-folder/m-p/845762#M3662</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi &lt;A href="https://community.esri.com/migrated-users/332336"&gt;Ian Hamilton&lt;/A&gt;‌,&lt;/P&gt;&lt;P&gt;Would you please mark it as answered if that answered your question?&lt;/P&gt;&lt;P&gt;Thank you.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 14 Oct 2020 01:46:36 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-python-questions/publish-content-directly-to-a-named-folder/m-p/845762#M3662</guid>
      <dc:creator>MehdiPira1</dc:creator>
      <dc:date>2020-10-14T01:46:36Z</dc:date>
    </item>
    <item>
      <title>Re: publish content directly to a named folder</title>
      <link>https://community.esri.com/t5/arcgis-api-for-python-questions/publish-content-directly-to-a-named-folder/m-p/1127392#M6918</link>
      <description>&lt;P&gt;It would be better if ESRI can enhance the publish function to include an option for specified name AGOL/Portal folder. Seem that's the only missing link in the publish function. The option to specify the output ArcGIS Server folder is available, why not adding the AGOL/Portal folder.&lt;/P&gt;</description>
      <pubDate>Sat, 18 Dec 2021 08:02:40 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-python-questions/publish-content-directly-to-a-named-folder/m-p/1127392#M6918</guid>
      <dc:creator>JackFanZhang</dc:creator>
      <dc:date>2021-12-18T08:02:40Z</dc:date>
    </item>
    <item>
      <title>Re: publish content directly to a named folder</title>
      <link>https://community.esri.com/t5/arcgis-api-for-python-questions/publish-content-directly-to-a-named-folder/m-p/1132171#M6990</link>
      <description>&lt;P&gt;If you use the workflow to publish using arcpy "UploadServiceDefinition" you can specify both a portalFolder and a serverFolder in the service definition.&lt;/P&gt;&lt;P&gt;However, depending on what you are publishing sometimes it will just ignore the portalFolder setting.&lt;/P&gt;&lt;P&gt;If you do the upload and then follow it immediately with a "move" the results are more reliable.&lt;/P&gt;&lt;P&gt;Also note that the type of service will determine where it gets published on the server, sometimes it is forced into "Hosted" folder no matter what you give it in serverFolder and if you specify serverFolder="Hosted" for some services it will ignore that and put the service at "/" (root).&lt;/P&gt;&lt;P&gt;Hope this helps someone.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 10 Jan 2022 20:12:01 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-python-questions/publish-content-directly-to-a-named-folder/m-p/1132171#M6990</guid>
      <dc:creator>Brian_Wilson</dc:creator>
      <dc:date>2022-01-10T20:12:01Z</dc:date>
    </item>
  </channel>
</rss>

