Select to view content in your preferred language

How to search the folder's items in ArcGIS On Line using the ArcGIS API for Python

12-21-2018 08:06 AM
Occasional Contributor III

I want to have a list of the items inside a folder created by my user in AGOL, I want to use the ArcGIS API for Python.

so far I have found this:

import sysfrom arcgis import gisimport os  sourceURL=""sourceAdmin="adminUser"sourcePassword="thisIsNotMyPassword" clientAcronym = "Sales"source = gis.GIS(sourceURL, sourceAdmin, sourcePassword)existingItems ='title:"{0}*" '.format(clientAcronym))

this code list all the items where their title start with Sales, but I know there is a folder called "Sales-Test" and it has some of those items, i want to know which items are inside of that folder:

if I get the list of my folders

me = me.foldersfor folder in me.folders:      print(folder['title'])    me.items(folder['title'])

I can see the folder "Sales-Test"

In the Item documentation i cannot see how to get the folder information. Is there a way to relate the information of existingItems with me.folders?

0 Kudos
0 Replies