API and/or PowerShell for managing MS Stream

Steel Contributor

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

 

32 Replies

@Mahesh Mudaliyar I just checked the Roadmap and it has been updated to Q2-2020 ... looks like it was just updated today :\2019-04-30 14_55_46-Microsoft 365 Roadmap _ Microsoft 365.png

 

 

Unbelievable, give us at least an early beta of the Read API, no need for the full CRUD. I can see that you are using it for the OOTB SPFx Stream webpart anw

@George_T  yes this is really sad that it has been moved now to 2020. Using O365 apps without having any sort of statistical data is really bad.

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

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.

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 @Stefan Fried 

Hello.

 

Is there any news about API access?

 

We are in bad need of upload|download|stats :(

@jeneller Please tell us how O365 administrators can manage stream with powershell!

Thank you.

Erik

@Marc Mroz Marc,

Please, give us any news about any progression of the mentioned solutions?!

 

Well...I guess because of the recent announcement to move to SharePoint the api for statistics/reporting becomes somehow obsolete.
For managing things I'm not sure how ms stream will evolve

Am I missing something or do we have 2021 and still nothing?

@Thierry Dalon 

 

Looks like it to me as well. 

@Stefan Fried 

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.