<?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: Input Parameter: Get hosted feature layer ID? in Python Questions</title>
    <link>https://community.esri.com/t5/python-questions/input-parameter-get-hosted-feature-layer-id/m-p/1278546#M67417</link>
    <description>&lt;P&gt;that's exactly what I was hoping for - thank you!&lt;/P&gt;</description>
    <pubDate>Thu, 13 Apr 2023 20:53:03 GMT</pubDate>
    <dc:creator>SH_DH</dc:creator>
    <dc:date>2023-04-13T20:53:03Z</dc:date>
    <item>
      <title>Input Parameter: Get hosted feature layer ID?</title>
      <link>https://community.esri.com/t5/python-questions/input-parameter-get-hosted-feature-layer-id/m-p/1277064#M67390</link>
      <description>&lt;P&gt;Hi there - I'd like to have a script input parameter that ultimately returns the ArcGIS Online item ID for a hosted feature layer for updating that item in a webmap.&amp;nbsp; Using a 'feature layer'&amp;nbsp; parameter returns the REST URL of that hosted layer.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Using REST would seemingly require the user to have to enter a name/password and generate a token just to get the ID of that hosted feature layer.&amp;nbsp; Is there a way around this?&lt;/P&gt;</description>
      <pubDate>Mon, 10 Apr 2023 19:54:53 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/input-parameter-get-hosted-feature-layer-id/m-p/1277064#M67390</guid>
      <dc:creator>SH_DH</dc:creator>
      <dc:date>2023-04-10T19:54:53Z</dc:date>
    </item>
    <item>
      <title>Re: Input Parameter: Get hosted feature layer ID?</title>
      <link>https://community.esri.com/t5/python-questions/input-parameter-get-hosted-feature-layer-id/m-p/1278267#M67411</link>
      <description>&lt;P&gt;You can use the Featureclass input (selecting it from the Portal content in catalog), then in the code you can get the item Id:&lt;/P&gt;&lt;LI-CODE lang="python"&gt;import arcgis
from arcgis.features import FeatureLayer

# you can probably use the existing connection from pro if they are already signed in.
gis = arcgis.GIS("https://&amp;lt;domain&amp;gt;.maps.arcgis.com", client_id="AppId")

# this would be the feature service address that is from the input parameter
fs_url = 'https://services9.arcgis.com/435tk5oo45nwo/arcgis/rest/services/trips/FeatureServer'

# get the item using the url
in_service = FeatureLayer(fs_url)

props = in_service.properties
# print item id
arcpy.AddMessage(props.serviceItemId)&lt;/LI-CODE&gt;&lt;P&gt;C&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 13 Apr 2023 14:18:07 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/input-parameter-get-hosted-feature-layer-id/m-p/1278267#M67411</guid>
      <dc:creator>Anonymous User</dc:creator>
      <dc:date>2023-04-13T14:18:07Z</dc:date>
    </item>
    <item>
      <title>Re: Input Parameter: Get hosted feature layer ID?</title>
      <link>https://community.esri.com/t5/python-questions/input-parameter-get-hosted-feature-layer-id/m-p/1278546#M67417</link>
      <description>&lt;P&gt;that's exactly what I was hoping for - thank you!&lt;/P&gt;</description>
      <pubDate>Thu, 13 Apr 2023 20:53:03 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/input-parameter-get-hosted-feature-layer-id/m-p/1278546#M67417</guid>
      <dc:creator>SH_DH</dc:creator>
      <dc:date>2023-04-13T20:53:03Z</dc:date>
    </item>
  </channel>
</rss>

