/mypagetab

These API requests retrieves and updates data about a MyPage tab. A tab consist of it's own data such as title, query, etc. It also holds a number of widgets. These widgets has a widgetGroup and orderNo to specify the position on the current tab. To change the widget settings see the documentation for Widget.

Table of Contents #

GET /mypagetab #

Gets all information about a tab and it's widgets.

This is the main request to retrieve all information about a tab and it's widgets. In order to identify the correct MyPage tab a tabId or projectId must be included in the parameters.

Request

GET /mypagetab

Parameters

Either tabId or projectId must be specified, it is of no importance which one.

tabId : tabId for the tab, represented by a Guid.

projectId : projectId for the tab, represented by an integer.

Response

Note: This request only supports type json/jsonp response types.

Example: The api request mypagetab?projectid=18611&type=json will produce

{
   Items: [
   {
      Widget: {
         WidgetProjectId: "e8a39516-7a4a-4d8f-9b7e-57947f6c731d",
         IsMinimized: false,
         Title: "HTML5",
         Settings: {
            DocumentGroupKey: "Blogs",
            Filter: "Keyphrase:HTML5 AND (Keyphrase:Android OR Product:"Apple iOS" OR Product:"Windows Phone 7" OR Product:"Windows Phone 8")",
            IncludeTeasers: "True",
            IncludeTranslatedTeasers: "True",
            NoDocuments: "10",
            RprtRunnerNoDocuments: "20",
            ShowDuplicates: "False",
            UseAutoRefresh: "True",
            UseWidgetSettings: "False"
         },
         CreatedDate: "2012-11-25T23:13:24",
         Key: "BlogList",
         IsInEditMode: false,
         SettingsVersion: 2,
         LegacyWidgetId: 920521472,
         Query: "DocType:Blog AND Keyphrase:HTML5 AND (Keyphrase:Android OR Product:"Apple iOS" OR Product:"Windows Phone 7" OR Product:"Windows Phone 8")",
         Id: "c5b453b0-78de-4787-95ee-478ad85bc9e3",
         OrderNo: 0,
         WidgetGroup: "MiddleZone",
         LastUpdatedUtc: "2012-11-25T23:13:24"
      },
      LastUpdated: "0001-01-01T00:00:00"
   },
   {
      Widget: {
         WidgetProjectId: "e8a39516-7a4a-4d8f-9b7e-57947f6c731d",
         IsMinimized: false,
         Title: "Blizz news",
         Settings: {
            ExcludeClusterIds: "",
            Filter: "Product:"Diablo III" AND (Company:Blizzard Entertainment OR Company:"Activision Blizzard Inc")",
            IncludeContentSections: "False",
            IncludeImages: "True",
            IncludeRelatedEntities: "True",
            NoTopStories: "17",
            RprtRunnerNoTopStories: "20",
            RprtRunnerTopStoryMethod: "",
            TopicId: "0",
            TopStoryMethod: "",
            UseWidgetSettings: "False"
         },
         CreatedDate: "2012-11-25T23:13:24",
         Key: "TopStories",
         IsInEditMode: false,
         SettingsVersion: 2,
         LegacyWidgetId: 1279229286,
         Query: "Product:"Diablo III" AND (Company:Blizzard Entertainment OR Company:"Activision Blizzard Inc")",
         Id: "741c174a-73be-49c4-98b5-66d747819ade",
         OrderNo: 0,
         WidgetGroup: "LeftZone",
         LastUpdatedUtc: "2012-11-25T23:13:24"
      },
      LastUpdated: "0001-01-01T00:00:00"
   }],            
   Extras: {
      WidgetTab: {
         WidgetProject: {
            Id: "e8a39516-7a4a-4d8f-9b7e-57947f6c731d",
            ProjectItemId: 18611,
            Description: "Tech stuff",
            WidgetProjectType: "MyPageTab",
            OwnerUserName: "Halif",
            Filter: "",
            ReadOnly: false,
            Shared: false,
            SharingState: "Undefined",
            LastUpdatedUtc: "2013-11-13T17:44:26",
            CreatedDateUtc: "2012-11-25T23:13:24"
         },
         LastUpdated: "0001-01-01T00:00:00"
      }
   },
   LastUpdated: "0001-01-01T00:00:00"
}

GET /mypagetab/clone #

Clone a MyPage tab to the caller's account.

This api call is to create copies of MyPage tabs that you own or that has been shared to you. Once cloned you have full access to the MyPage tab.

Request

myPageTab/clone

Parameters

Either tabId or projectId must be specified, it is of no importance which one.

tabId : tabId for the tab, represented by a Guid.

projectId : projectId for the tab, represented by an integer.

Response

Example: The request mypagetab/clone?projectid=2985 will produce

{
    WidgetProject: {
        Id: "1300e4c0-b265-440b-915e-a2308bb125c9",
        ProjectItemId: 1337,
        Description: "eatmyshorts",
        WidgetProjectType: "MyPageTab",
        OwnerUserName: "bart",
        Filter: "",
        ReadOnly: false,
        Shared: false,
        SharingState: "OwnedByUser",
        CreatedDateUtc: "2014-03-11T13:42:37Z"
    },
    LastUpdated: "0001-01-01T00:00:00"
}

GET /mypagetab/delete #

Delete a MyPage tab or remove access to it if it's a tab shared to you.

Request

mypagetab/delete

Parameters

Either tabId or projectId must be specified, it is of no importance which one.

tabId : tabId for the tab, represented by a Guid.

projectId : projectId for the tab, represented by an integer.

Response

Example: The request mypagetab/delete?projectid=2985 will produce

{
    Success: true,
    LastUpdated: "0001-01-01T00:00:00"
}

GET /mypagetab/create #

Create a new MyPage tab for the user.

Request

myPageTab/create

Parameters

description : The title of the new MyPage tab

Response

Example: The request mypagetab/create?type=json&description=eatmyshorts will produce

{
   WidgetProject: {
      Id: "1300e4c0-b265-440b-915e-a2308bb125c9",
      ProjectItemId: 1337,
      Description: "eatmyshorts",
      WidgetProjectType: "MyPageTab",
      OwnerUserName: "bart",
      Filter: "",
      ReadOnly: false,
      Shared: false,
      SharingState: "OwnedByUser",
      CreatedDateUtc: "2014-03-11T13:42:37Z"
   },
   LastUpdated: "0001-01-01T00:00:00"
}

GET /mypagetab/move #

Move a MyPage tab.

This will change the order of the returned tabs when querying the /mypagetabs endpoint. All tabs with a higher ordinality than the newly updated will automatically be moved further back. For example, if you have the tab list [tabA, tabB, tabC] and move tabB to position 0, the following calls listing MyPageTabs will return the list [tabB, tabA, tabC].

Request

myPageTab/move

Parameters

Either tabId or projectId must be specified, it is of no importance which one.

tabId : tabId for the tab, represented by a Guid.

projectId : projectId for the tab, represented by an integer.

orderNo : New position for the tab

Response

GET /mypagetab/update #

Update an existing mypagetab.

It takes a json object with all the settings for the MyPage.

Request

mypagetab/update

Parameters

widgetProjectJSON : The widgetProject in a json form. To list all of the possible keys, retrieve an existing myPageTab and inspect the response.

Response

Example:

GET myPageTab/update?type=jsonp&widgetProjectJSON=%7B"Id":"1300e4c0-b265-440b-915e-a2308bb422c9","ProjectItemId":2986,"Description":"testingnewmypage323","WidgetProjectType":"MyPageTab","OwnerUserName":"halif","OwnerDisplayName":"halif","ReadOnly":false,"Shared":false,"SharingState":"OwnedByUser","LastUpdatedUtc":"2014-03-18T10:50:51","CreatedDateUtc":"2014-03-12T07:44:43"

will return:

{
   WidgetProjects: [
      {
         Id: "1300e4c0-b265-440b-915e-a2308bb422c9",
         ProjectItemId: 2986,
         Description: "testingnewmypage323",
         WidgetProjectType: "MyPageTab",
         OwnerUserName: "halif",
         OwnerDisplayName: "halif",
         Filter: "",
         ReadOnly: false,
         Shared: false,
         SharingState: "OwnedByUser",
         LastUpdatedUtc: "2014-03-18T10:50:51",
         CreatedDateUtc: "2014-03-12T07:44:43"
      }
   ],
   LastUpdated: "0001-01-01T00:00:00"
}

GET /mypagetab/islatestversion #

Checks if the supplied MyPage tab has been changed.

As it is possible to work on MyPages similtanously, it is neccessary to know if there has been any changes. By comparing the lastUpdatedUtc time for the MyPage tab and all the widgets it will be able to respond with a result value of either stale or current.

Request

mypagetab/islatestversion

Parameters

projectId : The unique projectId for the specific mypagetab.

tabId : This is needed to know which MyPage tab is being referred.

lastUpdatedUtc : The point when the MyPage tab was changed last.

widgetsJSON : A json object for all the widgets on the MyPage tab. Expects the format to be widgetId:lastUpdatedUtc.

Response

Example:

GET MyPageTab/IsLatestVersion?type=json&tabid=3e0dc653-3f72-40ee-a0e3-c5dca9afcc21&lastUpdatedUtc=11/16/2013%2018:39:30&widgetsJSON={"e443e70d-c365-4bac-bb77-4c063fd93036":"11/16/2013%2017:43:21","dd13479c-a16c-4571-949e-01100920bc53":"11/14/2013%2017:58:51"}

will produce

{
    Result: "Current",
    LastUpdated: "0001-01-01T00:00:00"
}

GET /mypagetab/layout/update #

Updates the layout of widgets on a MyPage tab.

Each widget on a MyPage tab has it's own widgetGroup and orderNo to calculate the layout. This request is used to update those properties when a widget has changed place on a MyPage tab. If it managed to update it will return all the widgets for the current MyPage tab.

Request

myPageTab/layout/update

Parameters

widgetId : The id of the widget that has been moved.

orderNo : The new order number for the widget. A lower order number means that the widget will be placed higher up.

widgetGroup : The area of where the widget should be located. Currently these areas are valid:

Response

Example:

MyPageTab/layout/update?orderNo=0&widgetId=7d22fd64-3efc-4d72-8fea-16c06d0feba1&widgetGroup=RightZone

will return

{
   Items: [
   {
      Widget: {
         WidgetProjectId: "e8a39516-7a4a-4d8f-9b7e-57947f6c731d",
         IsMinimized: false,
         Title: "HTML5",
         Settings: {
            DocumentGroupKey: "Blogs",
            Filter: "Keyphrase:HTML5 AND (Keyphrase:Android OR Product:"Apple iOS" OR Product:"Windows Phone 7" OR Product:"Windows Phone 8")",
            IncludeTeasers: "True",
            IncludeTranslatedTeasers: "True",
            NoDocuments: "10",
            RprtRunnerNoDocuments: "20",
            ShowDuplicates: "False",
            UseAutoRefresh: "True",
            UseWidgetSettings: "False"
         },
         CreatedDate: "2012-11-25T23:13:24",
         Key: "BlogList",
         IsInEditMode: false,
         SettingsVersion: 2,
         LegacyWidgetId: 920521472,
         Query: "DocType:Blog AND Keyphrase:HTML5 AND (Keyphrase:Android OR Product:"Apple iOS" OR Product:"Windows Phone 7" OR Product:"Windows Phone 8")",
         Id: "c5b453b0-78de-4787-95ee-478ad85bc9e3",
         OrderNo: 0,
         WidgetGroup: "MiddleZone",
         LastUpdatedUtc: "2012-11-25T23:13:24"
      },
      LastUpdated: "0001-01-01T00:00:00"
   },
   {
      Widget: {
         WidgetProjectId: "e8a39516-7a4a-4d8f-9b7e-57947f6c731d",
         IsMinimized: false,
         Title: "Blizz news",
         Settings: {
            ExcludeClusterIds: "",
            Filter: "Product:"Diablo III" AND (Company:Blizzard Entertainment OR Company:"Activision Blizzard Inc")",
            IncludeContentSections: "False",
            IncludeImages: "True",
            IncludeRelatedEntities: "True",
            NoTopStories: "17",
            RprtRunnerNoTopStories: "20",
            RprtRunnerTopStoryMethod: "",
            TopicId: "0",
            TopStoryMethod: "",
            UseWidgetSettings: "False"
         },
         CreatedDate: "2012-11-25T23:13:24",
         Key: "TopStories",
         IsInEditMode: false,
         SettingsVersion: 2,
         LegacyWidgetId: 1279229286,
         Query: "Product:"Diablo III" AND (Company:Blizzard Entertainment OR Company:"Activision Blizzard Inc")",
         Id: "741c174a-73be-49c4-98b5-66d747819ade",
         OrderNo: 0,
         WidgetGroup: "LeftZone",
         LastUpdatedUtc: "2012-11-25T23:13:24"
      },
      LastUpdated: "0001-01-01T00:00:00"
   }],            
   Extras: {
      WidgetTab: {
         WidgetProject: {
            Id: "e8a39516-7a4a-4d8f-9b7e-57947f6c731d",
            ProjectItemId: 18611,
            Description: "Tech stuff",
            WidgetProjectType: "MyPageTab",
            OwnerUserName: "Halif",
            Filter: "",
            ReadOnly: false,
            Shared: false,
            SharingState: "Undefined",
            LastUpdatedUtc: "2013-11-13T17:44:26",
            CreatedDateUtc: "2012-11-25T23:13:24"
         },
         LastUpdated: "0001-01-01T00:00:00"
      }
   },
   LastUpdated: "0001-01-01T00:00:00"
}

GET /mypagetab/export #

Exports a MyPage tab and all it's contents to xml, rtf, docx or html.

Request

mypagetab/export

Parameters

projectId : Project id without itemclass. i.e 235

projectRef : ProjectId with itemclass. i.e 15_235

exportFormat : the output format type. Available types are xml, html, rtf, docx.

fromDate : Limit the content to only include content that was published after this date. Combine with toDate to get a specific range

toDate : Limit the content to only include content that was published before this date. Combine with fromDate to get a specific range

Response

Example: The query mypagetab/export?projectref=15_694&type=html will produce a html File.


Documentation generated by mdoc.