/social/share/add/json/{type}/{title}/{description} (POST)
Add a shared object (JSON document) to the share collection. Note: Can be called via post or get.
Shares are just entries in our database where you can save any information you want. Currently our application uses the shares to store things like query history (JSON), map reduce jars(BINARY), widget swfs (BINARY), among other things. To create a share you can either call this call to add a JSON string entry or share/add/binary to insert a byte stream (such as a file). Once you have added a share only you have access to it (via your personal community). If you want others to have access to the share you can add their communities via share/add/community.
A simple web-based utility is available for performing many share management activities.
Authentication
Required, see Auth - Login
Arguments
type (required)
Type of share: dataset, query, etc.
title (required)
Arbitrary display title for the share
description (required)
Arbitrary display description for the share
json (required)
JSON object
Example
Method.Get
http://infinite.ikanow.com/api/share/add/json/type/title/description?json=%7B%22userid%22%3A%224f5e189ada7f00000000510f%22%2C%22settings%22%3A%7B%22maximized%22%3Afalse%2C%22lastTabOpen%22%3A2%7D%7D
Method.Post
Example using curl:
curl \-XPOST 'http://infinite.ikanow.com/api/share/add/json/type/title/description' \-d '{"userid":"4f5e189ada7f00000000510f","settings":{"maximized":false,"lastTabOpen":2}}'
A detailed example of adding a jar file to the share db and then accessing it to schedule a map reduce job in JAVA can be found here: Java Share Example
Example Response
{ response: { action: "New Share" success: true message: "New share added successfully." time: 10 } }