Hi,
I'd like to include some widget similar to the search layer popup you have in the map creation application. This popup helps you find layers based on type/keyword, etc...
I checked the ins and outs and saw the call was in the form http://{my-account}.maps.arcgis.com/sharing/rest/search?some_cryptic_blablabla
Can I use this web service in my own application? is it documented somewhere? can it be called without user or app identification, ie generic api?
Thanks,
Thomas
http://{my-account}.maps.arcgis.com/sharing/rest/search?f=pjson&q=(tags:"tag1" AND "tag2") AND type:"Feature Service"
Have you checked out the 'search' doc yet?
https://developers.arcgis.com/javascript/latest/api-reference/esri-portal-Portal.html#queryItems
https://developers.arcgis.com/javascript/latest/api-reference/esri-portal-PortalQueryParams.html#que...
https://developers.arcgis.com/javascript/latest/api-reference/esri-portal-PortalQueryParams.html
https://developers.arcgis.com/rest/users-groups-and-items/search-reference.htm
https://developers.arcgis.com/rest/users-groups-and-items/search.htm
Thank you John for your answer.
In the link you provided https://developers.arcgis.com/rest/users-groups-and-items/search-reference.htm I found statement Developers should avoid using search to find specific items? What should developers use instead?
I try to find all feature layers whit a certain tag. How can I achieve this using the REST API whit out using JS API Clients?
Here the whole statement:
[...] This search engine uses many different inputs to find the appropriate results and rank them. This often makes search 'fuzzy', making it ideal for human interaction, but not necessarily ideal for looking for specific records programmatically. Developers should avoid using search to find specific items (e.g. by title) as the results of these types of queries might change as the search engine evolves.
"...find all feature layers with a certain tag" is not the same as "...using search to find specific items". I think you're reading too much into the highlighted sentence. What you should avoid using 'search' for is when you want to access a specific item. If you need to access a specific item I would recommend creating a PortalItem and use the item id directly. Searching for layers with a certain tag is a valid use of 'search', especially if you limit the search to within an org, group, or by user. If you're using the JS API you can use the above classes to do what you need without having to do things via REST.