Finding Item ID from Feature Layer for python toolbox tool

304
1
01-04-2023 12:18 AM
Labels (2)
RichardHoweRSKECO
New Contributor II

Hi, I'm trying to create a python tool with an ArcGIS Pro toolbox front where a user can select an item from their portal as an input and the tool exports the data to geodatabase and downloads it for them as a zip file.

The script works fine when I set the input to be a string and manually enter the Item ID, but I would like the user to just be able to select a feature layer as the input and for it run in the same way.

When a user selects a feature layer from "My content" the input is read as the url of the rest https://services2.argis.com/... etc.

Is there anyway I can ascertain the Item ID of that feature layer using python, which is what I need for the rest of the script to run?

0 Kudos
1 Reply
RichardHoweRSKECO
New Contributor II

This seems like such a simple question/request...but nobody has an answer 🤷🏻‍

0 Kudos