简体   繁体   中英

Microsoft Graph API shares / drives filter deleted files

I am using the Graph API to get Files from Sharepoint. Somehow I get deleted files in the response without any flag where i can filter.

I mean, i do not want to see files that are in the Recycle bin.

Is there a filter or something similar?

'https://graph.microsoft.com/v1.0/shares/u!sss/root?expand=children'; or 'https://graph.microsoft.com/v1.0/drives/b!xxx/root:/Dokumente/xxx/children';

There are no filters available to filter deleted files. For listing deleted files/folders, you can use delta query as it enables applications to discover newly created, updated, or deleted driveItems.

The initial request to the delta query function (no delta or skip token) will return the resources that currently exist in the collection. The final page of items will include the @odata.deltaLink property, which provides the URL that can be used later to retrieve changes since the current set of items.

Endpoint:

GET /sites/{siteId}/drive/root/delta

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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