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
Info | |
---|---|
Code Block | 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. |
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 | ||
---|---|---|
| ||
{ "_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. " createdurl":"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", " modifiedversion":"1286897473879" string, // An arbitrary string used for external versioning"version": "1.0",
" authorimageurl":"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 | ||
---|---|---|
| ||
"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 | ||
---|---|---|
| ||
#bash> curl -XPOST 'http://infinite.ikanow.com/knowledge/uisetup/modules/install' -d '{ "url": "$infinite/share/get/4d88d0f1f9a624a4b0c8bd71", "title": " StatsTest widget",
"description ": " ShowsAentities widgetand designedtheir tosignificance testin somea 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:
|
...
|