<?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 Enable custom capabilities on a mapservice in Python Questions</title>
    <link>https://community.esri.com/t5/python-questions/enable-custom-capabilities-on-a-mapservice/m-p/337858#M26500</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have my own scripts to upload and register SOEs (based on this &lt;A href="http://www.arcgis.com/home/item.html?id=12dde73e0e784e47818162b4d41ee340"&gt;toolkit&lt;/A&gt;) and to change properties and add capabilities to services both editing the sddraft (as shown &lt;A href="http://resources.arcgis.com/en/help/main/10.1/index.html#/CreateMapSDDraft/00s30000006q000000/"&gt;here&lt;/A&gt;) and editing services once they are already published (based on &lt;A href="http://resources.arcgis.com/en/help/main/10.1/index.html#/Example_Edit_service_properties/0154000005r4000000/"&gt;this&lt;/A&gt; with some extra code to edit capabilities). Everything works except that I cannot enable on mapservices the new capabilities I added when registering custom SOEs.&lt;/P&gt;&lt;P&gt;The standard capability definitions are automatically added to sddraft files, therefore it's pretty easy to edit the sddraft to enable them. But what if I want to add some custom capabilities to the service? This does not seem the way to go.&lt;/P&gt;&lt;P&gt;Using common sense I thought that editing the published mapservice using the ArcGIS Server Administrator API would be the way to do it but, just like with sddraft files, in &lt;CODE&gt;&lt;SPAN class="c"&gt;&lt;/SPAN&gt;&lt;/CODE&gt;the JSON definition of the service, under 'extensions', there's no 'TypeName' with the name of any of my new extensions.&lt;/P&gt;&lt;P&gt;If I enable my custom capabilities on a mapservice from the Manager and use my script again, the JSON definition of the service now includes all my extensions and (as expected) they are enabled. I disable all of them again and run my script for the second time and&amp;nbsp; they are still there and disabled (as expected). So custom capability definitions are not added by default to the JSON definition of services. Ok, so what should I do?&lt;/P&gt;&lt;P&gt;For example, my PrintUtils extension looks like this (see below) in the JSON definition of one service (once I enabled it from the Manager). Should I add this in the JSON definition of each service? Do custom extension always have those same tags? I want to use my script to enable ANY custom extension any admin user may have registered with the server.&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; font-family: arial,helvetica,sans-serif;"&gt;&lt;STRONG&gt; ...&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; font-family: arial,helvetica,sans-serif;"&gt;&lt;STRONG&gt;"extensions": [ &lt;/STRONG&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-size: 10pt; font-family: arial,helvetica,sans-serif;"&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp; { &lt;/STRONG&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-size: 10pt; font-family: arial,helvetica,sans-serif;"&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; "typeName": "PrintUtils", &lt;/STRONG&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-size: 10pt; font-family: arial,helvetica,sans-serif;"&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; "enabled": "true", &lt;/STRONG&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-size: 10pt; font-family: arial,helvetica,sans-serif;"&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; "maxUploadedFileSize": 0, &lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;TABLE height="0" style="width: 0px; height: 0px;" width="0"&gt;&lt;TBODY&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; font-family: arial,helvetica,sans-serif;"&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; "allowedUploadFileTypes": "",&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; font-family: arial,helvetica,sans-serif;"&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; "capabilities": "", &lt;/STRONG&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-size: 10pt; font-family: arial,helvetica,sans-serif;"&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; "properties": { &lt;/STRONG&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-size: 10pt; font-family: arial,helvetica,sans-serif;"&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; "supportsSOAP": "false", &lt;/STRONG&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-size: 10pt; font-family: arial,helvetica,sans-serif;"&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; "supportsREST": "true"&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-size: 10pt; font-family: arial,helvetica,sans-serif;"&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; } &lt;/STRONG&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-size: 10pt; font-family: arial,helvetica,sans-serif;"&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; }, &lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; font-family: arial,helvetica,sans-serif;"&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; font-family: arial,helvetica,sans-serif;"&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; *some other extension*&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; font-family: arial,helvetica,sans-serif;"&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; font-family: arial,helvetica,sans-serif;"&gt;&lt;STRONG&gt;], &lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; font-family: arial,helvetica,sans-serif;"&gt;&lt;STRONG&gt;...&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-size: 10pt; font-family: arial,helvetica,sans-serif;"&gt;&lt;STRONG&gt; } &lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 13 Jul 2016 09:51:50 GMT</pubDate>
    <dc:creator>AleydisG__Pere</dc:creator>
    <dc:date>2016-07-13T09:51:50Z</dc:date>
    <item>
      <title>Enable custom capabilities on a mapservice</title>
      <link>https://community.esri.com/t5/python-questions/enable-custom-capabilities-on-a-mapservice/m-p/337858#M26500</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have my own scripts to upload and register SOEs (based on this &lt;A href="http://www.arcgis.com/home/item.html?id=12dde73e0e784e47818162b4d41ee340"&gt;toolkit&lt;/A&gt;) and to change properties and add capabilities to services both editing the sddraft (as shown &lt;A href="http://resources.arcgis.com/en/help/main/10.1/index.html#/CreateMapSDDraft/00s30000006q000000/"&gt;here&lt;/A&gt;) and editing services once they are already published (based on &lt;A href="http://resources.arcgis.com/en/help/main/10.1/index.html#/Example_Edit_service_properties/0154000005r4000000/"&gt;this&lt;/A&gt; with some extra code to edit capabilities). Everything works except that I cannot enable on mapservices the new capabilities I added when registering custom SOEs.&lt;/P&gt;&lt;P&gt;The standard capability definitions are automatically added to sddraft files, therefore it's pretty easy to edit the sddraft to enable them. But what if I want to add some custom capabilities to the service? This does not seem the way to go.&lt;/P&gt;&lt;P&gt;Using common sense I thought that editing the published mapservice using the ArcGIS Server Administrator API would be the way to do it but, just like with sddraft files, in &lt;CODE&gt;&lt;SPAN class="c"&gt;&lt;/SPAN&gt;&lt;/CODE&gt;the JSON definition of the service, under 'extensions', there's no 'TypeName' with the name of any of my new extensions.&lt;/P&gt;&lt;P&gt;If I enable my custom capabilities on a mapservice from the Manager and use my script again, the JSON definition of the service now includes all my extensions and (as expected) they are enabled. I disable all of them again and run my script for the second time and&amp;nbsp; they are still there and disabled (as expected). So custom capability definitions are not added by default to the JSON definition of services. Ok, so what should I do?&lt;/P&gt;&lt;P&gt;For example, my PrintUtils extension looks like this (see below) in the JSON definition of one service (once I enabled it from the Manager). Should I add this in the JSON definition of each service? Do custom extension always have those same tags? I want to use my script to enable ANY custom extension any admin user may have registered with the server.&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; font-family: arial,helvetica,sans-serif;"&gt;&lt;STRONG&gt; ...&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; font-family: arial,helvetica,sans-serif;"&gt;&lt;STRONG&gt;"extensions": [ &lt;/STRONG&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-size: 10pt; font-family: arial,helvetica,sans-serif;"&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp; { &lt;/STRONG&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-size: 10pt; font-family: arial,helvetica,sans-serif;"&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; "typeName": "PrintUtils", &lt;/STRONG&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-size: 10pt; font-family: arial,helvetica,sans-serif;"&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; "enabled": "true", &lt;/STRONG&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-size: 10pt; font-family: arial,helvetica,sans-serif;"&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; "maxUploadedFileSize": 0, &lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;TABLE height="0" style="width: 0px; height: 0px;" width="0"&gt;&lt;TBODY&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; font-family: arial,helvetica,sans-serif;"&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; "allowedUploadFileTypes": "",&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; font-family: arial,helvetica,sans-serif;"&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; "capabilities": "", &lt;/STRONG&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-size: 10pt; font-family: arial,helvetica,sans-serif;"&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; "properties": { &lt;/STRONG&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-size: 10pt; font-family: arial,helvetica,sans-serif;"&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; "supportsSOAP": "false", &lt;/STRONG&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-size: 10pt; font-family: arial,helvetica,sans-serif;"&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; "supportsREST": "true"&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-size: 10pt; font-family: arial,helvetica,sans-serif;"&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; } &lt;/STRONG&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-size: 10pt; font-family: arial,helvetica,sans-serif;"&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; }, &lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; font-family: arial,helvetica,sans-serif;"&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; font-family: arial,helvetica,sans-serif;"&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; *some other extension*&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; font-family: arial,helvetica,sans-serif;"&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; font-family: arial,helvetica,sans-serif;"&gt;&lt;STRONG&gt;], &lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; font-family: arial,helvetica,sans-serif;"&gt;&lt;STRONG&gt;...&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-size: 10pt; font-family: arial,helvetica,sans-serif;"&gt;&lt;STRONG&gt; } &lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 13 Jul 2016 09:51:50 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/enable-custom-capabilities-on-a-mapservice/m-p/337858#M26500</guid>
      <dc:creator>AleydisG__Pere</dc:creator>
      <dc:date>2016-07-13T09:51:50Z</dc:date>
    </item>
  </channel>
</rss>

