cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
DAVIDPOWELL
Impactful Individual
Impactful Individual

searching a specific folder for http GET request

In my Flow for a "Send An http request to Sharepoint"

 

I have the search URI  working fine :

 

_api/search/query?querytext='@{replace(variables('SearchQuery'),'''','')}'&clienttype='ContentSearchRegular'&selectproperties='UniqueId, Title, OriginalPath'&rowlimit=@{variables('RowLimit')}&startrow=@{variables('RowsToSkip')}

 

what i need: 

i need to only search in a specific folder 

_api/web/GetFolderByServerRelativeUrl('/"Communications%20Deck%20Platform"')/files

 

I cant figure out where to place this additional address part

Thnks

dave

2 ACCEPTED SOLUTIONS

Accepted Solutions
v-litu-msft
Community Support
Community Support

Hi @DAVIDPOWELL,

 

To search in the specific folder you can specifying full folder path with site: managed property. Like this:

http://{site url}/_api/search/query?querytext='title:{query_text}+site:"{absolute path to folder}"'


Example:

http://server1/_api/search/query?querytext='title:Document*+site:"http:%2f%server1%2fLibrary2%2fFolder3"'


Best Regards,
Community Support Team _ Lin Tu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

got tnhis to work.

_api/search/query?querytext='@{replace(variables('SearchQuery'),'''','')}+site:"https://xxxxxx.sharepoint.com/sites/Sales/Communications Deck Platform"'&clienttype='ContentSearchRegular'&selectproperties='UniqueId, Title, OriginalPath,Rank,Path'&rowlimit=@{variables('RowLimit')}&startrow=@{variables('RowsToSkip')}

View solution in original post

4 REPLIES 4
v-litu-msft
Community Support
Community Support

Hi @DAVIDPOWELL,

 

To search in the specific folder you can specifying full folder path with site: managed property. Like this:

http://{site url}/_api/search/query?querytext='title:{query_text}+site:"{absolute path to folder}"'


Example:

http://server1/_api/search/query?querytext='title:Document*+site:"http:%2f%server1%2fLibrary2%2fFolder3"'


Best Regards,
Community Support Team _ Lin Tu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

can you give me an example with the data i have supplied in tis thread ?

 

@v-litu-msft this is still not working ?

_api/search/query?querytext='@{replace(variables('SearchQuery'),'''','')}'&clienttype='ContentSearchRegular'&selectproperties='UniqueId, Title, OriginalPath'&rowlimit=@{variables('RowLimit')}&startrow=@{variables('RowsToSkip')}+site:"https://xxxxx.sharepoint.com/sites/Sales/Communications%20Deck%20Platform"

got tnhis to work.

_api/search/query?querytext='@{replace(variables('SearchQuery'),'''','')}+site:"https://xxxxxx.sharepoint.com/sites/Sales/Communications Deck Platform"'&clienttype='ContentSearchRegular'&selectproperties='UniqueId, Title, OriginalPath,Rank,Path'&rowlimit=@{variables('RowLimit')}&startrow=@{variables('RowsToSkip')}

Helpful resources

Announcements
Power Automate News & Announcements

Power Automate News & Announcements

Keep up to date with current events and community announcements in the Power Automate community.

Community Calls Conversations

Community Calls Conversations

A great place where you can stay up to date with community calls and interact with the speakers.

Power Automate Community Blog

Power Automate Community Blog

Check out the latest Community Blog from the community!

Top Solution Authors
Users online (1,954)