Forum Discussion
StefanFried
Jun 13, 2018Steel Contributor
API and/or PowerShell for managing MS Stream
good morning folks
I'm unsure if this question has ever been posted (at least i couldn't find any entry here).
I would like to know if there are cmdlets available for retrieving statistical MS Stream Data?
for instance getting data like --> how many videos have been uploaded...individual size info...tenant storage size...etc..etc
In regards to API i have read that MS is working on that later this year without giving any ETA :(
thank you
stefan
- Christopher OdegardBrass Contributor
StefanFried
This may or may not be helpful, but I have located the Graph endpoint that returns this information (view count) for video files stored in SharePoint: Get itemAnalytics - Microsoft Graph v1.0 | Microsoft Learn <https://learn.microsoft.com/en-us/graph/api/itemanalytics-get?view=graph-rest-1.0&tabs=http>
For example, the URL
<mytenant>.sharepoint.com/sites/VideoLibrary/_api/v2.0/$metadata#drives('b!.....')/items/<item ID>/analytics/allTime
...returns a JSON object where the "access" node contains the number of views (actionCount) and the number of unique viewers (actorCount).
{ "@odata.context": "<redacted>", "@oneDrive.displayNamesOfFileViewers": true, "aggregationInterval": "None", "startDateTime": "0001-01-01T00:00:00Z", "endDateTime": "0001-01-01T00:00:00Z", "isTrending": false, "access": { "actionCount": 50, "actorCount": 15, "timeSpentInSeconds": 0 }, "incompleteData": { "wasThrottled": false, "resultsPending": false, "notSupported": false } }
The main trick is getting the item ID, but I have not figured out how to determine that for an arbitrary video. - Thierry DalonBrass ContributorAm I missing something or do we have 2021 and still nothing?
- RivianWookieCopper Contributor
- jenellerCopper Contributor
If you're referring to Stream analytic capabilities then you can use Office 365 audit logs to get reportings (i.e. total uploads, total views, channels created, etc). This Microsoft Stream Q&A might be able to help you with what you're looking for StefanFried
- Jim FenielloCopper Contributor
Is there any way to upload a video programatically? I was assuming using the api, till i realized there isn't one yet ;(
So, was thinking, api, flow connector, calling powershell. But doesn't seem like any of this exists. Any thoughts on how else to do it? (Would like to upload a video, title it, and provide the channel its in).
thanks
-jim
- Michel BoulianneCopper Contributor
I agree. There's definitely a need to be able to access the videos via PowerShell.
We'd like to automatically change the security of a video after a Teams meeting or be able to change ownership by powershell if a user leaves the company.
- PietervandenHH1_1660Copper Contributor
By default when uploading a video in Stream "allow everyone in your company to view this video" is selected. We work in a health organisation and cant risk making mistakes with sharing by our employees, Is there anyway to have this option deselected by default?
- StefanFriedSteel Contributor
well, usually if you upload a video to a Companywide channel then the checkbox is ON by default.
if you upload a video to a group channel then this checkbox is OFF.
so in my opinion it works as designed.
i'm not aware of any possibility to change this default behaviour --> except if you change the channel to a group channel
kr
stefan
- George_TCopper ContributorAny news on this topic? Without an API this is useless for my company
- StefanFriedSteel Contributor
- George_TCopper Contributoraccording to the roadmap. the api is now in development and we "should" expect it around Q3 of 2019 :/ https://www.microsoft.com/en-us/microsoft-365/roadmap?filters=Microsoft%20Stream
- StefanFriedSteel Contributor
I will try my luck again (after 2 month of no information or hints) and ask if there is a possibility to retrieve statistical data from MS Stream (see my original post)
Marc Mrozi appreciate any help
thank you
- Marc Mroz
Microsoft
Sorry for not responding in a while. We've been heads down getting live events ready and I've not be free to answer here. The first response to your post is still accurate.
We currently do not have any Stream APIs or powershell cmdlets.
There isn't a way to get stats out of Stream programmatically.
The only thing that *might* help you is that we do send an audit log event each time a video is viewed to the O365 Audit log. They do have APIs, so I believe you could use the O365 Audit log APIs to pull out the events corresponding to when a person viewed a video.
We are in the process of getting started in earnest on both analytics for videos in Stream and Public REST APIs. We can make sure that when we do both of those projects that the new video level stats we build is exposed via the new public REST APIs we will be building.
- KTLErikCopper Contributor
- StefanFriedSteel Contributor
is it not important for customers to see whats going on within MS Streams ?
i mean with all the video recording capabilities you have now inside of MS Teams it is pretty important to get transparency and visibility.
Getting at least a bunch of cmdlets is the minimum i would expect.
i really would like to hear your thoughts/opinion on that.
- StefanFriedSteel ContributorAre there no opinions on that topic?
Thank you
- StefanFriedSteel Contributor
- For sure the not Microsoft Stream cmdlets at the moment. In regards of the Stream API, you are correct: it is not finished yet.
- StefanFriedSteel ContributorHi Juan carlos
You mean there are no current cmdlets , right?
I'm wondering how one should manage / analyze things within MS stream?
An Organization would like to see the usage , video uploads, meeting recordings,etc....or am i the only one?
Thanks
Stefan