Forum Discussion
Microsoft Stream + Graph API
I think what you're looking for is this
https://docs.microsoft.com/en-us/graph/api/itemanalytics-get?view=graph-rest-beta&tabs=http
There is quite a bit of code around using the SharePoint API but the numbers it reports are from SharePoint Search so are slightly different (reference).
I haven't been able to find a code example for you I'm afraid.
Update
I've just found the following which talks about the GraphApi analytics for specific list item (file) giving the actorCount, actionCount
https://www.drware.com/how-to-retrieve-analytics-information-for-pages-in-the-site-pages-using-graph-get-itemanalytics/
This lead me to
https://docs.microsoft.com/en-us/graph/api/itemanalytics-get?view=graph-rest-1.0&tabs=http
for the basic analytics and then
the following which gives these values for a specific interval
I think with this and the PostMan tool getting a GraphApi token for authentication, should give you (and me now) enough to get analytics for specific files.