Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
API Call - /knowledge/uisetup/modules/

...

install/
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
{ "response": { "action": "Get Modules", "success": true, "message": "modules returned successfully", "time": 0 }, "data": [

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 Infinit.e sharing API.

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

Info
Code Block
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

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

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

        
"ikanow" ] },
{
            
"_id": "4cb47f41bc945854b5016b71", "swf": "ListView.swf",
//...
            "url": "
com
$infinite/
ikanow
share/
infinit/e/modules/", "title": "Results", "description": "Displays documents in a list", "created": "1286897473883",
get/4d88d0f1f9a624a4b0c8bd71"
            
"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/

Example
Code Block
langbash

#bash> curl -XPOST 'http://infinite.ikanow.com/knowledge/uisetup/modules/install' -d '{
    "url": "$infinite/share/get/4d88d0f1f9a624a4b0c8bd71",
    
"title": "
Stats
Test widget",

    
"description
"
: "
Shows
A 
entities
widget 
and
designed 
their
to 
significance
test 
in
some 
a bar and a pie chart", "created": "1286897473887", "modified": "1286897473887",
new visualization",
    "version": "
1.0", "author": "ikanow"
0.9",
    
"imageurl": "
http:
$infinite/share/
www.veryicon.com/icon/preview/System/Function/pie%20chart%2048%20Icon.jpg",
get/4d88d0f1f9a624a4b0c8bd72",
    
"approved
"
: true, "
searchterms": [
 
"Stats
"test", 
"Shows", "entities", "and", "their", "significance", "in", "a", "bar", "and", "a", "pie", "chart", "ikanow" ] }, { "_id": "4cb47f41bc945854b8016b71",
"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: 
    {
       "swf": "Timeline.swf",
            "url": "com/ikanow/infinit/e/modules/",
            "title": "Timeline" action: "Install Module",
            "description": "Shows documents on a timeline"success: true, 
           "created"message: "1286897473889",
            "modified": "1286897473889",
            "version": "1.0",
            "author": "ikanow",
            "imageurl": "http://clinicaltrials.ifpma.org/clinicaltrials/uploads/RTEmagicC_save-time_01.png.png",
            "approved": truemodule installed/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
    }
}