<?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 Publish a non-hosted feature layer using Python? in ArcGIS Online Questions</title>
    <link>https://community.esri.com/t5/arcgis-online-questions/publish-a-non-hosted-feature-layer-using-python/m-p/1029347#M38604</link>
    <description>&lt;P&gt;I am trying to create a Python code that batch uploads shapefiles (from compressed folders stored on a local file location) to ArcGIS Online. The only way I know how to do this is using the .publish() method, which creates a hosted feature layer. Is there a method for uploading non-hosted shapefiles, or some sort of workaround? I'm looking for the equivalent of when you go into ArcGIS Online &amp;gt; Content &amp;gt; Add Item and upload a shapefile.&lt;/P&gt;&lt;P&gt;I've used&amp;nbsp;&lt;A href="https://developers.arcgis.com/python/sample-notebooks/publishing-sd-shapefiles-and-csv/" target="_blank" rel="noopener"&gt;Publishing SDs, Shapefiles and CSVs | ArcGIS for Developers&lt;/A&gt;&amp;nbsp;as a reference, but it only utilizes the .publish() method.&lt;/P&gt;&lt;P&gt;I have a lot of shapefiles to upload, so I do not want to do it one-by-one using ArcGIS Online because that would be too time-consuming.&lt;/P&gt;</description>
    <pubDate>Mon, 22 Feb 2021 23:33:00 GMT</pubDate>
    <dc:creator>CassandraHiggins</dc:creator>
    <dc:date>2021-02-22T23:33:00Z</dc:date>
    <item>
      <title>Publish a non-hosted feature layer using Python?</title>
      <link>https://community.esri.com/t5/arcgis-online-questions/publish-a-non-hosted-feature-layer-using-python/m-p/1029347#M38604</link>
      <description>&lt;P&gt;I am trying to create a Python code that batch uploads shapefiles (from compressed folders stored on a local file location) to ArcGIS Online. The only way I know how to do this is using the .publish() method, which creates a hosted feature layer. Is there a method for uploading non-hosted shapefiles, or some sort of workaround? I'm looking for the equivalent of when you go into ArcGIS Online &amp;gt; Content &amp;gt; Add Item and upload a shapefile.&lt;/P&gt;&lt;P&gt;I've used&amp;nbsp;&lt;A href="https://developers.arcgis.com/python/sample-notebooks/publishing-sd-shapefiles-and-csv/" target="_blank" rel="noopener"&gt;Publishing SDs, Shapefiles and CSVs | ArcGIS for Developers&lt;/A&gt;&amp;nbsp;as a reference, but it only utilizes the .publish() method.&lt;/P&gt;&lt;P&gt;I have a lot of shapefiles to upload, so I do not want to do it one-by-one using ArcGIS Online because that would be too time-consuming.&lt;/P&gt;</description>
      <pubDate>Mon, 22 Feb 2021 23:33:00 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-online-questions/publish-a-non-hosted-feature-layer-using-python/m-p/1029347#M38604</guid>
      <dc:creator>CassandraHiggins</dc:creator>
      <dc:date>2021-02-22T23:33:00Z</dc:date>
    </item>
    <item>
      <title>Re: Publish a non-hosted feature layer using Python?</title>
      <link>https://community.esri.com/t5/arcgis-online-questions/publish-a-non-hosted-feature-layer-using-python/m-p/1029352#M38605</link>
      <description>&lt;P&gt;Check out &lt;A href="https://developers.arcgis.com/python/api-reference/arcgis.gis.toc.html#arcgis.gis.ContentManager.add" target="_self"&gt;&lt;STRONG&gt;arcgis.gis.ContentManager.add()&lt;/STRONG&gt;&lt;/A&gt;. You should be able to batch upload your files that way. Just put "data='path-to-shapefile'" as one of the parameters.&lt;/P&gt;</description>
      <pubDate>Mon, 22 Feb 2021 23:43:46 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-online-questions/publish-a-non-hosted-feature-layer-using-python/m-p/1029352#M38605</guid>
      <dc:creator>jcarlson</dc:creator>
      <dc:date>2021-02-22T23:43:46Z</dc:date>
    </item>
    <item>
      <title>Re: Publish a non-hosted feature layer using Python?</title>
      <link>https://community.esri.com/t5/arcgis-online-questions/publish-a-non-hosted-feature-layer-using-python/m-p/1029396#M38607</link>
      <description>&lt;P&gt;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/80828"&gt;@CassandraHiggins&lt;/a&gt;&amp;nbsp;another way to do it would be through Pro. You can use the attached toolbox/script to publish multiple shapefiles or feature classes as individual services. The advantage of this method is that you can set symbology, labels, layer name, etc. in Pro and that will apply to the published layer.&lt;/P&gt;&lt;P&gt;&lt;FONT size="2"&gt;If this answer solved your question or if you found it helpful please mark it accordingly to help others who have the same question.&lt;/FONT&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 23 Feb 2021 01:26:29 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-online-questions/publish-a-non-hosted-feature-layer-using-python/m-p/1029396#M38607</guid>
      <dc:creator>UriGilad_EsriAu</dc:creator>
      <dc:date>2021-02-23T01:26:29Z</dc:date>
    </item>
  </channel>
</rss>

