Microsoft Graph
A Microsoft programmability model that exposes REST APIs and client libraries to access data on Microsoft 365 services.
10,515 questions
This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
Hi,
I'm using Sharepoint Search REST API
I need to refine my query for below usecases:
Can this be achieved? I'm not able to find any documentation around it.
Hello @captain_atharv ,
POST /search/query
{
"requests": [{
"entityTypes": [
"driveItem"
],
"query": {
"queryString": "{searchstring} AND ContentType:Document"
}
}]
}
A sample snippet using Microsoft Graph Search API using path to search in a specific list:
POST /search/query
{
"requests": [{
"entityTypes": [
"list",
"listItem"
],
"query": {
"queryString": "{searchstring} AND path:https://{tenant}.sharepoint.com/sites/MSGraph/Lists/Sample"
}
}]
}
Hope this helps.
If the answer is helpful, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".