<?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: Get a Specific Server from an arcgis.gis.server.ServerManager in ArcGIS API for Python Questions</title>
    <link>https://community.esri.com/t5/arcgis-api-for-python-questions/get-a-specific-server-from-an-arcgis-gis-server/m-p/1020807#M5482</link>
    <description>&lt;P&gt;Thanks, I will add that one to my toolbox.&amp;nbsp; I can see the url attribute now.&lt;/P&gt;</description>
    <pubDate>Wed, 27 Jan 2021 23:44:49 GMT</pubDate>
    <dc:creator>NathanHeickLACSD</dc:creator>
    <dc:date>2021-01-27T23:44:49Z</dc:date>
    <item>
      <title>Get a Specific Server from an arcgis.gis.server.ServerManager</title>
      <link>https://community.esri.com/t5/arcgis-api-for-python-questions/get-a-specific-server-from-an-arcgis-gis-server/m-p/1020358#M5477</link>
      <description>&lt;P&gt;I'm trying to learn the ArcGIS API for Python and get used to this pattern of iterating over lists to get the resource you want.&amp;nbsp; I just don't see in the documentation how you would use the list method to list the servers from a ServerManager object and select one of them specifically.&amp;nbsp; If I had multiple servers, how would I use the URL to select a server from the list.&amp;nbsp; I don't like the answer just list them in a Jupyter notebook and choose which one you need.&amp;nbsp; I'm going to be putting this in a script and I also don't like the idea of just hardcoding the index either.&amp;nbsp; I don't trust that the order will always be the same in the future.&lt;BR /&gt;&lt;BR /&gt;I can see all the arguments for the class constructor, but I don't see much in general for class attributes.&lt;/P&gt;</description>
      <pubDate>Wed, 27 Jan 2021 03:19:56 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-python-questions/get-a-specific-server-from-an-arcgis-gis-server/m-p/1020358#M5477</guid>
      <dc:creator>NathanHeickLACSD</dc:creator>
      <dc:date>2021-01-27T03:19:56Z</dc:date>
    </item>
    <item>
      <title>Re: Get a Specific Server from an arcgis.gis.server.ServerManager</title>
      <link>https://community.esri.com/t5/arcgis-api-for-python-questions/get-a-specific-server-from-an-arcgis-gis-server/m-p/1020370#M5478</link>
      <description>&lt;P&gt;did you consider to pass in the server URL you're after to select out the server, e.g:&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="python"&gt;def get_server(url)
    portal_url="https://spt.gis.com/arcgis"
    portal_username="portaladmin"
    portal_password="adminpassword"
    gis = GIS(portal_url, portal_username, portal_password,verify_cert=False)

    my_servers =gis.admin.servers.list()
    for server in my_servers: 
        print(server.url)
    
        if server.url==url:
            print("hi,we're here")&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 27 Jan 2021 04:37:53 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-python-questions/get-a-specific-server-from-an-arcgis-gis-server/m-p/1020370#M5478</guid>
      <dc:creator>Anonymous User</dc:creator>
      <dc:date>2021-01-27T04:37:53Z</dc:date>
    </item>
    <item>
      <title>Re: Get a Specific Server from an arcgis.gis.server.ServerManager</title>
      <link>https://community.esri.com/t5/arcgis-api-for-python-questions/get-a-specific-server-from-an-arcgis-gis-server/m-p/1020616#M5480</link>
      <description>&lt;P&gt;Yes, I was thinking of that but the documentation only shows constructor arguments, not available properties.&amp;nbsp; I printed the __dict__ property of the&amp;nbsp;Server objects&amp;nbsp;and _url was listed,&amp;nbsp;but I did not want to use a private variable.&amp;nbsp; I do see how url is a property if you just try to access it.&amp;nbsp; It would be nice if the documentation was more thorough like the JavaScript API.&amp;nbsp; I prefer having the public attributes described.&lt;/P&gt;</description>
      <pubDate>Wed, 27 Jan 2021 19:21:34 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-python-questions/get-a-specific-server-from-an-arcgis-gis-server/m-p/1020616#M5480</guid>
      <dc:creator>NathanHeickLACSD</dc:creator>
      <dc:date>2021-01-27T19:21:34Z</dc:date>
    </item>
    <item>
      <title>Re: Get a Specific Server from an arcgis.gis.server.ServerManager</title>
      <link>https://community.esri.com/t5/arcgis-api-for-python-questions/get-a-specific-server-from-an-arcgis-gis-server/m-p/1020795#M5481</link>
      <description>&lt;P&gt;I normally will use **dir(object)** rather than __dict__&lt;/P&gt;</description>
      <pubDate>Wed, 27 Jan 2021 22:55:51 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-python-questions/get-a-specific-server-from-an-arcgis-gis-server/m-p/1020795#M5481</guid>
      <dc:creator>Anonymous User</dc:creator>
      <dc:date>2021-01-27T22:55:51Z</dc:date>
    </item>
    <item>
      <title>Re: Get a Specific Server from an arcgis.gis.server.ServerManager</title>
      <link>https://community.esri.com/t5/arcgis-api-for-python-questions/get-a-specific-server-from-an-arcgis-gis-server/m-p/1020807#M5482</link>
      <description>&lt;P&gt;Thanks, I will add that one to my toolbox.&amp;nbsp; I can see the url attribute now.&lt;/P&gt;</description>
      <pubDate>Wed, 27 Jan 2021 23:44:49 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-python-questions/get-a-specific-server-from-an-arcgis-gis-server/m-p/1020807#M5482</guid>
      <dc:creator>NathanHeickLACSD</dc:creator>
      <dc:date>2021-01-27T23:44:49Z</dc:date>
    </item>
  </channel>
</rss>

