<?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: arcpy.mp.CreateWebLayerSDDraft in Python Questions</title>
    <link>https://community.esri.com/t5/python-questions/arcpy-mp-createweblayersddraft/m-p/589710#M46223</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;But the description for the tool gives the requirements for the parameters, for example&lt;/P&gt;&lt;TABLE class="arcpyclass_paramtbl" style="margin-bottom: 1.5em; font-size: 0.875em; font-family: 'Lucida Grande', 'Segoe UI', Arial, sans-serif; background-color: white; border: 1px solid #dddddd; color: #4d4d4d;"&gt;&lt;TBODY&gt;&lt;TR style="border-bottom-width: 1px; border-bottom-color: #dddddd;"&gt;&lt;TD style="border-left-width: 1px; border-left-style: solid; border-left-color: #dddddd; border-right-width: 1px; border-right-style: solid; border-right-color: #dddddd; padding: 12px;"&gt;&lt;P&gt;tags&lt;/P&gt;&lt;/TD&gt;&lt;TD style="border-left-width: 1px; border-left-style: solid; border-left-color: #dddddd; border-right-width: 1px; border-right-style: solid; border-right-color: #dddddd; padding: 12px;"&gt;&lt;P style="font-size: 0.875rem;"&gt;A string that represents the tags. Multiple tags can be added or separated by a comma or semicolon.&lt;/P&gt;&lt;P style="font-size: 0.875rem; margin-top: 1.71429em;"&gt;(The default value is None)&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;meaning it would be "tag1, tag2, tag3" or (their wording is confusing) "tag1", "tag2", "tag3".&amp;nbsp; I do think their use of the word OR is off.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If it is the former, it is a comma separated string, so I presume that the parsing of the string follows standard python parsing syntax.&lt;/P&gt;&lt;P&gt;Give one a shot since I suspect not many people are doing what you want to do&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 06 Jul 2016 23:42:48 GMT</pubDate>
    <dc:creator>DanPatterson_Retired</dc:creator>
    <dc:date>2016-07-06T23:42:48Z</dc:date>
    <item>
      <title>arcpy.mp.CreateWebLayerSDDraft</title>
      <link>https://community.esri.com/t5/python-questions/arcpy-mp-createweblayersddraft/m-p/589707#M46220</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The documentation here: &lt;A href="http://pro.arcgis.com/en/pro-app/arcpy/mapping/createweblayersddraft.htm" title="http://pro.arcgis.com/en/pro-app/arcpy/mapping/createweblayersddraft.htm"&gt;CreateWebLayerSDDraft—ArcPy | ArcGIS for Desktop&lt;/A&gt; does not show samples of using this command with the optional parameters.&amp;nbsp; I am having no luck using any parameters beyond service_type.&amp;nbsp; The parameters seam to be ignored.&amp;nbsp; Though the draft is created successfully it goes in the default ArcGIS Online user folder and no description, summary etc. values make it to the published service listing.&amp;nbsp; Has anybody got good working examples using optional parameters?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 06 Jul 2016 22:53:55 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/arcpy-mp-createweblayersddraft/m-p/589707#M46220</guid>
      <dc:creator>ChetEgbert1</dc:creator>
      <dc:date>2016-07-06T22:53:55Z</dc:date>
    </item>
    <item>
      <title>Re: arcpy.mp.CreateWebLayerSDDraft</title>
      <link>https://community.esri.com/t5/python-questions/arcpy-mp-createweblayersddraft/m-p/589708#M46221</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;so did you move on to the other steps listed in the help topic?&lt;/P&gt;&lt;P&gt;These tools just permit automation of existing tools, sos there is some presumption that you already have everything ready to go, just like you would for doing the manual process.&amp;nbsp; It is recommended that you go through the workflow once at least manually to ensure that the whole workflow... which may require several tools... is what you want.&lt;/P&gt;&lt;P&gt;If you only have to do this infrequently, then there is little point bring arcpy into the equation at all. &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 06 Jul 2016 23:09:34 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/arcpy-mp-createweblayersddraft/m-p/589708#M46221</guid>
      <dc:creator>DanPatterson_Retired</dc:creator>
      <dc:date>2016-07-06T23:09:34Z</dc:date>
    </item>
    <item>
      <title>Re: arcpy.mp.CreateWebLayerSDDraft</title>
      <link>https://community.esri.com/t5/python-questions/arcpy-mp-createweblayersddraft/m-p/589709#M46222</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Calibri','sans-serif'; color: #1f497d;"&gt;Thanks for the reply.&amp;nbsp; The command works to prepare the draft.&amp;nbsp; I have successfully published the prepared draft using the arcpy StageService and UploadServiceDefinition commands.&amp;nbsp; The trouble is the CreateWebLayerSDDraft command does not pass on the summary, description, credits, and tags I specify.&amp;nbsp; It is as if I had not used them.&amp;nbsp; It also does not pay any mind to the folder I specify.&amp;nbsp; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Calibri','sans-serif'; color: #1f497d;"&gt;As a work around I have been able to get the draft published in the right ArcGIS Online folder and display description and tags using the upload and publish REST endpoint’s arguments.&amp;nbsp; I have not been able to find a way to get summary and credits populated, however, as they are not exposed on these endpoints. &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Calibri','sans-serif'; color: #1f497d;"&gt;Ideally I could just automate the population of the ArcGIS Pro's Map's Properties/Metadata panel.&amp;nbsp; It seams that what you put there always winds up in the right place on the ArcGIS Online published service's pages.&amp;nbsp; I can't find an API to populate those ArcGIS Pro Map fields.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Calibri','sans-serif'; color: #1f497d;"&gt;An ESRI tech recommends that the summary, description, tags, and credits be specified as follows:&amp;nbsp; summary='mysum', description='mydesc' etc which is not immediately apparent in the documentation as there is no example of optional parameter usage.&amp;nbsp; I can't get that to work either from pasting code into ArcGIS Pro's Python window.&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 06 Jul 2016 23:35:44 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/arcpy-mp-createweblayersddraft/m-p/589709#M46222</guid>
      <dc:creator>ChetEgbert1</dc:creator>
      <dc:date>2016-07-06T23:35:44Z</dc:date>
    </item>
    <item>
      <title>Re: arcpy.mp.CreateWebLayerSDDraft</title>
      <link>https://community.esri.com/t5/python-questions/arcpy-mp-createweblayersddraft/m-p/589710#M46223</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;But the description for the tool gives the requirements for the parameters, for example&lt;/P&gt;&lt;TABLE class="arcpyclass_paramtbl" style="margin-bottom: 1.5em; font-size: 0.875em; font-family: 'Lucida Grande', 'Segoe UI', Arial, sans-serif; background-color: white; border: 1px solid #dddddd; color: #4d4d4d;"&gt;&lt;TBODY&gt;&lt;TR style="border-bottom-width: 1px; border-bottom-color: #dddddd;"&gt;&lt;TD style="border-left-width: 1px; border-left-style: solid; border-left-color: #dddddd; border-right-width: 1px; border-right-style: solid; border-right-color: #dddddd; padding: 12px;"&gt;&lt;P&gt;tags&lt;/P&gt;&lt;/TD&gt;&lt;TD style="border-left-width: 1px; border-left-style: solid; border-left-color: #dddddd; border-right-width: 1px; border-right-style: solid; border-right-color: #dddddd; padding: 12px;"&gt;&lt;P style="font-size: 0.875rem;"&gt;A string that represents the tags. Multiple tags can be added or separated by a comma or semicolon.&lt;/P&gt;&lt;P style="font-size: 0.875rem; margin-top: 1.71429em;"&gt;(The default value is None)&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;meaning it would be "tag1, tag2, tag3" or (their wording is confusing) "tag1", "tag2", "tag3".&amp;nbsp; I do think their use of the word OR is off.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If it is the former, it is a comma separated string, so I presume that the parsing of the string follows standard python parsing syntax.&lt;/P&gt;&lt;P&gt;Give one a shot since I suspect not many people are doing what you want to do&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 06 Jul 2016 23:42:48 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/arcpy-mp-createweblayersddraft/m-p/589710#M46223</guid>
      <dc:creator>DanPatterson_Retired</dc:creator>
      <dc:date>2016-07-06T23:42:48Z</dc:date>
    </item>
    <item>
      <title>Re: arcpy.mp.CreateWebLayerSDDraft</title>
      <link>https://community.esri.com/t5/python-questions/arcpy-mp-createweblayersddraft/m-p/589711#M46224</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Chet,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here is a snippet of the command using the optional parameters that I use:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt; arcpy.mp.CreateWebLayerSDDraft(m, draft_sd, service_name, 'MY_HOSTED_SERVICES', 'FEATURE_ACCESS', folder_name, enable_editing = edit_enabled, allow_exporting = export_enabled, summary=itemsummary, tags = itemtags, credits = itemcredits, use_limitations = itemuselimits)&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I run into the same issue that it does not update the tags and some other information of the SD file on the item details page, as I would expect. Curiously, if you&amp;nbsp;view the metadata for the SD item from the item details page it appears to update some items like the tags and credit information do get updated. &amp;nbsp;For some reason, those updates are not carried over to the item details page. &amp;nbsp;Bug?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I used the ArcGIS API for Python to update the item information on the published feature service. &amp;nbsp;Might be worth taking a look at.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A class="link-titled" href="https://developers.arcgis.com/python/" title="https://developers.arcgis.com/python/"&gt;ArcGIS API for Python | ArcGIS for Developers&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Leon&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 10 Mar 2017 18:33:12 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/arcpy-mp-createweblayersddraft/m-p/589711#M46224</guid>
      <dc:creator>LeonS</dc:creator>
      <dc:date>2017-03-10T18:33:12Z</dc:date>
    </item>
    <item>
      <title>Re: arcpy.mp.CreateWebLayerSDDraft</title>
      <link>https://community.esri.com/t5/python-questions/arcpy-mp-createweblayersddraft/m-p/589712#M46225</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I also have the same issue. The tool populates the use limitations on the item details page but none of the other parameters that I have specified (summary, description, tags, etc). Additionally, the overwrite existing service parameters works when I run the tool on my test feature service. However, when I run it on my working feature service, I get an error that "User can't overwrite this service, using this data, as this data is already referring to another service." The only thing I changed in my Python code was the name of the test feature service to the working feature service. It definitely seems buggy to me.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 10 Mar 2020 16:18:35 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/arcpy-mp-createweblayersddraft/m-p/589712#M46225</guid>
      <dc:creator>MollyWatson1</dc:creator>
      <dc:date>2020-03-10T16:18:35Z</dc:date>
    </item>
    <item>
      <title>Re: arcpy.mp.CreateWebLayerSDDraft</title>
      <link>https://community.esri.com/t5/python-questions/arcpy-mp-createweblayersddraft/m-p/589713#M46226</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I understand metadata a little better now.&amp;nbsp; There are three kinds of metadata.&amp;nbsp; There is the metadata that describes a map, an ArcGIS project.&amp;nbsp; There is metadata that describes a layer, as in layerfile.&amp;nbsp; There is metadata that describes a datasource, the original standard GIS dataset metadata.&amp;nbsp; Components from these types of metadata wind up on AGOL Feature services which may have many Feature layers within them.&amp;nbsp; Each Feature layer indexed within a Feature service represents an original GIS dataset.&amp;nbsp; ESRI should provide a good crosswalk to document metadata and distinguish source to destination of each important metadata component through the publishing process. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My most recent publishing routine captures metadata components satisfactorily.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;First I add a datasource to ArcGIS Pro. On the Layer Properties' Metadata panel notice the 'Copy data source's metadata to this layer' button.&amp;nbsp; If you click this button many fields of metadata on the datasource will transfer to the layerfile.&amp;nbsp; I save the layerfile after clicking this button.&amp;nbsp; It seams the layerfile is an important carrier of metadata components through the publishing process.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I then use getWebLayerSharingDraft, exportToSDDraft, and StageService to prepare the package.&lt;/P&gt;&lt;P&gt;Finally, I use REST url to upload and publish:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="https://&amp;quot;+g_Portal+&amp;quot;/sharing/rest/content/users/bios_admin/addItem"&gt;https://"+g_Portal+"/sharing/rest/content/users/&amp;lt;user&amp;gt;/addItem&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="https://&amp;quot;+g_Portal+&amp;quot;/sharing/rest/content/users/bios_admin/publish"&gt;https://"+g_Portal+"/sharing/rest/content/users/&amp;lt;user&amp;gt;/publish&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 10 Mar 2020 18:26:05 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/arcpy-mp-createweblayersddraft/m-p/589713#M46226</guid>
      <dc:creator>ChetEgbert1</dc:creator>
      <dc:date>2020-03-10T18:26:05Z</dc:date>
    </item>
    <item>
      <title>Re: arcpy.mp.CreateWebLayerSDDraft</title>
      <link>https://community.esri.com/t5/python-questions/arcpy-mp-createweblayersddraft/m-p/589714#M46227</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I'm having the same issue, but&amp;nbsp;with the "enable_editing" parameter.&amp;nbsp; Even though I have it set to true (my code is below), it seems to ignore that setting, as it does not allow editing.&amp;nbsp; When I publish the feature layer manually, editing works fine.&amp;nbsp; Any ideas?&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;arcpy.mp.CreateWebLayerSDDraft(&lt;SPAN style="color: #aa4926;"&gt;map_or_layers&lt;/SPAN&gt;=mp&lt;SPAN style="color: #cc7832;"&gt;,
&lt;/SPAN&gt;&lt;SPAN style="color: #cc7832;"&gt;                                   &lt;/SPAN&gt;&lt;SPAN style="color: #aa4926;"&gt;out_sddraft&lt;/SPAN&gt;=sddraft&lt;SPAN style="color: #cc7832;"&gt;,
&lt;/SPAN&gt;&lt;SPAN style="color: #cc7832;"&gt;                                   &lt;/SPAN&gt;&lt;SPAN style="color: #aa4926;"&gt;service_name&lt;/SPAN&gt;=sd_fs_name&lt;SPAN style="color: #cc7832;"&gt;,
&lt;/SPAN&gt;&lt;SPAN style="color: #cc7832;"&gt;                                   &lt;/SPAN&gt;&lt;SPAN style="color: #aa4926;"&gt;server_type&lt;/SPAN&gt;=&lt;SPAN style="color: #6a8759;"&gt;"MY_HOSTED_SERVICES"&lt;/SPAN&gt;&lt;SPAN style="color: #cc7832;"&gt;,
&lt;/SPAN&gt;&lt;SPAN style="color: #cc7832;"&gt;                                   &lt;/SPAN&gt;&lt;SPAN style="color: #aa4926;"&gt;service_type&lt;/SPAN&gt;=&lt;SPAN style="color: #6a8759;"&gt;"FEATURE_ACCESS"&lt;/SPAN&gt;&lt;SPAN style="color: #cc7832;"&gt;,
&lt;/SPAN&gt;&lt;SPAN style="color: #cc7832;"&gt;                                   &lt;/SPAN&gt;&lt;SPAN style="color: #aa4926;"&gt;folder_name&lt;/SPAN&gt;=&lt;SPAN style="color: #6a8759;"&gt;"JULIE_FOLDER"&lt;/SPAN&gt;&lt;SPAN style="color: #cc7832;"&gt;,
&lt;/SPAN&gt;&lt;SPAN style="color: #cc7832;"&gt;                                   &lt;/SPAN&gt;&lt;SPAN style="color: #aa4926;"&gt;overwrite_existing_service&lt;/SPAN&gt;=&lt;SPAN style="color: #cc7832;"&gt;True,
&lt;/SPAN&gt;&lt;SPAN style="color: #cc7832;"&gt;                                   &lt;/SPAN&gt;&lt;SPAN style="color: #aa4926;"&gt;copy_data_to_server&lt;/SPAN&gt;=&lt;SPAN style="color: #cc7832;"&gt;False,
&lt;/SPAN&gt;&lt;SPAN style="color: #cc7832;"&gt;                                   &lt;/SPAN&gt;&lt;SPAN style="color: #aa4926;"&gt;enable_editing&lt;/SPAN&gt;=&lt;SPAN style="color: #cc7832;"&gt;True,
&lt;/SPAN&gt;&lt;SPAN style="color: #cc7832;"&gt;                                   &lt;/SPAN&gt;&lt;SPAN style="color: #aa4926;"&gt;allow_exporting&lt;/SPAN&gt;=&lt;SPAN style="color: #cc7832;"&gt;False,
&lt;/SPAN&gt;&lt;SPAN style="color: #cc7832;"&gt;                                   &lt;/SPAN&gt;&lt;SPAN style="color: #aa4926;"&gt;enable_sync&lt;/SPAN&gt;=&lt;SPAN style="color: #cc7832;"&gt;False,
&lt;/SPAN&gt;&lt;SPAN style="color: #cc7832;"&gt;                                   &lt;/SPAN&gt;&lt;SPAN style="color: #aa4926;"&gt;summary&lt;/SPAN&gt;=&lt;SPAN style="color: #cc7832;"&gt;None,
&lt;/SPAN&gt;&lt;SPAN style="color: #cc7832;"&gt;                                   &lt;/SPAN&gt;&lt;SPAN style="color: #aa4926;"&gt;tags&lt;/SPAN&gt;=&lt;SPAN style="color: #cc7832;"&gt;None,
&lt;/SPAN&gt;&lt;SPAN style="color: #cc7832;"&gt;                                   &lt;/SPAN&gt;&lt;SPAN style="color: #aa4926;"&gt;description&lt;/SPAN&gt;=&lt;SPAN style="color: #cc7832;"&gt;None,
&lt;/SPAN&gt;&lt;SPAN style="color: #cc7832;"&gt;                                   &lt;/SPAN&gt;&lt;SPAN style="color: #aa4926;"&gt;credits&lt;/SPAN&gt;=&lt;SPAN style="color: #cc7832;"&gt;None,
&lt;/SPAN&gt;&lt;SPAN style="color: #cc7832;"&gt;                                   &lt;/SPAN&gt;&lt;SPAN style="color: #aa4926;"&gt;use_limitations&lt;/SPAN&gt;=&lt;SPAN style="color: #cc7832;"&gt;None&lt;/SPAN&gt;)&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 12 Dec 2021 01:19:58 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/arcpy-mp-createweblayersddraft/m-p/589714#M46227</guid>
      <dc:creator>DougEaton</dc:creator>
      <dc:date>2021-12-12T01:19:58Z</dc:date>
    </item>
    <item>
      <title>Re: arcpy.mp.CreateWebLayerSDDraft</title>
      <link>https://community.esri.com/t5/python-questions/arcpy-mp-createweblayersddraft/m-p/589715#M46228</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Doug,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I was having a similar issue where sometimes my script would overwrite and sometimes it wouldn't. I contacted ESRI technical support and we figured out that the CreateWebLayerSDDraft tool is actually old and has been replaced with a newer tool - WebLayerSharingDraft.&amp;nbsp; After I switched to that tool, my issues were resolved. I also use a list to loop through all of my content to ensure I have a correct match with the feature service name. That also seemed to help resolve my issues. Here's a snippet of my code:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;# Create a new SDDraft and stage to SD for summary data&lt;BR /&gt;print("Creating SD file")&lt;BR /&gt;sharing_draft = mp.getWebLayerSharingDraft("HOSTING_SERVER", "FEATURE", sd_fs_name)&lt;BR /&gt;sharing_draft.summary = "My Summary"&lt;BR /&gt;sharing_draft.tags = "My tags"&lt;BR /&gt;sharing_draft.description = "My description"&lt;BR /&gt;sharing_draft.credits = "My credits"&lt;BR /&gt;sharing_draft.use = "My disclaimer"&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;# Create Service Definition Draft file&lt;BR /&gt;sharing_draft.exportToSDDraft(sddraft)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;# Stage Service&lt;BR /&gt;arcpy.StageService_server(sddraft, sd)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;print("Connecting to {}".format(portal))&lt;BR /&gt;gis = GIS(portal, user, password)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;#Check that it found the correct layer&lt;BR /&gt;list = gis.content.search(query=sd_fs_name,item_type="Service Definition")&lt;BR /&gt;i = 0&lt;BR /&gt;while list&lt;I&gt;.title != sd_fs_name:&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;i += 1&lt;BR /&gt;print("")&lt;BR /&gt;print('MATCH FOUND!')&lt;BR /&gt;print(f'item&lt;I&gt;.title = {list&lt;I&gt;.title}, sd_fs_name = {sd_fs_name}')&lt;BR /&gt;item = list&lt;I&gt; # define item based on above findings&lt;BR /&gt;item.update(data=sd) # use sd to update hosted "Service Definition" file&lt;BR /&gt;print("Overwriting existing feature service")&lt;BR /&gt;fs = item.publish(overwrite=True) # publish "Service Definition"&lt;/I&gt;&lt;/I&gt;&lt;/I&gt;&lt;/I&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;# Update Sharing&lt;BR /&gt;if shrOrg or shrEveryone or shrGroups:&lt;BR /&gt;&amp;nbsp; &amp;nbsp; print("Setting sharing options")&lt;BR /&gt;&amp;nbsp; &amp;nbsp; fs.share(org=shrOrg, everyone=shrEveryone, groups=shrGroups)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 31 Jul 2020 14:44:48 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/arcpy-mp-createweblayersddraft/m-p/589715#M46228</guid>
      <dc:creator>MollyWatson1</dc:creator>
      <dc:date>2020-07-31T14:44:48Z</dc:date>
    </item>
    <item>
      <title>Re: arcpy.mp.CreateWebLayerSDDraft</title>
      <link>https://community.esri.com/t5/python-questions/arcpy-mp-createweblayersddraft/m-p/589716#M46229</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Molly,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you very much.&amp;nbsp; I will try that tool instead and I like the idea of looping through the content to ensure a correct match with the feature service name as well.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Doug&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 31 Jul 2020 15:02:03 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/arcpy-mp-createweblayersddraft/m-p/589716#M46229</guid>
      <dc:creator>DougEaton</dc:creator>
      <dc:date>2020-07-31T15:02:03Z</dc:date>
    </item>
    <item>
      <title>Re: arcpy.mp.CreateWebLayerSDDraft</title>
      <link>https://community.esri.com/t5/python-questions/arcpy-mp-createweblayersddraft/m-p/589717#M46230</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Molly,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Could you please share a link to the ESRI technical documentation for the tool&amp;nbsp;&lt;SPAN style="font-size: 10.5pt; color: #666666;"&gt;WebLayerSharingDraft that you referred to?&amp;nbsp; I've done some searches and found similar tools, but not that particular one.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10.5pt; color: #666666;"&gt;Thanks,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10.5pt; color: #666666;"&gt;Doug&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 03 Aug 2020 14:03:13 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/arcpy-mp-createweblayersddraft/m-p/589717#M46230</guid>
      <dc:creator>DougEaton</dc:creator>
      <dc:date>2020-08-03T14:03:13Z</dc:date>
    </item>
    <item>
      <title>Re: arcpy.mp.CreateWebLayerSDDraft</title>
      <link>https://community.esri.com/t5/python-questions/arcpy-mp-createweblayersddraft/m-p/589718#M46231</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Doug,&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;This article references that the CreateWebLayerSDDraft tool is now a legacy tool and has been replaced by arcpy.sharing module:&amp;nbsp;&lt;A class="link-titled" href="https://pro.arcgis.com/en/pro-app/arcpy/mapping/createweblayersddraft.htm" title="https://pro.arcgis.com/en/pro-app/arcpy/mapping/createweblayersddraft.htm"&gt;CreateWebLayerSDDraft—ArcGIS Pro | Documentation&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This article gives a python example of how to use the arcpy.sharing module to share a feature service:&amp;nbsp;&lt;A class="link-titled" href="https://pro.arcgis.com/en/pro-app/arcpy/sharing/featuresharingdraft-class.htm" title="https://pro.arcgis.com/en/pro-app/arcpy/sharing/featuresharingdraft-class.htm"&gt;FeatureSharingDraft—ArcGIS Pro | Documentation&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Good luck!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 03 Aug 2020 15:39:25 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/arcpy-mp-createweblayersddraft/m-p/589718#M46231</guid>
      <dc:creator>MollyWatson1</dc:creator>
      <dc:date>2020-08-03T15:39:25Z</dc:date>
    </item>
  </channel>
</rss>

