<?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: How to change the ArcGIS Server web server certificate using ArcGIS API for Python in ArcGIS API for Python Questions</title>
    <link>https://community.esri.com/t5/arcgis-api-for-python-questions/how-to-change-the-arcgis-server-web-server/m-p/1351350#M9312</link>
    <description>&lt;P&gt;Hello&amp;nbsp;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/529827"&gt;@DanaNajeeb&lt;/a&gt;&amp;nbsp;,&lt;BR /&gt;&lt;BR /&gt;Did you manage changing the server certificate alias via API for Python?&amp;nbsp;&lt;BR /&gt;I successfully automated it using a curl command inside a Python script:&lt;/P&gt;&lt;PRE&gt;curl_command = &lt;SPAN&gt;'C:\Windows\System32\curl.exe -s -X POST "https://'&lt;/SPAN&gt;+server+&lt;SPAN&gt;':6443/arcgis/admin/machines/'&lt;/SPAN&gt;+server.upper()+&lt;SPAN&gt;'/edit" -H "Host: '&lt;/SPAN&gt;+server.upper()+&lt;SPAN&gt;'" -H "Content-Type: application/x-www-form-urlencoded" --data-urlencode "adminURL=https://'&lt;/SPAN&gt;+server.upper()+&lt;SPAN&gt;':6443/arcgis/admin" --data-urlencode "machineName='&lt;/SPAN&gt;+server.upper()+&lt;SPAN&gt;'" --data-urlencode "webServerMaxHeapSize=-1" --data-urlencode "webServerCertificateAlias=certificate" --data-urlencode "socMaxHeapSize=64" --data-urlencode "underMaintenance=false" --data-urlencode "f=json" --data-urlencode token='&lt;/SPAN&gt;+&lt;SPAN&gt;'"'&lt;/SPAN&gt;+&lt;SPAN&gt;str&lt;/SPAN&gt;(token)+&lt;SPAN&gt;'"'&lt;/SPAN&gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Mon, 20 Nov 2023 08:34:16 GMT</pubDate>
    <dc:creator>Felipe_Costa</dc:creator>
    <dc:date>2023-11-20T08:34:16Z</dc:date>
    <item>
      <title>How to change the ArcGIS Server web server certificate using ArcGIS API for Python</title>
      <link>https://community.esri.com/t5/arcgis-api-for-python-questions/how-to-change-the-arcgis-server-web-server/m-p/1239580#M8139</link>
      <description>&lt;P&gt;&lt;SPAN class=""&gt;Hello,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class=""&gt;I'm trying to update the web server SSL certificate for ArcGIS Server using ArcGIS API for Python.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class=""&gt;I was able to do that for Portal for ArcGIS as shown below:&lt;/SPAN&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="portalcert.PNG" style="width: 694px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/58098i1E9CB114B995733B/image-size/large?v=v2&amp;amp;px=999" role="button" title="portalcert.PNG" alt="portalcert.PNG" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class=""&gt;I was also able to import the certificate to ArcGIS Server as shown below:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class=""&gt;&amp;nbsp;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="ags.PNG" style="width: 808px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/58278i015CB64AFB689789/image-size/large?v=v2&amp;amp;px=999" role="button" title="ags.PNG" alt="ags.PNG" /&gt;&lt;/span&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class=""&gt;However, I can't find any documentation about updating the Web Server SSL certificate for ArcGIS Server.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class=""&gt;Please note that I tried the following:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class=""&gt;I seem to have been able to update the Web server certificate, however, it doesn't seem to persist for some reason:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class=""&gt;&amp;nbsp;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="updatecert.PNG" style="width: 667px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/58103i75263150E3BC7423/image-size/large?v=v2&amp;amp;px=999" role="button" title="updatecert.PNG" alt="updatecert.PNG" /&gt;&lt;/span&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class=""&gt;The result of the first loop is the changed certificate:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class=""&gt;&amp;nbsp;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="firstloop.PNG" style="width: 581px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/58100i5BD034A314FC2784/image-size/large?v=v2&amp;amp;px=999" role="button" title="firstloop.PNG" alt="firstloop.PNG" /&gt;&lt;/span&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class=""&gt;However, when the loop finishes, it seems to be reverted back to the previous certificate, as this is the result of the second loop:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class=""&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="secondloop.PNG" style="width: 604px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/58105iDD415AF6D56E76D1/image-size/large?v=v2&amp;amp;px=999" role="button" title="secondloop.PNG" alt="secondloop.PNG" /&gt;&lt;/span&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class=""&gt;Please note that I restarted the ArcGIS Server service.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class=""&gt;Any help would be appreciated!&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 12 Dec 2022 13:49:55 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-python-questions/how-to-change-the-arcgis-server-web-server/m-p/1239580#M8139</guid>
      <dc:creator>DanaNajeeb</dc:creator>
      <dc:date>2022-12-12T13:49:55Z</dc:date>
    </item>
    <item>
      <title>Re: How to change the ArcGIS Server web server certificate using ArcGIS API for Python</title>
      <link>https://community.esri.com/t5/arcgis-api-for-python-questions/how-to-change-the-arcgis-server-web-server/m-p/1351350#M9312</link>
      <description>&lt;P&gt;Hello&amp;nbsp;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/529827"&gt;@DanaNajeeb&lt;/a&gt;&amp;nbsp;,&lt;BR /&gt;&lt;BR /&gt;Did you manage changing the server certificate alias via API for Python?&amp;nbsp;&lt;BR /&gt;I successfully automated it using a curl command inside a Python script:&lt;/P&gt;&lt;PRE&gt;curl_command = &lt;SPAN&gt;'C:\Windows\System32\curl.exe -s -X POST "https://'&lt;/SPAN&gt;+server+&lt;SPAN&gt;':6443/arcgis/admin/machines/'&lt;/SPAN&gt;+server.upper()+&lt;SPAN&gt;'/edit" -H "Host: '&lt;/SPAN&gt;+server.upper()+&lt;SPAN&gt;'" -H "Content-Type: application/x-www-form-urlencoded" --data-urlencode "adminURL=https://'&lt;/SPAN&gt;+server.upper()+&lt;SPAN&gt;':6443/arcgis/admin" --data-urlencode "machineName='&lt;/SPAN&gt;+server.upper()+&lt;SPAN&gt;'" --data-urlencode "webServerMaxHeapSize=-1" --data-urlencode "webServerCertificateAlias=certificate" --data-urlencode "socMaxHeapSize=64" --data-urlencode "underMaintenance=false" --data-urlencode "f=json" --data-urlencode token='&lt;/SPAN&gt;+&lt;SPAN&gt;'"'&lt;/SPAN&gt;+&lt;SPAN&gt;str&lt;/SPAN&gt;(token)+&lt;SPAN&gt;'"'&lt;/SPAN&gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 20 Nov 2023 08:34:16 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-python-questions/how-to-change-the-arcgis-server-web-server/m-p/1351350#M9312</guid>
      <dc:creator>Felipe_Costa</dc:creator>
      <dc:date>2023-11-20T08:34:16Z</dc:date>
    </item>
  </channel>
</rss>

