static
osapi.jive.corev3.actions
Actions
are activities directed towards specific users. Actions show up in the "Actions" stream on a user's
home page. Actions are created via the activities.create function.
See Activity Creation
for full details on how to create actions (and other kinds of activities).
See the example below for a quick introduction to creating actions.
Examples:
Here is an example of getting a list of actions, i.e. activities that are directed to the requesting person. Actions have action links for the recipient to click.
//Get 10 actions with actions.get static method var request = osapi.jive.corev3.actions.get({ "count": 10 }); request.execute(function(data) { console.log("Fetched 10 activities!", data); });
Here is an example of sending actions to 2 users. The actions have action links that perform HTTP POST requests when clicked. These will show up in a user's "Actions" stream of their home page.
//Send actions to 2 users with action links var actionJSON = { "openSocial" : { "actionLinks" : [ { "caption" : "Yes", "httpVerb" : "POST", "target" : "http://home.example.com/yes" }, { "caption" : "No", "httpVerb" : "POST", "target" : "http://home.example.com/no" } ], "deliverTo" : [ "https://example.jiveon.com/api/core/v3/people/2345", "https://example.jiveon.com/api/core/v3/people/3456", ]}, "title" : "Can you donate food to the food drive?", "content" : "Please help out!", }; var request = osapi.jive.corev3.activities.create(actionJSON); request.execute(function() { alert("Actions sent!"); });
Methods
get(options)
GET /actions
Retrieves
Activity[]
Description
Return a list of inbox actions for the authenticated person, which match the specified criteria.
Options:
Name | Type | Required | Description |
---|---|---|---|
after | String | false | Date/time representing the minimum timestamp of a returned action. Cannot specify both after and before |
before | String | false | Date/time representing the maximum timestamp of a returned action. Cannot specify both after and before |
count | Integer | false | Maximum number of actions to be returned (default is 25) |
entryState | String | false | Optional filter to select only entries with one of the specified entry states
(default is awaiting_action ) |
fields | String | false | Names of the fields to be returned |