Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

/

...

social/

...

gui/modules/

...

Info

Returns a list of all approved modules. 

Authentication

Not Required

Arguments

none

Example

http://infinite.ikanow.com/api/knowledge/uisetup/modules/get/

Example Response

...

install
Info

Note - the "widget uploader" (widgetUploader.jsp) should be used in most cases, rather than this lower level call.

Used to POST a JSON object (specified below) to upload widget metadata (not the widget itself, which is stored separately either on a filesystem or via the sharing API.

Once the metadata has been successfully uploaded, the widget can be accessed from the GUI's module browser.

A simple web-based utility is available for installing widgets in one step.

Authentication

Required, see Auth - Login

Arguments

The content must be POSTed as a JSON object in the following format (see also the "get" API call.

Code Block
langjavascript
{
    "
response
_id": 
{ "action": "Get Modules"
string, // Optional - auto-generated if not specified. 
"success": true, "message": "modules returned successfully", "time": 0 }, "data": [ { "_id": "4cb47f41bc945854b2016b71",
If the "_id" is specified then updates the module as described below.
    "
swf
url": 
"Maps.swf"
string, // Will normally either be a public URL or the location of 
"url": "com/ikanow/infinit/e/modules/",
a shared object in Infinit.e.
    
"title": 
"Maps"
string, // The widget title displayed in the widget 
"description": "Displays documents geospatially on Google Maps",
browser and on the widget window title bar
    
"
created
description": 
"1286897473814"
string, // A description of 
"modified": "1286897473814"
the widget, displayed in the widget browser
    
"version": 
"1.0"
string, // An arbitrary string used for external versioning
    "
author
imageurl": 
"ikanow", "imageurl": "http://www.sdltridionworld.com/images/GoogleMaps_tcm89-16510.gif", "approved": true,
string, // The URL of an image used to represent the widget in the GUI framework (again normally either a public URL or share)
    "
searchterms
communityIds": [ 
"Maps", "Displays", "documents", "geospatially", "on", "Google", "Maps", "ikanow" ] }, { "_id": "4cb47f41bc945854b3016b71", "swf": "ItemDetailView.swf", "url": "com/ikanow/infinit/e/modules/", "title": "Details", "description": "Displays details of currently selected items", "created": "1286897473879", "modified": "1286897473879", "version": "1.0", "author": "ikanow", "imageurl": "http://live.gnome.org/ProjectMonkey?action\u003dAttachFile\u0026do\u003dget\u0026target\u003dmonkey.png", "approved": true,
string ], // The communities with which to share the module (must be owner/moderator/admin to share a module)
    "searchterms": [
        string // A 
"Details", "Displays", "details", "of", "currently", "selected", "items", "ikanow"
list of strings that are used in the "modules/search" API call
    
]

}
, { "_id": "4cb47f41bc945854b4016b71", "swf": "LinkAnalysis.swf", "url": "com/ikanow/infinit/e/modules/", "title": "Graph", "description": "Link Analysis view of documents and related entities", "created": "1286897473881", "modified": "1286897473881", "version": "1.0", "author": "ikanow", "imageurl": "http://www.arvatodigitalservices.com/typo3conf/ext/db_yamltv/template/04_layouts_styling/navi_link.gif", "approved": true, "searchterms": [ "Graph", "Link", "Analysis", "view", "of", "documents", "and", "related", "entities", "ikanow" ] }, { "_id": "4cb47f41bc945854b5016b71", "swf": "ListView.swf", "url": "com/ikanow/infinit/e/modules/", "title": "Results", "description": "Displays documents in a list", "created": "1286897473883", "modified": "1286897473883", "version": "1.0", "author": "ikanow", "imageurl": "http://meritbadge.org/wiki/images/thumb/2/24/ToDoList.png/64px-ToDoList.png", "approved": true, "searchterms": [ "Results", "Displays", "documents", "in", "a", "list", "ikanow" ] }, { "_id": "4cb47f41bc945854b6016b71", "swf": "RadarChart.swf", "url": "com/ikanow/infinit/e/modules/", "title": "Radar", "description": "Shows entities and their significance in a radar chart", "created": "1286897473885", "modified": "1286897473885", "version": "1.0", "author": "ikanow", "imageurl": "http://www.uwec.edu/Help/Excel07/Images/other/cht_radar.gif", "approved": true, "searchterms": [ "Radar", "Shows", "entities", "and", "their", "significance", "in", "a", "radar", "chart", "ikanow" ] }, { "_id": "4cb47f41bc945854b7016b71", "swf": "Significance.swf", "url": "com/ikanow/infinit/e/modules/", "title": "Stats", "description": "Shows entities and their significance in a bar and a pie chart", "created": "1286897473887", "modified": "1286897473887", "version": "1.0", "author": "ikanow", "imageurl": "http://www.veryicon.com/icon/preview/System/Function/pie%20chart%2048%20Icon.jpg", "approved": true, "searchterms": [ "Stats", "Shows", "entities", "and", "their", "significance", "in", "a", "bar", "and", "a", "pie", "chart", "ikanow" ] }, { "_id": "4cb47f41bc945854b8016b71", "swf": "Timeline.swf", "url": "com/ikanow/infinit/e/modules/"

There are 2 ways a module can be updated rather than uploaded:

  • If the "_id" is specified and matches an existing module
  • If no "_id" is specified but the owner has already uploaded a widget with the same "url"
    Modules can only be updated either by the owner or by the system administrator.

Note also that the URL can contain the special variable "$infinite/". This is replaced at runtime with the URL from which Infinit.e is currently running (eg in the SaaS version, "http://infinite.ikanow.com/api/"). This is particularly useful when using the share API, eg:

Code Block
langjavascript
{
    //...
    "url": "$infinite/share/get/4d88d0f1f9a624a4b0c8bd71"
    //...
}

Note finally that the following fields are added to the uploaded/updated JSON object (and are retrieved via the "module/get" API call):

Code Block
langjavascript
{
    //...
    "_id": string, // If not specified
    "created": string, // First time inserted, the Unix time in ms
    "modified": string, // Each time created or modified, the Unix time in ms
    "author": string, // The (unique) email address of the uploader
    "approved": boolean, // Currently hardwired to true
    //...
}
Example
Code Block
langbash
#bash> curl -XPOST 'http://infinite.ikanow.com/social/gui/modules/install' -d '{
    "url": "$infinite/share/get/4d88d0f1f9a624a4b0c8bd71",
    "title": "Test widget",
    "description: "A widget designed to test some new visualization",
    "version": "0.9",
    "imageurl": "$infinite/share/get/4d88d0f1f9a624a4b0c8bd72",
    "searchterms": [ "test", "visualization" ]
}'

A normal set of steps would be to upload the widget and thumbnails using the share API (saving the returned "_id"s, then upload the widget metadata as above, then test, then finally share the uploaded binaries to the relevant communities to let other users access them).

Note that there is currently a limitation in the above scenario, that all widget metadata are currently visible to all users (even though the share API protects access to the binaries themselves). A future release will fix this limitation.

Response
Info

The response format is straightforward, and most easily shown with this example:

Code Block
langjavascript
{
    response:
    {
        action: "Install Module",
            "title"success: "Timeline"true,
            "description"message: "Showsmodule documents on a timeline",
            "created": "1286897473889",
            "modified": "1286897473889",
            "version": "1.0",
            "author": "ikanow",
            "imageurl": "http://clinicaltrials.ifpma.org/clinicaltrials/uploads/RTEmagicC_save-time_01.png.png",
            "approved": trueinstalled/updated successfully" // (or the error message if success:false)
    },
            "searchterms": [
                "Timeline",
                "Shows",
                "documents",
                "on",
                "a",
                "timeline",
                "ikanow"
            ]
   data:
    },
        {
            "_id": "4cbde99af5398e7ba63af4b9",
            "swf": "DetailsView.swf",
            "url": "com/ikanow/infinit/e/modules/",
            "title": "Details",
            "description": "Displays details of currently selected items",
  4d88d0f1f9a624a4b0c8bd71", // The _id of the store, used for updating/deletion
         "created": "1287514522802",
            "modified": "1287514522802",
            "version": "1.0",
            "author": "ikanow",
            "imageurl": "http://www.hswallpapers.com/wp-content/uploads/2010/08/Bleach-Episode-284.png",
            "approved": true,
            "searchterms": [
                "Details",
                "Displays",
                "details",
                "of",
                "currently",
                "selected",
                "items",
                "ikanow"
            ]
        }
    ]
}

...

approved: true // Currently hardwired to true, since no approval mechanism currently exists
    }
}