<?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: Why is Service class gone from arcgis.gis.server module? in ArcGIS API for Python Questions</title>
    <link>https://community.esri.com/t5/arcgis-api-for-python-questions/why-is-service-class-gone-from-arcgis-gis-server/m-p/1578839#M11088</link>
    <description>&lt;P&gt;Prior to version 2.4 of the ArcGIS API for Python, you used to be able to see the Service class directly with something like&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="python"&gt;from arcgis.gis import server
server.Service&lt;/LI-CODE&gt;&lt;P&gt;Starting at 2.4, you can't do that anymore, but the object itself still exists and can be used. I think the recommended way to get access to it is through the admin property of the gis object. So it should look something like:&lt;/P&gt;&lt;LI-CODE lang="python"&gt;# Connect to portal
from arcgis.gis import GIS
gis = GIS(&amp;lt;credentials&amp;gt;)

# Create Server object from list of servers
server = gis.admin.servers.list()[0]

# Create Service object from list of services
service = server.services.list()[0]&lt;/LI-CODE&gt;&lt;P data-unlink="true"&gt;If you check the type of `service` in this case, it should be `arcgis.gis.server.admin._services.Service`, which is the same type as it was in prior versions of the Python API. From a quick glance it looks like it has all the same properties and methods as the older versions of the class. If you're looking for documentation on its behavior, you could either use the 2.3 version of the API doc&amp;nbsp;or call the help function on&amp;nbsp;`arcgis.gis.server.admin._services.Service`.&lt;BR /&gt;&lt;BR /&gt;I didn't see the behavior documented in the 2.4 version of the API reference, so I also submitted feedback on the documentation so that it could be recorded there.&lt;BR /&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Fri, 24 Jan 2025 20:48:01 GMT</pubDate>
    <dc:creator>TravisOrmsby</dc:creator>
    <dc:date>2025-01-24T20:48:01Z</dc:date>
    <item>
      <title>Why is Service class gone from arcgis.gis.server module?</title>
      <link>https://community.esri.com/t5/arcgis-api-for-python-questions/why-is-service-class-gone-from-arcgis-gis-server/m-p/1574277#M11033</link>
      <description>&lt;P&gt;After upgrading my ArcGIS Pro to 3.4 the Service class from the arcgis.gis.server module is gone. What has happened to it? In the documentation the Service section is still there, but nothing underneath that.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="CarstenAndersson_0-1736500722844.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/123097iE1EF9FC05E9067CA/image-size/medium?v=v2&amp;amp;px=400" role="button" title="CarstenAndersson_0-1736500722844.png" alt="CarstenAndersson_0-1736500722844.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 10 Jan 2025 09:19:34 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-python-questions/why-is-service-class-gone-from-arcgis-gis-server/m-p/1574277#M11033</guid>
      <dc:creator>CarstenAndersson</dc:creator>
      <dc:date>2025-01-10T09:19:34Z</dc:date>
    </item>
    <item>
      <title>Re: Why is Service class gone from arcgis.gis.server module?</title>
      <link>https://community.esri.com/t5/arcgis-api-for-python-questions/why-is-service-class-gone-from-arcgis-gis-server/m-p/1578839#M11088</link>
      <description>&lt;P&gt;Prior to version 2.4 of the ArcGIS API for Python, you used to be able to see the Service class directly with something like&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="python"&gt;from arcgis.gis import server
server.Service&lt;/LI-CODE&gt;&lt;P&gt;Starting at 2.4, you can't do that anymore, but the object itself still exists and can be used. I think the recommended way to get access to it is through the admin property of the gis object. So it should look something like:&lt;/P&gt;&lt;LI-CODE lang="python"&gt;# Connect to portal
from arcgis.gis import GIS
gis = GIS(&amp;lt;credentials&amp;gt;)

# Create Server object from list of servers
server = gis.admin.servers.list()[0]

# Create Service object from list of services
service = server.services.list()[0]&lt;/LI-CODE&gt;&lt;P data-unlink="true"&gt;If you check the type of `service` in this case, it should be `arcgis.gis.server.admin._services.Service`, which is the same type as it was in prior versions of the Python API. From a quick glance it looks like it has all the same properties and methods as the older versions of the class. If you're looking for documentation on its behavior, you could either use the 2.3 version of the API doc&amp;nbsp;or call the help function on&amp;nbsp;`arcgis.gis.server.admin._services.Service`.&lt;BR /&gt;&lt;BR /&gt;I didn't see the behavior documented in the 2.4 version of the API reference, so I also submitted feedback on the documentation so that it could be recorded there.&lt;BR /&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 24 Jan 2025 20:48:01 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-python-questions/why-is-service-class-gone-from-arcgis-gis-server/m-p/1578839#M11088</guid>
      <dc:creator>TravisOrmsby</dc:creator>
      <dc:date>2025-01-24T20:48:01Z</dc:date>
    </item>
    <item>
      <title>Re: Why is Service class gone from arcgis.gis.server module?</title>
      <link>https://community.esri.com/t5/arcgis-api-for-python-questions/why-is-service-class-gone-from-arcgis-gis-server/m-p/1580372#M11107</link>
      <description>&lt;P&gt;Thanks for the answer&amp;nbsp;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/42056"&gt;@TravisOrmsby&lt;/a&gt;&amp;nbsp;&lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 30 Jan 2025 14:30:45 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-python-questions/why-is-service-class-gone-from-arcgis-gis-server/m-p/1580372#M11107</guid>
      <dc:creator>CarstenAndersson</dc:creator>
      <dc:date>2025-01-30T14:30:45Z</dc:date>
    </item>
  </channel>
</rss>

