Search - Private and Shared layers

2067
7
08-15-2013 11:47 AM
BrianFlood
Occasional Contributor
How can search for all layers that you own (private) and all layers shared with you?

the docs here say you can use "access:private" and "access:shared" but I can only get private to work.
http://resources.arcgis.com/en/help/arcgisonline/index.html#/Using_search/010q0000000n000000/

I just need a list of all layers available to the logged in user (I know the shared ones will not be browsable from MyContent but there's got to be a way to search on all shared items)

thanks!
brian
Tags (2)
0 Kudos
7 Replies
MikeMinami
Esri Notable Contributor
The items returned by a search include those layers that are shared via groups with the logged in user. Are you looking for items shared to the user, but that are not owned by the user, nor public items?

This may work:

access:shared NOT access:public NOT owner:<current user name>

This appears to return all items shared with you via groups, where the item is not publicly shared and you don't own the item. This query,however, eliminates public items shared to groups you are a member of...

Mike
0 Kudos
BrianFlood
Occasional Contributor
hi mike

ok, thanks but that didn't seem to get items that are shared with the entire Org (or maybe I'm not getting that sharing option). When you view and Item as the owner and then click on the "Share" button you can allow the entire Org to see it (see attachment), how would I search for these as the non-owner who belongs to that Org? (seems like a pretty common way to share, or do most people use Groups for sharing services/maps?)

thanks
brian
0 Kudos
BrianFlood
Occasional Contributor
still no luck on this, I would have assumed "access:shared" would have worked but no luck. there are other ways to crawl an entire portal and pick out what is needed but I was hoping for quick way to search for all Feature Services accessible to the logged in user

fwiw, it's for a prototype service to automatically run scheduled backups of your feature and attachments data to DropBox (http://www.arc2box.com ). Providing the user a list of all services (not just what they own) would be nice, especially for larger Orgs where most users are not Admin/Publishers


cheers
brian
0 Kudos
MikeMinami
Esri Notable Contributor
I think the documentation is missing access:org

Mike
0 Kudos
BrianFlood
Occasional Contributor
thanks mike, the "access: org" filter did the trick

fwiw, here's how to list private and org shared feature services:
q=(access: private OR access: org) AND typekeywords:"Hosted Service"

cheers
brian
0 Kudos
BrianFlood
Occasional Contributor
actually spoke too soon, this works from the ArcGIS.com UI but not from the API (which is really strange)

this API query only return private services.
https://www.arcgis.com/sharing/search?f=json&start=0&num=100000&sortField=title&q=(access%3Aprivate%20OR%20access%3Aorg%20)%20AND%20typekeywords%3A"Hosted%20Service"&t=content&token={{valid_token}}


this work but only from the UI:
http://sdltesting.maps.arcgis.com/home/search.html?q=(access%3Aprivate%20OR%20access%3Aorg%20)%20AND%20typekeywords%3A%22Hosted%20Service%22&t=content
0 Kudos
BrianFlood
Occasional Contributor
hi mike

can you confirm that "access: org" does not work from the API?

thanks
brian
0 Kudos