Feature layer doesn't show in search results

1174
3
Jump to solution
01-04-2017 10:34 AM
by
New Contributor II

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!

Tags (2)
Reply
0 Kudos
1 Solution

Accepted Solutions
Esri Contributor

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.

View solution in original post

Reply
0 Kudos
3 Replies
Esri Contributor

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)

Reply
0 Kudos
Esri Contributor

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.

View solution in original post

Reply
0 Kudos
by
New Contributor II

Thank you, that worked.

I was able to search without item_type too.

mygis.content.search('title:Bhag')

Reply
0 Kudos