Versions Compared

Key

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

...

Info

An all inclusive share API call to handle all the other API calls in one.

GET - With an ID returns a single share share/get
GET - Without an ID does a share/search
POST - Create a share - does a share/add json ref Social - Share - Add - Referencebinary and then handles comms via share/add/comm share/remove/comm
PUT - Update a share - does a share/update json ref Social - Share - Update - Referencebinary and then handles comms via share/add/comm share/remove/comm
DELETE - Remove a share - does a share/remove

Passing data in the body details:
If JSON data:
 -if just share data in body, make sure to set the query arguments for title/desc/communitiyIds/type/etc and be certain to set extra query argument "data_type=json" this will let the API know to set the body to obj.share
 -if entire share object in body, no need to set query arguments, set data in obj.share field
If binary file data: set query arguments for title/desc/etc and make sure ?type=binary, make sure to set the mediatype of the incoming request as we use that to set the type of the binary file

 

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.

...

readWrite (optional)
readWrite param of search

data_type (optional)
extra argument when set to type=json will read body of request as share data and set obj.share equal to that (see info section at top of page for reference)

Body

In the body/payload of a request you can send a share object, will pull out the necessary fields, e.g. can be used when sending a new JSON share on a POST request e.g. {"title":"new share","type":"test type", "description":"desc","share":"{\"data\":\"some data here\"}"}

...