Forum Discussion
Sharepoint Site Usage in PowerBI?
The data you want is available from graph api - here
https://graph.microsoft.com/v1.0/sites/{site-id}/lists/{list-id}/items/{item-id}/getActivitiesByInterval(startDateTime='{startDate}',endDateTime='{endDate}',interval='{interval}')"
I have a use case to essentially import the "90" days of data into dataverse - because the customer wants to keep this data for longer than 90 days - so I am using a dataflow - with some functions - lookup "SharePoint List" / "Lists" to get the items you want to report on - then build a function to take the site-id, list-id, item-id and configure the days to be today / today -90 with interval of hour (interval supports - hours, day, week, month arguments)
I was also thinking you could write an azure function - surface the graph api stuff once you check that the user requesting it is a site owner - then we could simply provide the usage data directly to users from an azure functions endpoint - we could then add access checking to "partition" the data appropriately and secure access to the site usage data by site.
If this is something you are interested in seeing / leveraging let me know and I will put something up on github.
Sure, we would like to leverage this api to make our own 1-year (monthly basis) site statistic on Fabric, Can you help us give pointer on github?