I am trying to search a feature layer and add it to my map object in jupyter notebook.
This is the layer I tried searching - http://www.arcgis.com/sharing/rest/content/items/9f2fd655aa624b8080299196d841ae54/data
my_gis.content.search('title:Ekal',item_type='Feature Layer') returns empty list.
Am I missing something?
I tried searching with full title - my_gis.content.search('title:Ekal AP Bhag layer',item_type='Feature Layer')
Still no results.
Thank you!
Solved! Go to Solution.
The item type for this item is Feature Collection, hence you need to search for item_type='Feature Collection', not 'Feature Layer'.
Also, if you know the id, you can use gis.content.get('9f2fd655aa624b8080299196d841ae54') to get this item.
To search outside your org, set the outside_org parameter to True, otherwise the search is confined to your org:
my_gis.content.search('title:Ekal',item_type='Feature Layer', outside_org=True)
The item type for this item is Feature Collection, hence you need to search for item_type='Feature Collection', not 'Feature Layer'.
Also, if you know the id, you can use gis.content.get('9f2fd655aa624b8080299196d841ae54') to get this item.
Thank you, that worked.
I was able to search without item_type too.
mygis.content.search('title:Bhag')