Support for Saved and Actionable Events
Added by IBM contributorIBM | Edited by Claudia R Elbourn on June 30, 2015
Rate this article 1 starsRate this article 2 starsRate this article 3 starsRate this article 4 starsRate this article 5 stars

There are two mechanisms for 'tracking' events in IBM connections 4.5 that are of specific interest to a user.

Actionable events

Actionable Events are marked as such by the application sending the event, by setting connections.actionable equal to true. These events, can be marked as no longer actionable by the user when they decide that they no longer have an action open relating to the event.


Saved events

Saved events are events that are marked by a user as being of specific interest to them. They can choose to remove any event from their saved list when they so choose.

 

Retrieving Saved and Actionable Events

Actionable View: /activitystreams/@me/@actions

Filtered by Application: /activitystreams/@me/@actions/blogs

Saved View: /activitystreams/@me/@saved

Filtered by Application: /activitystreams/@me/@saved/blogs

Actionable Events in the data model

As the concepts of both actionable and saved are specific to the IBM Connections experience, these are returned in the connections object within the activity as follows. If when submitting an event to the activity stream you include the actionable marker, then everyone on the recipient list will receive the event automatically in their 'actionable' list. Any 'saved' marker in the submitted event will however be ignored as it can only be set by the user.

 "connections": {




"actionable": "false",

"broadcast": "true",

"rollupid": "87d7a7fb-af22-403b-ab0d-d101d9caac4f",

"saved": "false",

"canUnFollow": "true" 

}, 

Adding and removing an event from the saved or actionable list


You can mark and unmark an event as saved or actionable by posting directly to the event URL :

PUT to activitystreams/@me/@all/@all/eventId

The data model to be passed is an AppData object, which in json terms is essentially a property list. We use properties that correspond to a subset of the properties available from the ActivityStream data model (the id in question below is unimportant).

 { 

"id":"",



"actor":{

"id":""

},

"verb":"",

"object":{

"id":""

},

"connections":{

"saved":"true"

} 

}


 
Input
Method URI Description
GET /connections/opensocial/{auth}/rest/activitystreams/@me/@actions Retrieving Actionable Events - Actionable View
GET /connections/opensocial/{auth}/rest/activitystreams/@me/@actions/{application} Retrieving Actionable Events - Actionable View
Filtered by application
GET /connections/opensocial/{auth}/rest/activitystreams/@me/@saved Retrieving Saved Events - Saved View
GET /connections/opensocial/{auth}/rest/activitystreams/@me/@saved/{application} Retrieving Saved Events - Saved View
Filtered by application
PUT /connections/opensocial/{auth}/rest/activitystreams/@me/@all/@all/{eventId} Mark and unmark an event as saved or actionable by posting directly to the event URL
Content Type: application/json
Sample Request:
 {

"id":"",


    "actor":{

        "id":""

    },

    "verb":"",

    "object":{

        "id":""

    },

    "connections":{

        "saved":"true"

    }

}
Name Type Optional Description
application
enumerated Yes Application type
Authorized values:
  • activities
  • blogs
  • files
  • forums
  • wikis
  • @people
  • @status
  • @tags
  • @communities
  • bookmarks
eventId
string Yes event ID
auth
enumerated No The authorization protocol being used by your application to access Connections Cloud.
Authorized values:
  • basic
  • oauth
Name Type Optional Description
Authorization
enumerated No The authentication mechanism selected by your application to access the API.
Basic is the Base64 encoding of the IBM Connections Cloud username and password: Base64(username:password). For example, Base64(twatson@us.ibm.com:password).
Bearer is the oauth 2.0 access token that is generated when the user grants your application access to IBM Connections Cloud services.
See the reference topic "OAuth 2.0 APIs for web server flow" for more information.
Authorized values:
  • bearer
  • basic
Output
Content Type: application/json
Code Description
401
Unauthorized. Returned when no authenticated user or no userid, email, or key parameter are provided on the request.