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

1058
0
12-21-2018 08:06 AM
Cristian_Galindo
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="https://yourAGOL.maps.arcgis.com"sourceAdmin="adminUser"sourcePassword="thisIsNotMyPassword" clientAcronym = "Sales"source = gis.GIS(sourceURL, sourceAdmin, sourcePassword)existingItems = source.content.search('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 = source.users.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