Rest API to get recently modified documents

Valued Contributor

I am trying to use the delve/rest API to get the recently modified documents for a logged in user.  This has worked in the past, but now the results seem to be off.


For my user account, it will only return 1 result no matter what I do.


This is what I have used in the past:

	var queryUrl = _spPageContextInfo.webAbsoluteUrl + "/_api/search/query?querytext=%27(*)+AND+(FileExtension:doc+OR+FileExtension:docx+OR+FileExtension:ppt+OR+FileExtension:pptx+OR+FileExtension:xls+OR+FileExtension:xlsx+OR+FileExtension:xlsm+OR+FileExtension:pdf)%27"+

Did something change?  Is this endpoint not correct?

1 Reply

This could happen if the only documents that the user is requesting are private documents. We no longer keep private documents in the graph (they have been excluded from analytics and graph since new year). They are still in the SharePoint search index, but for collaboration it made no sense to analyze these documents since they are only available to the owner. I hope this answers your question.