0

I am trying to get view counts across document libraries for all the documents (pdf/docs/docx/pttx/xslx/etc) not the web pages. What I am trying to do is getting the count for the total documents in each document libraries and select the highest view count for the last 7 days.

https://{site_url}/_api/search/query?querytext='path:https://{site_url}'&refinementfilters='fileExtension:or("pdf","docx","doc","pptx","xlsx")'&sortlist='ViewsLifeTime:descending'

However the above query only gives ViewsLifeTime for the document library (I need document) and also it shows over all counts not the last 7 days. How do I get this programmaticly or is there a way I can query it.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.