I have some Feature Layers on ArcGIS Online and I want to access them via Python. However, I cannot find the latest layer I created with gis.content.search.
This is how it looks like in ArcGIS Online:
However, when I run gis.content.search("owner:{0}".format("manuel.popp_KIT")) in Python, the output is:
In [28]: gis.content.search("owner:{0}".format("manuel.popp_KIT"))
Out[28]:
[<Item title:"B1_6_0003" type:Feature Layer Collection owner:manuel.popp_KIT>,
<Item title:"B1_6_0078" type:Feature Layer Collection owner:manuel.popp_KIT>,
<Item title:"B1_6_0063" type:Feature Layer Collection owner:manuel.popp_KIT>,
<Item title:"B1_6_0119" type:Feature Layer Collection owner:manuel.popp_KIT>,
<Item title:"B1_6_0136" type:Feature Layer Collection owner:manuel.popp_KIT>,
<Item title:"B1_6_0086" type:Feature Layer Collection owner:manuel.popp_KIT>,
<Item title:"Extents" type:Feature Layer Collection owner:manuel.popp_KIT>,
<Item title:"B1_6_0023" type:Feature Layer Collection owner:manuel.popp_KIT>,
<Item title:"Areas_B3_4" type:Feature Layer Collection owner:manuel.popp_KIT>,
<Item title:"Areas_B3_4" type:Service Definition owner:manuel.popp_KIT>]
Where is "B1_6_0140"? It worked quite well until now and the missing item was created just as the other similar ones. How can it be missing?
Solved! Go to Solution.
missing the max_items argument, default is only 10
gis.content.search("owner:{0}".format("manuel.popp_KIT"), max_items=100)
https://developers.arcgis.com/python/api-reference/arcgis.gis.toc.html#contentmanager
missing the max_items argument, default is only 10
gis.content.search("owner:{0}".format("manuel.popp_KIT"), max_items=100)
https://developers.arcgis.com/python/api-reference/arcgis.gis.toc.html#contentmanager
Thanks, I didn't expect there was a limit of 10 items
No problem, just fyi I've seen max_items=-1 used also, which I guess is unlimited results, but I've not bothered to test that myself.