Access items according to content folder | AGOL | Python API

04-21-2020 07:29 AM
New Contributor II

Using the API for Python in ArcGIS, is there a way to retrieve items based on content folder name?

I can get group items but I want to get items based on content folders in AGOL.

Tags (1)
0 Kudos
1 Reply
New Contributor II

This is the way I have done it in the past. Frist, the User object has a folders property that returns a list of folder names. See arcgis.gis module — arcgis 1.8.0 documentation. From there you can verify that the folder you are looking for is, in fact, an actual folder in the user's account. Once you get the folder name you can call the user.items() method. This method has a folder parameter. See arcgis.gis module — arcgis 1.8.0 documentation. The first step is not necessary but its a starting point. Good luck! 

0 Kudos