_api/search/query doesn’t seems to consider the sourceid, siteid or webid.
Hi Friends,
I am using SharePoint Online and I have 2 site collections. I am using the Search REST API and I would like to search only in one site collection. But the search is performed at tenant level always, though the sourceId or SiteId or WebId GUID values are provided in the API request.
Site Collections
https://xxxx.SharePoint.com/sites/SC1
https://xxxx.SharePoint.com/sites/SC2
Search REST API query
I have tried all 3 and all results includes SC2 data as well.
_api/search/query?querytext=’1234’&siteId='[GUID of SC1]’_api/search/query?querytext=’1234’&sourceId='[GUID of SC1]’_api/search/query?querytext=’1234’&webId='[GUID of SC1]’
I am sending the query using Power Automate Flow.
Looking for help for fix.
Thanks
Anjan
Hi Friends,I am using SharePoint Online and I have 2 site collections. I am using the Search REST API and I would like to search only in one site collection. But the search is performed at tenant level always, though the sourceId or SiteId or WebId GUID values are provided in the API request. Site Collectionshttps://xxxx.SharePoint.com/sites/SC1https://xxxx.SharePoint.com/sites/SC2 Search REST API queryI have tried all 3 and all results includes SC2 data as well._api/search/query?querytext=’1234’&siteId='[GUID of SC1]’_api/search/query?querytext=’1234’&sourceId='[GUID of SC1]’_api/search/query?querytext=’1234’&webId='[GUID of SC1]’ I am sending the query using Power Automate Flow. Looking for help for fix. ThanksAnjan Read More