Forum Discussion
Learn about the new Microsoft Stream - enhancing video across M365 built on top of SharePoint
Great video presentation from ignite - just watching now.
Have specific questions about the Stream/Sharepoint portal templates, when they will become available and if I can create more of a constrained customized portal experience for a "group of groups" in my enterprise. I don't see the portals on the roadmap. Also, would be great to learn if it is perhaps already possible with the current Stream or I will need to wait.
Thanks so much.
- marekkoenigOct 07, 2020Brass Contributor
Great stuff, happy to see that there are some needed improvements to the platform. I'm most excited about the ability to use the API to query files and built out some deeper analytics.
Can someone provide either a sample GET command or a snippet on how to retrieve view information for a file stored in OneDrive?
- Marc MrozNov 10, 2020
Microsoft
marekkoenig wrote:
Great stuff, happy to see that there are some needed improvements to the platform. I'm most excited about the ability to use the API to query files and built out some deeper analytics.
Can someone provide either a sample GET command or a snippet on how to retrieve view information for a file stored in OneDrive?
marekkoenig - You can use the /getActivitiesByInterval API: Get item activity stats by interval - Microsoft Graph v1.0 | Microsoft Docs
Example GET:
https://graph.microsoft.com/v1.0/me/drive/items/01AY6ADJYACCEFNHXAUJAKUQV4MY7MHFKB/getActivitiesByInterval(startDateTime='2020-08-26',endDateTime='2020-09-01',interval='week')Will return this, 50 views in this time frame from 29 unique users.
{ "@odata.context": "https://graph.microsoft.com/v1.0/$metadata#Collection(itemActivityStat)", "value": [ { "@odata.type": "#microsoft.graph.itemActivityStat", "aggregationInterval": "None", "startDateTime": "2020-08-26T00:00:00Z", "endDateTime": "2020-09-01T23:59:59Z", "access": { "actionCount": 50, "actorCount": 29, "timeSpentInSeconds": 0 }, "incompleteData": { "wasThrottled": false, "resultsPending": false, "notSupported": false } } ] }