<?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: Possible to tell if a feature service is &amp;quot;hosted&amp;quot; in environment or not? in ArcGIS API for Python Questions</title>
    <link>https://community.esri.com/t5/arcgis-api-for-python-questions/possible-to-tell-if-a-feature-service-is-quot/m-p/1188592#M7536</link>
    <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/202029"&gt;@Jay_Gregory&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Each item has a typeKeywords property which is a list. If it is a Hosted Service there is a 'Hosted Service' string in this list as shown below.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="python"&gt;print(fs.typeKeywords

['ArcGIS Server', 'Data', 'Feature Access', 'Feature Service', 'Metadata', 'providerSDS', 'Service', 'Hosted Service']&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The below will filter out items that has the 'Hosted Service' keyword.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="python"&gt;from arcgis.gis import GIS

gis = GIS("home")

fs_list = gis.content.search(query="type:service", max_items=10000)

hosted = [fs for fs in fs_list if 'Hosted Service' in fs.typeKeywords]

print(hosted)&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If you print out the keywords for various item types you might be able use the same method, or use in tandem with other filters, to get the information you need.&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Fri, 01 Jul 2022 08:28:56 GMT</pubDate>
    <dc:creator>Clubdebambos</dc:creator>
    <dc:date>2022-07-01T08:28:56Z</dc:date>
    <item>
      <title>Possible to tell if a feature service is "hosted" in environment or not?</title>
      <link>https://community.esri.com/t5/arcgis-api-for-python-questions/possible-to-tell-if-a-feature-service-is-quot/m-p/1188366#M7533</link>
      <description>&lt;P&gt;I can easily get a list of all feature services in my AGOL environment&lt;/P&gt;&lt;P&gt;fs = gis.content.search(query="type:service", max_items=10000)&lt;/P&gt;&lt;P&gt;From these results, I am curious if there is any easy way to understand if a feature service is "hosted" or not.&amp;nbsp; In other words, how can I tell if a feature service was created by a user uploading or creating data (csv, shapefile, etc.) or if a user added a feature service from an existing arcgis url (new item--&amp;gt;from url--&amp;gt;paste in REST endpoint--&amp;gt;etc).&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I know I can find this information out by looking at the items in our AGOL instance, but want to be able to do this programmatically.&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Any tips?&lt;/P&gt;</description>
      <pubDate>Thu, 30 Jun 2022 16:29:18 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-python-questions/possible-to-tell-if-a-feature-service-is-quot/m-p/1188366#M7533</guid>
      <dc:creator>Jay_Gregory</dc:creator>
      <dc:date>2022-06-30T16:29:18Z</dc:date>
    </item>
    <item>
      <title>Re: Possible to tell if a feature service is "hosted" in environment or not?</title>
      <link>https://community.esri.com/t5/arcgis-api-for-python-questions/possible-to-tell-if-a-feature-service-is-quot/m-p/1188592#M7536</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/202029"&gt;@Jay_Gregory&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Each item has a typeKeywords property which is a list. If it is a Hosted Service there is a 'Hosted Service' string in this list as shown below.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="python"&gt;print(fs.typeKeywords

['ArcGIS Server', 'Data', 'Feature Access', 'Feature Service', 'Metadata', 'providerSDS', 'Service', 'Hosted Service']&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The below will filter out items that has the 'Hosted Service' keyword.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="python"&gt;from arcgis.gis import GIS

gis = GIS("home")

fs_list = gis.content.search(query="type:service", max_items=10000)

hosted = [fs for fs in fs_list if 'Hosted Service' in fs.typeKeywords]

print(hosted)&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If you print out the keywords for various item types you might be able use the same method, or use in tandem with other filters, to get the information you need.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 01 Jul 2022 08:28:56 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-python-questions/possible-to-tell-if-a-feature-service-is-quot/m-p/1188592#M7536</guid>
      <dc:creator>Clubdebambos</dc:creator>
      <dc:date>2022-07-01T08:28:56Z</dc:date>
    </item>
    <item>
      <title>Re: Possible to tell if a feature service is "hosted" in environment or not?</title>
      <link>https://community.esri.com/t5/arcgis-api-for-python-questions/possible-to-tell-if-a-feature-service-is-quot/m-p/1188677#M7537</link>
      <description>&lt;P&gt;Thank you! I knew it was somewhere in there! dir(item) just returns too many properties &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 01 Jul 2022 13:11:44 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-python-questions/possible-to-tell-if-a-feature-service-is-quot/m-p/1188677#M7537</guid>
      <dc:creator>Jay_Gregory</dc:creator>
      <dc:date>2022-07-01T13:11:44Z</dc:date>
    </item>
  </channel>
</rss>

