osapi.jive.corev3.activities.Activity

An Activity represents an event that has occurred within a Jive instance. Activities are presented in the format defined by the OpenSocial Specification, which in turn extends the Activity Streams 1.0 specification. Activities are used for several different purposes within the Core API, which are described in more detail in Activity Use Cases.

Note that activities are not first-class objects and do not have URIs, so instead the URL of the object of the activity is given. In the following example, the "object" field is a document that was created.

Examples:

See the activities static class for how to create and get activities.

Example JSON

JSON with the most important data for an Activity. See the table below for a list of all fields.

{
   "url":"http://company.jive.com/docs/DOC-2131",
   "title":"A test document",
   "verb":"jive:created",
   "updated":"2012-09-28T15:35:20.761+0000",
   "content":"<a href=\"http://company.jive.com/people/fred\">Fred Flintstone</a> created <a href=\"http://company.jive.com/docs/DOC-2131\">A test document</a>",
   "object":{
     "displayName":"A test document",
     "objectType":"jive:document",
     "url":"http://company.jive.com/docs/DOC-2131",
     "summary":"Test document text",
   },
   "actor":{
      "displayName":"Fred Flintstone",
      "objectType":"jive:person",
      "url":"http://company.jive.com/people/fred"
   }
}
Create an activity

The simplest example of creating an activity stream entry. See Activity Creation for full details on creating activity stream entries programmatically. See activities for how to get activities.

 //Create a simple activity
 var request = osapi.jive.corev3.activities.create({
     "title": "Free food in the breakroom",
     "content": "There is some free cake in the breakroom for Jane's birthday"
 });

 request.execute(function(data) {
     console.log("Activity created!", data);
 });

Properties

PropertyTypeMode Description
actorObjectread-only

The person (or other object) that created this activity.

contentStringrequired

Text (or possibly HTML) content describing this activity.

generatorObjectread-only

The application used to generate this activity.

iconMediaLinkoptional

An icon associated with this activity.

idStringread-only

Internal identifier for this activity.

jiveJiveExtensionoptional

Jive extensions to the standard Activity Streams format.

objectObjectoptional

The object that was affected by this activity.

openSocialOpenSocialoptional

OpenSocial extensions to the standard Activity Streams format.

providerObjectread-only

The service instance at which this activity was generated.

publishedISO 8601 Dateread-only

The date and time at which this activity was generated.

targetObjectoptional

The object representing the "context" or "target" of this activity.

titleStringrequired

The title of this activity.

updatedISO 8601 Dateread-only

The date and time at which this activity was most recently updated.

urlStringoptional

A URL pointing at more detailed information related to this activity.

verbStringoptional

The verb describing the category of activity that took place. Verbs for Jive standard actions will be prefixed with jive:.

→ Fields used by update and create operations
→ Fields used only by create operations
→ Fields not used by update or create operations

Methods

toURI()

Retrieves

String

Description

Retrieves:
  • A URI representing this entity, or undefined if no such URI exists.