Forum Discussion
Saintenr
Mar 11, 2021Copper Contributor
How many members have viewed a file in a SharePoint document library.
Hello Community, I would like to make a continuous evaluation of my files in SharePoint. For this purpose I am looking for the information how many people have viewed a certain file. How can I get th...
- Jan 27, 2022Hi, yes i found a solution to get this each file:
https://xxx.sharepoint.com/_api/v2.1/drives/${driveId}/items/${itemId}/getActivitiesByInterval(startDateTime='${startDate}',endDateTime='${endDate}',interval='${interval}')
You need the ${driveId} of your SharePoint library, this is not the library id!!
${itemId} is the UniqueId of the document not the short ID
${startDate} and ${endDate} should have this format 'yyyy-mm'
as ${interval} i used 'month' but i think 'day' any 'year should also possible.
good luck, cheers Saintenr
Martina_Hawkins
Jan 26, 2022Copper Contributor
Hi, also looking to do this. Did you find a solution?
- SaintenrJan 27, 2022Copper ContributorHi, yes i found a solution to get this each file:
https://xxx.sharepoint.com/_api/v2.1/drives/${driveId}/items/${itemId}/getActivitiesByInterval(startDateTime='${startDate}',endDateTime='${endDate}',interval='${interval}')
You need the ${driveId} of your SharePoint library, this is not the library id!!
${itemId} is the UniqueId of the document not the short ID
${startDate} and ${endDate} should have this format 'yyyy-mm'
as ${interval} i used 'month' but i think 'day' any 'year should also possible.
good luck, cheers Saintenr