Saturday, 17 January 2015

Get all Office 365 Video Channels, Groups and Delve Boards with REST

Office 365 has introduced 3 new portals recently: Videos, Groups and Delve. Behind the scenes, the architecture of Videos and Groups is such that each Video channel is a site collection and so is each Group. For Delve boards, each board is saved as a Tag and when you add a document to a board, the document is tagged with the name of the board.

If you are working on a solution for Office 365 and want to integrate Videos, Groups or Delve, here is how you can get a list of all of them using the SharePoint REST API:

1) Get all Office 365 Video Channels with REST API:


https://siteurl.sharepoint.com/_api/search/query?querytext='contentclass:sts_site WebTemplate:POINTPUBLISHINGTOPIC'&SelectProperties='WebTemplate,Title,Path'&rowlimit=50


2) Get all Office 365 Groups with REST API:


https://siteurl.sharepoint.com/_api/search/query?querytext='contentclass:sts_site WebTemplate:Group'&SelectProperties='WebTemplate,Title,Path'&rowlimit=50


3) Get all Delve Boards with REST API:


https://siteurl.sharepoint.com/_api/search/query?querytext='(Path:"TAG://PUBLIC/?NAME=*")'&Properties='IncludeExternalContent:true'&selectproperties='Path,Title'&rowlimit=50

5 comments:

  1. Hi vardhaman,

    Do know if there is any way to create Groups programatically?

    ReplyDelete
  2. Hi Jacob,

    As of now, there doesn't seem to be an API to do that.

    ReplyDelete
  3. Hi,

    I could get everything to work in an universal app... the thumbnails excepted.

    Could you obtain the thumbnail with the url provided with the video object ?

    I tried with the bearer token, SPClient, CSOM... no success.

    The url uses the format https://[TENANT]/portals/[SITE]/pVid/[VIDEOFILENAME].PNG?VideoPreview=1

    I see in the browser that cookies are used for the query but i don't know where the values FedAuth and rtFa come from...

    Thanks in advance if you can help :)

    ReplyDelete
  4. @Jacob Filtenborg,

    Could this endpoint be what you're looking for?

    https://github.com/SharePoint/PnP/tree/master/Samples/Provisioning.Modern.Console.RESTAPI

    ReplyDelete
  5. Getting list of Board from Delve:- Rest api is not working.
    I have try this way "https://patel.sharepoint.com/_api/search/query?querytext=%27(Path:%22TAG://PUBLIC/?NAME=*%22)%27&Properties=%27IncludeExternalContent:true%27&selectproperties=%27Path,Title%27&rowlimit=50" but it always show 0 rows.
    I have 3 Boards in my Delve.

    ReplyDelete

Comments moderation is turned ON. Your comment might not appear immediately after posting.