无法仅从共享点休息检索文件夹 api

Unable to retrieve only folders from sharepoint rest api

我无法将共享点搜索限制为仅检索文件夹。

我 运行 其余搜索请求 api

https://(sharepoint url)/ian/_api/search/query?querytext='metatest3'

这只会检索此集合中的文件夹,但是当我使用

https://(sharepoint url)/ian/_api/search/query?querytext='metatest3 and IsContainer:1'

这不会检索文件夹,也找不到任何结果。

我很困惑,因为当第一个 API 电话返回时,我

<d:element m:type="SP.KeyValue">
    <d:Key>IsContainer</d:Key>
    <d:Value>true</d:Value>
    <d:ValueType>Edm.Boolean</d:ValueType>
</d:element>

我们可以使用下面的 REST API 来仅搜索文件夹。

https://(sharepoint url)/ian/_api/search/query?querytext='metatest3 contenttypeid:0x0120*'

或者

https://(sharepoint url)/ian/_api/search/query?querytext='metatest3 IsContainer:true'