/widget

Endpoints for manipulating MyPage widgets.

Table of Contents #

GET /widget #

Gets settings and metadata for a widget.

Request

GET /widget/

Parameters

widgetId : guid of the widget

Response

Example: The query widget?widgetid=2893cfc6-4b6f-4df3-95ff-20733868e0ff&type=json

{
   Widget: {
         WidgetProjectId: "f33e0b2e-41bf-4d6a-bea1-08225b1b0fbd",
         IsMinimized: false,
         Title: "Heat for Entities in List",
         Settings: {
            DocumentTypes: "",
            Filter: "",
            ForceDB: "False",
            IgnoreOtherFilters: "False",
            PageSize: "25",
            ProjectId: "253",
            RprtRunnerPageSize: "25",
            UseWidgetSettings: "True"
         },
   CreatedDate: "2013-10-04T14:23:39",
   Key: "EntityHeatInProject",
   IsInEditMode: false,
   SettingsVersion: 2,
   LegacyWidgetId: 0,
   Id: "2893cfc6-4b6f-4df3-95ff-20733868e0ff",
   OrderNo: 0,
   WidgetGroup: "MiddleZone",
   LastUpdatedUtc: "2013-10-06T20:05:40"
   },
   LastUpdated: "0001-01-01T00:00:00"
}

GET /widget/delete #

Deletes an existing widget.

Request

GET /widget/delete

Parameters

widgetId : The widget to delete

Response

Example: The query /widget/delete?widgetId=2d1ccc42-0210-4ad9-894f-38386eefd33b&type=json will produce

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

Success will be true if widget was deleted, false otherwise.

GET /widget/save #

Save a widget. If the widget did not exist before, it will be created.

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

Request

GET /widget/save

Parameters

widgetJSON : A json object of the widget you want to save.

forceSave : A bool value if you want to force the save of the widget. Normally it checks to see that the lastupdated timestamp matches.

tabId : To create and save a new widget use the parameter tabId for the widget.

widgetId : To update an existing widget use the parameter widgetId to specify the widget.

Response

If the save fails an error result will be returned.

Example:

{
    Error: "Failed to save widget",
    LastUpdated: "0001-01-01T00:00:00"
}

Example: The query

/widget/save?widgetJson=widgetJSON=%7B%22WidgetProjectId%22:%22a5bf41fb-9d45-4b46-a63d-c79829d6a725%22,%22IsMinimized%22:false,%22Title%22:%22Blogs%22,%22SettingsData%22:%7B%22DocumentGroupKey%22:%22Blogs%22,%22DefaultSortValue%22:%22publicationDate%22,%22NoDocuments%22:10,%22RprtRunnerNoDocuments%22:100,%22RprtRunnerSortValue%22:%22publicationDate%22,%22IncludeTeasers%22:true,%22IncludeTranslatedTeasers%22:true,%22ShowDuplicates%22:false,%22UseAutoRefresh%22:false,%22ForceDB%22:true,%22Filter%22:%22%22,%22IgnoreOtherFilters%22:false,%22UseWidgetSettings%22:false,%22IncludeWidget%22:true%7D,%22CreatedDate%22:%222014-01-30T14:58:21Z%22,%22Key%22:%22BlogList%22,%22IsInEditMode%22:false,%22SettingsVersion%22:2,%22LegacyWidgetId%22:0,%22Query%22:%22DocType:Blog+AND+Hillary+Clinton+%5BPerson%5D%22,%22RssLink%22:%22https:%2F%2Fapi-ci.silobreaker.com%2Fwidget%2Frss%3Fwid%3Dc7e1ef71-582e-4e52-a853-01d252c6dbbe%26type%3Datom10%26apikey%3Dw3tmhp0skbyp56zx2dpn%26digest%3D4OALRxYAAb8grAZaE%252bCdUZmpSQg%253d%22,%22Id%22:%22c7e1ef71-582e-4e52-a853-01d252c6dbbe%22,%22OrderNo%22:0,%22WidgetGroup%22:%22MiddleZone%22,%22LastUpdatedUtc%22:%222014-07-21T12:38:02Z%22%7D&type=json

will produce

{
    Widget: {
        WidgetProjectId: "d79aea00-2b44-48f3-a3e5-2084ab9b7f2e",
        IsMinimized: false,
        Title: "Api Heat",
        Settings: {
            DocumentTypes: "News;Reports;Press Releases;Blogs;Audio/Video;Fact Sheets;User Comment",
            Filter: "",
            ForceDB: "False",
            IgnoreOtherFilters: "False",
            PageSize: "10",
            ProjectId: "657",
            RprtRunnerPageSize: "10",
            UseWidgetSettings: "False"
        },
        CreatedDate: "2013-01-29T16:32:25",
        Key: "EntityHeatInProject",
        IsInEditMode: false,
        SettingsVersion: 2,
        LegacyWidgetId: 0,
        Id: "2d1ccc42-0210-4ad9-894f-38386eefd33b",
        OrderNo: 0,
        WidgetGroup: "LeftZone",
        LastUpdatedUtc: "2013-11-15T21:45:10Z"
    },
    LastUpdated: "0001-01-01T00:00:00"
}

GET /widget/rss #

Creates and gets an RSS feed/link for the supplied widget.

This is used for the RSS feed on mypage widgets. In order to use this api call the widget id must be specified and only digested requests are accepted. Please read the authentication details for further information on how to generate digest urls.

Request

GET /widget/rss

Parameters

wid : Widget id

Response

Example: The query https://api.silobreaker.com/widget?wid=0a5dccd4-1035-4fd0-a3fd-1064c9bab418&type=atom10&apikey=mync5w445k727f8k14x3&digest=RgCtkO1JQ%2fDASvPM28g81FuRr1g%3d will produce

<?xml version='1.0' encoding='UTF-8'?>
<feed xmlns="http://www.w3.org/2005/Atom">
    <title type="text">Top Stories</title>
    <id>uuid:43a7583e-56a3-4586-a24e-01151e1d1f99;id=7</id>
    <updated>2013-11-15T20:51:55Z</updated>
    <author>
        <name>Silobreaker Ltd</name>
        <uri>http://www.silobreaker.com</uri>
        <email>info@silobreaker.com</email>
    </author>
</feed>

GET /widget/export #

Exports the contents of a widget into xml, rtf, docx or html.

Widgets showing documents support this feature.

Request

GET /widget/export

Parameters

widgetId : Widget id

filter : add a extra filter for the widget. i.e "Barack Obama"

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

Response

Example: The query widget/export?widgetid=0a5dccd4-1035-4fd0-a3fd-1064c9bab418&type=html will produce a html file.


Documentation generated by mdoc.