Saturday 24 January 2015

Glimpse of the upcoming Office 365 Video API

Update (21/04/2015): Here is the preview of the Office 365 Video API: https://msdn.microsoft.com/office/office365/APi/video-rest-operations

--------------------------------------------X--------------------------------------------------

A while ago, I wrote a post about getting all the video channels and videos from the Office 365 Video Service.  Shortly after that I got a word from Microsoft that there is going to be a public API for accessing Office 365 Videos. I was allowed to share the information as long as I mentioned that the API is not documented yet and is still being worked upon. So there is a possibility that it might change in the future so it is advised that this should not be used in production until it is fully stable and documented.

Here is how the API will work:

1) Get the right path from the discover endpoint:


https://site.sharepoint.com/sites/team/_api/VideoService.discover

The returned JSON will contain the following values among others:

{
    "IsVideoPortalEnabled": true,
    "VideoPortalUrl": "https://site.sharepoint.com/portals/hub"
}

IsVideoPortalEnabled will be true if your tenant has got Office 365 Video and VideoPortalUrl is the url which we will use to make further REST calls.

2) Get all Video channels with the VideoPortalUrl:


https://site.sharepoint.com/portals/hub/_api/VideoService/Channels

The returned JSON will contain all the channels with their unique GUIDs:

{
            "Description": "",
            "Id": "eaa748d7-97d6-43f1-8780-ce5c8acbf2bb",
            "TileHtmlColor": "#0072c6",
            "Title": "Development"
}

3) Get all videos from a single video channel:


Here, we will use the Id obtained from the previous call to get all the videos from a particular channel:

https://site.sharepoint.com/portals/hub/_api/VideoService/Channels('eaa748d7-97d6-43f1-8780-ce5c8acbf2bb')/Videos

3 comments:

Thiện said...

when i request to https://xxxxx.sharepoint.com/portals/hub/_api/VideoService/Channels

it response:


-2146232832, Microsoft.SharePoint.SPException
The request uses too many resources.




Please help me. tks

Vardhaman Deshpande said...

Do you get the same error now? O365 Video is rolling out globally now so ideally you should not get these random errors anymore.

Manoj Kumar said...

Do we have any SDK's for performing the basic operations like posting video, playing video??