Deprecated: strpos(): Passing null to parameter #1 ($haystack) of type string is deprecated in /www/collab365_296/public/wp-includes/functions.php on line 7025

Deprecated: str_replace(): Passing null to parameter #3 ($subject) of type array|string is deprecated in /www/collab365_296/public/wp-includes/functions.php on line 2162

Deprecated: Hook imagify_allow_picture_tags_for_webp is deprecated since version 2.2! Use imagify_allow_picture_tags_for_nextgen instead. in /www/collab365_296/public/wp-includes/functions.php on line 5758
O365 - PointPublishing - Create a channel / pointpublishing site using javascript - Collab365
Deprecated: strstr(): Passing null to parameter #1 ($haystack) of type string is deprecated in /www/collab365_296/public/wp-includes/functions.php on line 1145

Deprecated: stripos(): Passing null to parameter #1 ($haystack) of type string is deprecated in /www/collab365_296/public/wp-includes/functions.php on line 1152

Deprecated: stripos(): Passing null to parameter #1 ($haystack) of type string is deprecated in /www/collab365_296/public/wp-includes/functions.php on line 1155

Deprecated: strpos(): Passing null to parameter #1 ($haystack) of type string is deprecated in /www/collab365_296/public/wp-includes/functions.php on line 1162

Deprecated: strpos(): Passing null to parameter #1 ($haystack) of type string is deprecated in /www/collab365_296/public/wp-includes/functions.php on line 1165

Deprecated: strstr(): Passing null to parameter #1 ($haystack) of type string is deprecated in /www/collab365_296/public/wp-includes/functions.php on line 1145

Deprecated: stripos(): Passing null to parameter #1 ($haystack) of type string is deprecated in /www/collab365_296/public/wp-includes/functions.php on line 1152

Deprecated: stripos(): Passing null to parameter #1 ($haystack) of type string is deprecated in /www/collab365_296/public/wp-includes/functions.php on line 1155

Deprecated: strpos(): Passing null to parameter #1 ($haystack) of type string is deprecated in /www/collab365_296/public/wp-includes/functions.php on line 1162

Deprecated: strpos(): Passing null to parameter #1 ($haystack) of type string is deprecated in /www/collab365_296/public/wp-includes/functions.php on line 1165

Warning: Undefined array key "url" in /www/collab365_296/public/wp-content/plugins/thrive-visual-editor/thrive-dashboard/inc/smart-site/classes/class-tvd-smart-shortcodes.php on line 85

2015-07-04

In this post, we will see some of the technical details of the Office Video channels / PointPublishing site and creating a new Video channel / PointPublishing site using Javascript in the Office 365 Video portal.

When we create a channel within the Video portal,

  • Creates a new site collection using the POINTPUBLISHINGTOPIC#0 template.
  • Each channel / site collection is created as
    • http://<tenant>/portals/<channel>
  • Each channel contains the following list
    • http://<tenant>/portals/<channel>/_layouts/15/mcontent.aspx

  • All the videos uploaded are stored as the “Cloud Video” content type and the copy of the video is uploaded into the Azure media.

  • The channel settings are stored within the “Channel Settings” list.

  • Sample JSON data:
{  "Version": "1.0",  "PostType": 2,
"Title": "Office 365",
  "SubTitle": "subtitle",
  "ThumbnailSource": "?\u0026Height=144\u0026Group=PointPublishing",
  "Author": "anonymous author",
  "ControlData": {
    "cid1435091429301378053": {
      "Version": "1.0",
      "IsInternalControl": true,
      "ControlName": "ArticleHeaderControl",
      "ControlType": 11,
      "DataContext": {
        "ImageControlSize": 12,
        "ImageSourceType": 3,
        "ImageSource": "",
        "CaptionText": "",
        "Title": "Office 365",
        "Subtitle": "subtitle",
        "Author": "Balamurugan Kailasam",
        "PublishDate": "Tue Jun 23 2015 14:54:33 GMT+0100 (BST)",
        "__type": "ImageHeaderControlDataContext"
      },
      "__type": "ControlData"
    },
    "cid143509142933596014": {
      "Version": "1.0",
      "IsInternalControl": true,
      "ControlName": "RichTextControl",
      "ControlType": 0,
      "DataContext": {
        "Subtype": 1,
        "Value": "My first article",
        "NoDefaultValue": false,
        "__type": "TextControlDataContext"
      },
      "__type": "ControlData"
    },
    "cid1435091467898430486": {
      "Version": "1.0",
      "IsInternalControl": true,
      "ControlName": "RichTextControl",
      "ControlType": 0,
      "DataContext": {
        "Subtype": 1,
        "Value": "Office 365 content\u003cbr\u003e",
        "NoDefaultValue": false,
        "__type": "TextControlDataContext"
      },
      "__type": "ControlData"
    },
    "cid1435092311439433690": {
      "Version": "1.0",
      "IsInternalControl": true,
      "ControlName": "RichTextControl",
      "ControlType": 0,
      "DataContext": {
        "Subtype": 1,
        "Value": "",
        "NoDefaultValue": false,
        "__type": "TextControlDataContext"
      },
      "__type": "ControlData"
    },
    "cid1435091487994979407": {
      "Version": "1.0",
      "IsInternalControl": true,
      "ControlName": "RichTextControl",
      "ControlType": 0,
      "DataContext": {
        "Subtype": 1,
        "Value": "",
        "NoDefaultValue": false,
        "__type": "TextControlDataContext"
      },
      "__type": "ControlData"
    },
    "cid1435091469088714729": {
      "Version": "1.0",
      "IsInternalControl": true,
      "ControlName": "RichTextControl",
      "ControlType": 0,
      "DataContext": {
        "Subtype": 1,
        "Value": "",
        "NoDefaultValue": false,
        "__type": "TextControlDataContext"
      },
      "__type": "ControlData"
    },
    "cid143509146986680419": {
      "Version": "1.0",
      "IsInternalControl": true,
      "ControlName": "RichTextControl",
      "ControlType": 0,
      "DataContext": {
        "Subtype": 1,
        "Value": "",
        "NoDefaultValue": false,
        "__type": "TextControlDataContext"
      },
      "__type": "ControlData"
    },
    "cid1435091464093905470": {
      "Version": "1.0",
      "IsInternalControl": true,
      "ControlName": "RichTextControl",
      "ControlType": 0,
      "DataContext": {
        "Subtype": 1,
        "Value": "",
        "NoDefaultValue": false,
        "__type": "TextControlDataContext"
      },
      "__type": "ControlData"
    },
    "cid1435091429338210015": {
      "Version": "1.0",
      "IsInternalControl": true,
      "ControlName": "DocumentHookControl",
      "ControlType": 8,
      "DataContext": {
        "OfficeDocumentDataContext": {
          "DocId": "100794310",
          "ImpressionId": "",
          "Title": "Document",
          "FullDocumentUrl": "https://sktechnologies-my.sharepoint.com/personal/kshsbala_sktechnologies_onmicrosoft_com/_layouts/15/WopiFrame.aspx?sourcedoc=%7BCECC796B-AD72-44A4-87D9-8D65640E6D07%7D\u0026file=Document.docx\u0026action=interactivepreview\u0026DefaultItemOpen=1\u0026wdembedcode=0\u0026wdprint=1\u0026wdstarton=1",
          "Summary": "Last Modified On Mon Nov 23 2009",
          "DocLibTitle": "Balamurugan Kailasam",
          "DocPath": "https://sktechnologies-my.sharepoint.com/personal/kshsbala_sktechnologies_onmicrosoft_com/_layouts/15/WopiFrame.aspx?sourcedoc={CECC796B-AD72-44A4-87D9-8D65640E6D07}\u0026file=Document.docx\u0026action=view\u0026DefaultItemOpen=1",
          "FileType": 2,
          "DocumentPreviewHeight": 225,
          "DocumentPreviewWidth": 300,
          "DocumentPreviewImageUrl": "/_layouts/15/getpreview.ashx?guidFile={CECC796B-AD72-44A4-87D9-8D65640E6D07}\u0026guidSite={4fe63a08-5634-4d63-8006-d83e89c3fa9c}\u0026guidWeb=ccdfc405-ba62-437a-97d1-a081b0b2a140\u0026docid=100794310\u0026metadatatoken=\u0026ClientType=DelveWeb",
          "Author": null,
          "ModifiedTime": "\/Date(1435093231837)\/",
          "__type": "DocumentCardDataContext"
        },
        "Annotation": "",
        "ResponsiveModeEnabled": false,
        "__type": "DocumentHookDataContext"
      },
      "__type": "ControlData"
    }
  },
  "ControlMap": {
    "Rows": [
      {
        "Columns": [
          {
            "ControlId": "cid1435091429301378053",
            "HasChildren": false
          }
        ]
      },
      {
        "Columns": [
          {
            "HasChildren": false,
            "ControlId": "cid143509142933596014"
          }
        ]
      },
      {
        "Columns": [
          {
            "HasChildren": false,
            "ControlId": "cid1435091467898430486"
          }
        ]
      },
      {
        "Columns": [
          {
            "HasChildren": false,
            "ControlId": "cid1435092311439433690"
          }
        ]
      },
      {
        "Columns": [
          {
            "HasChildren": false,
            "ControlId": "cid1435091487994979407"
          }
        ]
      },
      {
        "Columns": [
          {
            "HasChildren": false,
            "ControlId": "cid1435091469088714729"
          }
        ]
      },
      {
        "Columns": [
          {
            "HasChildren": false,
            "ControlId": "cid143509146986680419"
          }
        ]
      },
      {
        "Columns": [
          {
            "HasChildren": false,
            "ControlId": "cid1435091464093905470"
          }
        ]
      },
      {
        "Columns": [
          {
            "HasChildren": false,
            "ControlId": "cid1435091429338210015"
          }
        ]
      }
    ],
    "GridSize": 12,
    "__type": "ControlMap"
  },
  "__type": "PersistedPostModel"
}

Create a channel / PointPublishing site collection:

So to create a channel, we have to create a site collection using the POINTPUBLISHINGTOPIC#0 template and the status of the site can be checked using the GetSiteStatus rest api available within the publishingsitemanager. The below script creates the channel with the specified name.

function createChannel(channelName){    
var executor = new SP.RequestExecutor("https://<tenant>/portals/hub"); executor.executeAsync(
          {
              url: "https://<tenant>/portals/hub/_api/publishingsitemanager/create",
              method: "POST",
              headers: { "content-type": "application/json;odata=verbose","Accept": "application/json; odata=nometadata" },
              body:JSON.stringify({ 'siteInfo' : {'__metadata':{ 'type':'SP.Publishing.PublishSiteInformation' }, 'Title':channelName, 'SiteType':'4'}}),
              success: function(data){
              },
              error: function(data, errorCode, errorMessage){
              }
          });
}
// Expected namespace after loaded
var namespace = "SP.RequestExecutor";
// SOD Key of target js file
var key = "sp.requestexecutor.js";
// Load straight away, or in queue
var bSync = false;
SP.SOD.executeFunc(key, namespace, function () {
    createChannel(Channel O365);
}, bSync);
  • Request: The above script sends the below request to create the pointpublishing site / channel.
siteInfo: {  __metadata: {    type: "SP.Publishing.PublishSiteInformation"
},
  Title: "O365 Channel",
  SiteType: "4"
}SiteType: "4"Title: "O365 Channel"__metadata: {
  type: "SP.Publishing.PublishSiteInformation"
}type: "SP.Publishing.PublishSiteInformation"
  • Response: Returns the SiteStatus information.
{  "FriendlyUrl": "https://tenant.sharepoint.com/portals/hub/O365-Channel",  "SiteId": "00000000-0000-0000-0000-000000000000",
"SiteUrl": "https://tenant.sharepoint.com/portals/O365-Channel",
  "Status": 3
}
  • ScreenShot: 

Get the PointPublishing site status:

Sometimes the site collection creation takes time and the status of the site can be checked using the “_api/publishingsitemanager/GetSiteStatus” rest api.

  • Request:
    • Rest end point: portals/hub/_api/publishingsitemanager/GetSiteStatus?siteInfo=%7B%27Title%27:%27O365%20Channel%27,%20%27SiteType%27:%274%27,%20%27SiteUrl%27:%27%27%7D
    • GET
    • Pass the Site Title or the Url in the query as mentioned below:
      • siteInfo: {‘Title’:’O365 Channel’, ‘SiteType’:’4′, ‘SiteUrl’:”}
  • Response: Returns the SiteId, FriendlyUrl and the Status.
<?xml version="1.0" encoding="UTF-8"?><entry xmlns="http://www.w3.org/2005/Atom" xmlns:d="http://schemas.microsoft.com/ado/2007/08/dataservices" xmlns:georss="http://www.georss.org/georss" xmlns:gml="http://www.opengis.net/gml" xmlns:m="http://schemas.microsoft.com/ado/2007/08/dataservices/metadata" xml:base="https://<tenant>.sharepoint.com/portals/hub/_api/">   <id>https://<tenant>.sharepoint.com/portals/hub/_api/publishingsitemanager/GetSiteStatus</id>
<category term="SP.Publishing.PointPublishingSiteStatus" scheme="http://schemas.microsoft.com/ado/2007/08/dataservices/scheme" />
   <link rel="edit" href="publishingsitemanager/GetSiteStatus" />
   <title />
   <updated>2015-07-04T10:23:42Z</updated>
   <author>
      <name />
   </author>
   <content type="application/xml">
      <m:properties>
         <d:FriendlyUrl>https://<tenant>.sharepoint.com/portals/hub/O365-Channel</d:FriendlyUrl>
         <d:SiteId m:type="Edm.Guid">ff48f982-88dc-4746-b6d5-d32f703e3d7a</d:SiteId>
         <d:SiteUrl>https://sktechnologies.sharepoint.com/portals/O365-Channel</d:SiteUrl>
         <d:Status m:type="Edm.Int32">2</d:Status>
      </m:properties>
   </content>
</entry>

Looking forward about this NextGen Portals within the Office 365 and more details about the NextGen portal can be found on Chris O’Brien – Info and some thoughts on Office 365 “NextGen” portals – Microsites, Boards and the Knowledge Management portal .

(Visited 469 times, 1 visits today)

About the author 

Balamurugan Kailasam

Summit Bundle

Get 200+ hours of Microsoft 365 Training for 27$!

Master Office 365, Power Platform & SharePoint & Teams With 200+ Hours Of Training Videos and 108 Ebooks in the Collab365 Academy. This offer is insane and is only available for a limited period.