简体   繁体   English

Microsoft Graph API SharePoint搜索

[英]Microsoft Graph API SharePoint search

I have been trying to search through my SharePoint site. 我一直在尝试搜索我的SharePoint网站。 I am able to get results for a single drive: 我能够获得单个驱动器的结果:

xxx.sharepoint.com,xxxxxx-xxxx-xxxx-xxxx-xxxxxx,xxxxx-xxxx-xxxx-xxxx-xxxxxx/drives/xxxxxxxxx/search(q='{content}')

But if I do the same search at drive/root , I don't get any result: 但是,如果我在drive/root执行相同的搜索,则不会得到任何结果:

xxx.sharepoint.com,xxxxxx-xxxx-xxxx-xxxx-xxxxxx,xxxxx-xxxx-xxxx-xxxx-xxxxxx/drive/root/search(q='{content}')

We basically want to perform a search across the entire subsite. 我们基本上希望在整个子网站上执行搜索。

Hey a bit late but I've just discovered you can use the /sites endpoint to retrieve all items in a site by expanding relationships of graph objects. 嘿有点晚了但我刚刚发现你可以使用/ sites端点通过扩展图形对象的关系来检索站点中的所有项目。 Could you try use: 你能试试用吗:

https://graph.microsoft.com/v1.0/sites/root/sites ?$expand=lists($expand=items) https://graph.microsoft.com/v1.0/sites/root/sites?$ expand = lists($ expand = items)

This seems to return all list items in all subsites under the root site. 这似乎返回根网站下所有子网站中的所有列表项。 You should hopefully then be able to to filter further by subsite, list, field values etc. 您应该希望能够通过子网站,列表,字段值等进一步过滤。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM