最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

sharepoint online - Graph API - List Item - $filter criteria to filter by subfolder - Stack Overflow

programmeradmin2浏览0评论

I have a list that is a parent folder (Folder_A). It has multiple subfolders as list items. I'm interested in retrieving documents inside a specific subfolder (Folder_B) based on the value of a certain custom column.

When I use the query sites/<site_id>/lists/<list_id>/items?$expand=fields&$filter=fields/Sent eq null, it gives me results from all the subfolders (as expected). In addition to this filter, I tried adding a parentReference/Id eq 'xxxxxxx' filter to try to get items that have Folder_B as parent, but that query returns a "General exception while processing" error.

Am I missing something, or is there any other option?

I have a list that is a parent folder (Folder_A). It has multiple subfolders as list items. I'm interested in retrieving documents inside a specific subfolder (Folder_B) based on the value of a certain custom column.

When I use the query sites/<site_id>/lists/<list_id>/items?$expand=fields&$filter=fields/Sent eq null, it gives me results from all the subfolders (as expected). In addition to this filter, I tried adding a parentReference/Id eq 'xxxxxxx' filter to try to get items that have Folder_B as parent, but that query returns a "General exception while processing" error.

Am I missing something, or is there any other option?

Share Improve this question edited Nov 19, 2024 at 2:53 Anirudh Sundaram asked Nov 19, 2024 at 2:51 Anirudh SundaramAnirudh Sundaram 12 bronze badges 1
  • I found a way to search inside a specific folder - sites/<site_id>/drives/b!<drive_id>/items/<folder_b_id>/search(q=''), but I can't figure out how to generate a query string for a custom column. – Anirudh Sundaram Commented Nov 19, 2024 at 16:35
Add a comment  | 

1 Answer 1

Reset to default 0

Currently there is no such api to filter by subfolder. You could get the items by id of subfolder.

GET https://graph.microsoft/v1.0/groups/{group-id}/drive/items/{next-item-id}/children
发布评论

评论列表(0)

  1. 暂无评论