<?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>idea Provide arcpy equivalent to ArcGIS Pro &amp;quot;Share as Web Map&amp;quot; in ArcGIS Pro Ideas</title>
    <link>https://community.esri.com/t5/arcgis-pro-ideas/provide-arcpy-equivalent-to-arcgis-pro-quot-share/idi-p/1242078</link>
    <description>&lt;P&gt;&lt;SPAN&gt;I have a map in ArcGIS pro that I can upload to ArcGIS online using the "Share as Web Map" dialog, which gives me various options for how I want the data copied (in my case it creates an ArcGIS Online web map and a feature layer).&amp;nbsp; I'd like to automate that in Python but having some trouble figuring out how to do it.&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;BTW - I first raised this a a &lt;A href="https://community.esri.com/t5/python-questions/what-is-python-equivalent-to-arcgis-pro-quot-share/m-p/1241840#M66291" target="_self"&gt;question&lt;/A&gt; so there is more discussion there&lt;/SPAN&gt;&lt;/P&gt;</description>
    <pubDate>Fri, 16 Dec 2022 18:42:15 GMT</pubDate>
    <dc:creator>DonMorrison1</dc:creator>
    <dc:date>2022-12-16T18:42:15Z</dc:date>
    <item>
      <title>Provide arcpy equivalent to ArcGIS Pro "Share as Web Map"</title>
      <link>https://community.esri.com/t5/arcgis-pro-ideas/provide-arcpy-equivalent-to-arcgis-pro-quot-share/idi-p/1242078</link>
      <description>&lt;P&gt;&lt;SPAN&gt;I have a map in ArcGIS pro that I can upload to ArcGIS online using the "Share as Web Map" dialog, which gives me various options for how I want the data copied (in my case it creates an ArcGIS Online web map and a feature layer).&amp;nbsp; I'd like to automate that in Python but having some trouble figuring out how to do it.&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;BTW - I first raised this a a &lt;A href="https://community.esri.com/t5/python-questions/what-is-python-equivalent-to-arcgis-pro-quot-share/m-p/1241840#M66291" target="_self"&gt;question&lt;/A&gt; so there is more discussion there&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 16 Dec 2022 18:42:15 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-ideas/provide-arcpy-equivalent-to-arcgis-pro-quot-share/idi-p/1242078</guid>
      <dc:creator>DonMorrison1</dc:creator>
      <dc:date>2022-12-16T18:42:15Z</dc:date>
    </item>
    <item>
      <title>Re: Provide arcpy equivalent to ArcGIS Pro "Share as Web Map"</title>
      <link>https://community.esri.com/t5/arcgis-pro-ideas/provide-arcpy-equivalent-to-arcgis-pro-quot-share/idc-p/1242239#M22588</link>
      <description>&lt;P&gt;All the tools you require for you to script in python or model builder are in the &lt;A href="https://pro.arcgis.com/en/pro-app/latest/tool-reference/data-management/an-overview-of-the-package-toolset.htm" target="_self"&gt;Package toolbox.&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Sun, 18 Dec 2022 12:11:31 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-ideas/provide-arcpy-equivalent-to-arcgis-pro-quot-share/idc-p/1242239#M22588</guid>
      <dc:creator>DuncanHornby</dc:creator>
      <dc:date>2022-12-18T12:11:31Z</dc:date>
    </item>
    <item>
      <title>Re: Provide arcpy equivalent to ArcGIS Pro "Share as Web Map"</title>
      <link>https://community.esri.com/t5/arcgis-pro-ideas/provide-arcpy-equivalent-to-arcgis-pro-quot-share/idc-p/1242516#M22591</link>
      <description>&lt;P&gt;Thanks Duncan, but I'm still not seeing how to use the Package toolset to code the equivalent of "Share as Web Map".. I ran "Package Map" followed by "Share Package" but I ended up with the .mpkx file being upload to ArcGIS Online as a Map Package item.&amp;nbsp; What I want to is end up with a Web Map item in ArcGIS Online (and a related Feature Layer if needed).&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;BTW - I did figure out how to accomplish thi using a combination of arcpy, REST APIs, and the Python for ArcGIS API, but it was quite a bit of relatively complicated code.&lt;/P&gt;</description>
      <pubDate>Mon, 19 Dec 2022 20:51:03 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-ideas/provide-arcpy-equivalent-to-arcgis-pro-quot-share/idc-p/1242516#M22591</guid>
      <dc:creator>DonMorrison1</dc:creator>
      <dc:date>2022-12-19T20:51:03Z</dc:date>
    </item>
    <item>
      <title>Re: Provide arcpy equivalent to ArcGIS Pro "Share as Web Map" - Status changed to: Under Consideration</title>
      <link>https://community.esri.com/t5/arcgis-pro-ideas/provide-arcpy-equivalent-to-arcgis-pro-quot-share/idc-p/1248842#M22878</link>
      <description />
      <pubDate>Tue, 17 Jan 2023 19:36:06 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-ideas/provide-arcpy-equivalent-to-arcgis-pro-quot-share/idc-p/1248842#M22878</guid>
      <dc:creator>JonahLay</dc:creator>
      <dc:date>2023-01-17T19:36:06Z</dc:date>
    </item>
    <item>
      <title>Re: Provide arcpy equivalent to ArcGIS Pro "Share as Web Map" - Status changed to: Open</title>
      <link>https://community.esri.com/t5/arcgis-pro-ideas/provide-arcpy-equivalent-to-arcgis-pro-quot-share/idc-p/1248909#M22888</link>
      <description />
      <pubDate>Tue, 17 Jan 2023 22:58:45 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-ideas/provide-arcpy-equivalent-to-arcgis-pro-quot-share/idc-p/1248909#M22888</guid>
      <dc:creator>JonahLay</dc:creator>
      <dc:date>2023-01-17T22:58:45Z</dc:date>
    </item>
    <item>
      <title>Re: Provide arcpy equivalent to ArcGIS Pro "Share as Web Map"</title>
      <link>https://community.esri.com/t5/arcgis-pro-ideas/provide-arcpy-equivalent-to-arcgis-pro-quot-share/idc-p/1268872#M23821</link>
      <description>&lt;P&gt;hi there,&amp;nbsp;&lt;/P&gt;&lt;P&gt;we have the same requirements, since we are building Azure DevOps pipelines that publish entire test and demo environment. While we are able to automate the publishing of services and other artifacts, the last piece missing is the publishing of a WebMap based on an ArcGIS Pro map.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 17 Mar 2023 07:53:31 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-ideas/provide-arcpy-equivalent-to-arcgis-pro-quot-share/idc-p/1268872#M23821</guid>
      <dc:creator>cspoerri</dc:creator>
      <dc:date>2023-03-17T07:53:31Z</dc:date>
    </item>
    <item>
      <title>Re: Provide arcpy equivalent to ArcGIS Pro "Share as Web Map"</title>
      <link>https://community.esri.com/t5/arcgis-pro-ideas/provide-arcpy-equivalent-to-arcgis-pro-quot-share/idc-p/1268945#M23823</link>
      <description>&lt;P&gt;Thank you for the comment&amp;nbsp;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/479874"&gt;@cspoerri&lt;/a&gt;&amp;nbsp;Please be sure to add your kudo to this idea &lt;span class="lia-unicode-emoji" title=":winking_face:"&gt;😉&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 17 Mar 2023 13:47:31 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-ideas/provide-arcpy-equivalent-to-arcgis-pro-quot-share/idc-p/1268945#M23823</guid>
      <dc:creator>KoryKramer</dc:creator>
      <dc:date>2023-03-17T13:47:31Z</dc:date>
    </item>
    <item>
      <title>Re: Provide arcpy equivalent to ArcGIS Pro "Share as Web Map"</title>
      <link>https://community.esri.com/t5/arcgis-pro-ideas/provide-arcpy-equivalent-to-arcgis-pro-quot-share/idc-p/1289070#M24919</link>
      <description>&lt;P&gt;I have the same problem. It appears this isn't supported in ArcPy. I have tried using sddraft and the files are uploaded as a map package and not as a web layer.&amp;nbsp;&lt;/P&gt;&lt;P&gt;On investigation, it would appear ArcGIS Pro (v2.9.2) is utilising .msd files under the hood when the Share as "Web Map" is invoked.&amp;nbsp; &amp;nbsp;.sd files are not supported in ArcPy and were deprecated in favor of "sddrafts".&amp;nbsp;&lt;/P&gt;&lt;P&gt;To verify, under options, navigate to "Share and Download". Open the staging folder and you will see folders for each transaction that include .msd files.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="kshaba_0-1684146686620.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/70666iA03599E8194C6503/image-size/medium?v=v2&amp;amp;px=400" role="button" title="kshaba_0-1684146686620.png" alt="kshaba_0-1684146686620.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/192850"&gt;@DonMorrison1&lt;/a&gt;&amp;nbsp; Are you able to share the solution you arrived at here?&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 15 May 2023 10:36:30 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-ideas/provide-arcpy-equivalent-to-arcgis-pro-quot-share/idc-p/1289070#M24919</guid>
      <dc:creator>kshaba</dc:creator>
      <dc:date>2023-05-15T10:36:30Z</dc:date>
    </item>
    <item>
      <title>Re: Provide arcpy equivalent to ArcGIS Pro "Share as Web Map"</title>
      <link>https://community.esri.com/t5/arcgis-pro-ideas/provide-arcpy-equivalent-to-arcgis-pro-quot-share/idc-p/1373984#M28162</link>
      <description>&lt;P&gt;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/192850"&gt;@DonMorrison1&lt;/a&gt;&amp;nbsp;Hi Don, were you able to figure out this? If so, can you please share your python pseudocode? I am trying to automate publishing Map Image Layer from ArcGIS Pro to ArcGIS Enterprise.&lt;/P&gt;</description>
      <pubDate>Wed, 24 Jan 2024 17:21:55 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-ideas/provide-arcpy-equivalent-to-arcgis-pro-quot-share/idc-p/1373984#M28162</guid>
      <dc:creator>SaumyaManiar</dc:creator>
      <dc:date>2024-01-24T17:21:55Z</dc:date>
    </item>
    <item>
      <title>Re: Provide arcpy equivalent to ArcGIS Pro "Share as Web Map"</title>
      <link>https://community.esri.com/t5/arcgis-pro-ideas/provide-arcpy-equivalent-to-arcgis-pro-quot-share/idc-p/1374733#M28184</link>
      <description>&lt;P&gt;Here is a rough outline of the steps I went through. The input is a mpxk file and I end up with a hosted feature layer . I'm not sure this is really what you want to do since you are working with image layers and my goal was to get the features published, but in any case here it is&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;Use ExtractPackage to unpack the mpkx file&lt;/LI&gt;&lt;LI&gt;Find the .mapx file in the unpacked files&lt;/LI&gt;&lt;LI&gt;Create a new empty ArcGISProject&lt;/LI&gt;&lt;LI&gt;Use ArcGISProject.importDocument to import the map into the project&lt;/LI&gt;&lt;LI&gt;Use map.listLayer to iterate through the map layers and use map.removeLayer to remove all but Feature Layers and Group Layers (layer.isFeatureLayer and layer.isGroupLayer)&lt;/LI&gt;&lt;LI&gt;Call map.getWebLayerSharingDraft("HOSTING_SERVER", "FEATURE", rest_id) to get a sharing_draft document&lt;/LI&gt;&lt;LI&gt;Set the sharing_draft attributes (summary, service_name, tags, etc)&lt;/LI&gt;&lt;LI&gt;Call sharing_draft.exportToSDDraft to get a sharing draft file&lt;/LI&gt;&lt;LI&gt;Call arcpy.StageService specifying the sharing draft file&lt;/LI&gt;&lt;LI&gt;Call UploadServiceDefinition to create the hosted feature layer&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 26 Jan 2024 02:02:46 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-ideas/provide-arcpy-equivalent-to-arcgis-pro-quot-share/idc-p/1374733#M28184</guid>
      <dc:creator>DonMorrison1</dc:creator>
      <dc:date>2024-01-26T02:02:46Z</dc:date>
    </item>
    <item>
      <title>Re: Provide arcpy equivalent to ArcGIS Pro "Share as Web Map"</title>
      <link>https://community.esri.com/t5/arcgis-pro-ideas/provide-arcpy-equivalent-to-arcgis-pro-quot-share/idc-p/1388255#M28774</link>
      <description>&lt;P&gt;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/192850"&gt;@DonMorrison1&lt;/a&gt;,&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks for sharing. I'm following a similar workflow to publish a hosted feature layer, but I'm still unable to automate the updating of the associated web map. In my current workflow, if I add new layers to the map in Pro, I have to manually add them to the Web Map JSON, which is cumbersome and error-prone.&lt;/P&gt;&lt;P&gt;Have you found a way to automate the updating of the Web Map JSON specification? This is something I'd like to accomplish, and I'd prefer not to write a custom toolbox to parse and update the Web Map JSON from my previous version.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Let me know if you have any leads. Thanks!&lt;/P&gt;</description>
      <pubDate>Wed, 28 Feb 2024 20:05:08 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-ideas/provide-arcpy-equivalent-to-arcgis-pro-quot-share/idc-p/1388255#M28774</guid>
      <dc:creator>ATFerguson</dc:creator>
      <dc:date>2024-02-28T20:05:08Z</dc:date>
    </item>
    <item>
      <title>Re: Provide arcpy equivalent to ArcGIS Pro "Share as Web Map"</title>
      <link>https://community.esri.com/t5/arcgis-pro-ideas/provide-arcpy-equivalent-to-arcgis-pro-quot-share/idc-p/1388455#M28781</link>
      <description>&lt;P&gt;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/722666"&gt;@ATFerguson&lt;/a&gt;&amp;nbsp;, sorry but the only way I've been able to do this is updating the Web Map JSON specification.&amp;nbsp; The parsing isn't too bad once you convert the JSON to a python dict, but still a bit messy.&lt;/P&gt;</description>
      <pubDate>Thu, 29 Feb 2024 00:13:03 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-ideas/provide-arcpy-equivalent-to-arcgis-pro-quot-share/idc-p/1388455#M28781</guid>
      <dc:creator>DonMorrison1</dc:creator>
      <dc:date>2024-02-29T00:13:03Z</dc:date>
    </item>
  </channel>
</rss>

