hi there -
I'm trying o build a list of our Portal content, but we have Living Atlas enabled, and even with "outside_org=False" , the search still return all the living atlas layers. There's probably an easy way to exclude them, but I can't quite see it.
Here's the search line:
services = gis.content.search(query="", item_type="Feature Layer", max_items=maxItems, outside_org=False)
any help would be much appreciated!
Thanks.
Mike Knapp
Solved! Go to Solution.
Hi Mike,
You can do that like so:
services = gis.content.search(query="NOT owner: username", item_type="Feature Layer", max_items=maxItems, outside_org=False)
Hope this helps,
Earl
Hi Mike,
You can do that like so:
services = gis.content.search(query="NOT owner: username", item_type="Feature Layer", max_items=maxItems, outside_org=False)
Hope this helps,
Earl
Thanks Earl (I'm responding from a different account!) That worked perfectly.
Curious how this could work -- won't it only remove users named "username"? I use "NOT owner:esri_*" as the query to omit outside content and that seems to work.
I wonder why Esri has not fixed this bug in 3 years.