Rest API to get recently modified documents

Silver 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"+
		"&SelectProperties='Title,FileExtension,Path,ParentLink,LastModifiedTime,ServerRedirectedURL,SPWebUrl,SiteTitle'"+
		"&clienttype='ContentSearchRegular'"+
		"&properties=%27GraphQuery:ACTOR(ME\\,action\\:1003),GraphRankingModel:{%22features%22\\:[{%22function%22\\:%22EdgeTime%22}]}%27"+
		"&rankingmodelid='0c77ded8-c3ef-466d-929d-905670ea1d72'"+
		"&rowlimit=10";

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.