Office365-REST-Python-Client icon indicating copy to clipboard operation
Office365-REST-Python-Client copied to clipboard

Is there a method to fire Delta Query for SharePoint Documents using Office365-REST-Python-Client?

Open mingchun-zhao opened this issue 2 years ago • 2 comments

Hi, Is there a method to fire Delta Query for SharePoint Documents using Office365-REST-Python-Client?

mingchun-zhao avatar Jan 12 '23 01:01 mingchun-zhao

Hello @mingchun-zhao , if it helps, I use the filter query to get the files created/updated after a certain date, as below.

However, @vgrem , I was also wondering if there's an example to run the delta query from the Graph Api using this lib. Since delta queries are the recommended approach by Microsoft. Also, related questions https://github.com/vgrem/Office365-REST-Python-Client/issues/822 https://github.com/vgrem/Office365-REST-Python-Client/issues/821

   items = (
    ctx.web.lists.get_by_title(doc_lib)
    .items.select(["FileSystemObjectType"]).filter("Modified gt '2024-02-10T08:23:03Z'").expand(["File", "Folder"])
    .get_all()
    .execute_query()
)
print("Loaded items count: {0}".format(len(items)))

ssmails avatar Feb 15 '24 20:02 ssmails

@vgrem any help appreciated on this. Thanks.

ssmails avatar Feb 23 '24 15:02 ssmails