I have a sharepoint document library which contains multiple folder each with files and folders in it. I want to get only the items in the current folder when executing the query and thus DON'T get the items in the subfolders under it. the way i create the search is as follows:
The query part:
path:https://one365dev1.sharepoint.com/sites/Group100/Rodney%20Documenten/
2 example queries that i execute:
Root:
https://one365dev1.sharepoint.com/_api/search/query?querytext='path:https:%2f%2fone365dev1.sharepoint.com%2fsites%2fGroup100%2fRodney%2520Documenten%2f'&clienttype='ContentSearchRegular'
A subfolder:
https://one365dev1.sharepoint.com/_api/search/query?querytext='path:https:%2f%2fone365dev1.sharepoint.com%2fsites%2fGroup100%2fRodney%2520Documenten%2ftester'&clienttype='ContentSearchRegular'
The main problem is that it returns all sub folders and items and also includes its own folder. Does anyone have an idea how to solve this?
thanks in advance and any help is much appreciated. Cheers!