<?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 Overwrite REST Service to protected Folder in ArcGIS REST APIs and Services Questions</title>
    <link>https://community.esri.com/t5/arcgis-rest-apis-and-services-questions/overwrite-rest-service-to-protected-folder/m-p/1202400#M4242</link>
    <description>&lt;P class=""&gt;&lt;FONT size="2"&gt;Trying to write a python script to overwrite a REST service under a specific folder. Does anyone know where or what I need to add if I want to overwrite my service to a specific, password protected folder on my ArcServer? I've tried to have my target_server_connection with the folder I want to add to it as "&lt;A href="https://myorganization/rest/services/protectedfolder" target="_blank" rel="noopener"&gt;https://myorganization/rest/services/protectedfolder&lt;/A&gt;"&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;but it just keeps adding to the overall rest inventory.&lt;/FONT&gt;&lt;/P&gt;&lt;P class=""&gt;(Code Snippet)&lt;/P&gt;&lt;P class=""&gt;&lt;FONT size="2"&gt;# Create MapServiceDraft and set overwrite property&lt;/FONT&gt;&lt;/P&gt;&lt;P class=""&gt;&lt;FONT size="2"&gt;target_server_connection = r"&lt;A href="https://myorganization/rest/services/" target="_blank" rel="noopener"&gt;https://myorganization/rest/services/&lt;/A&gt;"&lt;/FONT&gt;&lt;/P&gt;&lt;P class=""&gt;&lt;FONT size="2"&gt;sddraft = arcpy.sharing.CreateSharingDraft("STANDALONE_SERVER", "MapService", service_name, m)&lt;/FONT&gt;&lt;/P&gt;&lt;P class=""&gt;&lt;FONT size="2"&gt;sddraft.targetServer = target_server_connection&lt;/FONT&gt;&lt;/P&gt;&lt;P class=""&gt;&lt;FONT size="2"&gt;sddraft.overwriteExistingService = True&lt;/FONT&gt;&lt;/P&gt;&lt;P class=""&gt;Like I mentioned, the code runs smooth, but I'm just trying to password protect this data behind a folder. Any suggestions are greatly appreciated!&lt;/P&gt;</description>
    <pubDate>Fri, 12 Aug 2022 15:05:03 GMT</pubDate>
    <dc:creator>Rice_GIS</dc:creator>
    <dc:date>2022-08-12T15:05:03Z</dc:date>
    <item>
      <title>Overwrite REST Service to protected Folder</title>
      <link>https://community.esri.com/t5/arcgis-rest-apis-and-services-questions/overwrite-rest-service-to-protected-folder/m-p/1202400#M4242</link>
      <description>&lt;P class=""&gt;&lt;FONT size="2"&gt;Trying to write a python script to overwrite a REST service under a specific folder. Does anyone know where or what I need to add if I want to overwrite my service to a specific, password protected folder on my ArcServer? I've tried to have my target_server_connection with the folder I want to add to it as "&lt;A href="https://myorganization/rest/services/protectedfolder" target="_blank" rel="noopener"&gt;https://myorganization/rest/services/protectedfolder&lt;/A&gt;"&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;but it just keeps adding to the overall rest inventory.&lt;/FONT&gt;&lt;/P&gt;&lt;P class=""&gt;(Code Snippet)&lt;/P&gt;&lt;P class=""&gt;&lt;FONT size="2"&gt;# Create MapServiceDraft and set overwrite property&lt;/FONT&gt;&lt;/P&gt;&lt;P class=""&gt;&lt;FONT size="2"&gt;target_server_connection = r"&lt;A href="https://myorganization/rest/services/" target="_blank" rel="noopener"&gt;https://myorganization/rest/services/&lt;/A&gt;"&lt;/FONT&gt;&lt;/P&gt;&lt;P class=""&gt;&lt;FONT size="2"&gt;sddraft = arcpy.sharing.CreateSharingDraft("STANDALONE_SERVER", "MapService", service_name, m)&lt;/FONT&gt;&lt;/P&gt;&lt;P class=""&gt;&lt;FONT size="2"&gt;sddraft.targetServer = target_server_connection&lt;/FONT&gt;&lt;/P&gt;&lt;P class=""&gt;&lt;FONT size="2"&gt;sddraft.overwriteExistingService = True&lt;/FONT&gt;&lt;/P&gt;&lt;P class=""&gt;Like I mentioned, the code runs smooth, but I'm just trying to password protect this data behind a folder. Any suggestions are greatly appreciated!&lt;/P&gt;</description>
      <pubDate>Fri, 12 Aug 2022 15:05:03 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-rest-apis-and-services-questions/overwrite-rest-service-to-protected-folder/m-p/1202400#M4242</guid>
      <dc:creator>Rice_GIS</dc:creator>
      <dc:date>2022-08-12T15:05:03Z</dc:date>
    </item>
  </channel>
</rss>

