static osapi.jive.corev3.extStreamActivities

Static class for getting or creating any content type. Specific content types also have their own static classes for manipulating that content type. The more specific classes function similarly, but the "type" field is not required and there might be more functionality specific to that type. For example, dms is the static class for creating and getting discussions. Content types include:

  • discussion (Discussion) - a discussion, which is the beginning of a conversation.
  • document (Document) - a document in Jive that can be discussed and shared with other people.
  • file (File) - a file in Jive that can be discussed and shared with other people.
  • poll (Poll) - a poll where people can vote to make a decision or express an opinion.
  • post (Post) - an entry in a blog.
  • favorite (Favorite) - a link to content around the web that can be shared and discussed.
  • task (Task) - a task for a person to get things done.
  • update (Update) - a user status update.
Example:
Get a document by URI

You may want to save the URIs of content types for future use. URIs are the handles used to retrieve objects throughout the API. Here is an example of using the URI of a document to retrieve all fields of that document. Note that the "fields" parameter takes a comma-delimited list of fields or the special values "@all" and "@summary".

 //Get all fields of a document by URI
 var documentURI = ...; //A given URI of a document
 <p>
 var request = osapi.jive.corev3.contents.get({
     "type": "document",
     "uri": documentURI,
     "fields": "@all"
 });
 <p>
 request.execute(function(data) {
     console.log("Fetched the document!", data);
 });

Methods

create(extstreamactivity,options)
POST /contents

Description

Create a new content object with specified characteristics, and return an entity representing the newly created content object.

The specific JSON varies per type of content. Follow these links to see creation examples for each type of content:

Takes:
  • Content fields describing the new content
Options:
NameTypeRequiredDescription
fieldsStringfalseNames of the fields to be returned
Retrieves:
  • Content describing the newly created content
  • get(options)
    GET /contents

    Retrieves

    Content[]

    Description

    Return a paginated list of content object that match the specified criteria.

    Options:
    NameTypeRequiredDescription
    authorStringfalseURI of a person, limiting results to objects authored by this person
    entityDescriptorStringfalseComma delimited list of object type / object ID values (useful only for the Jive UI). When used other filters are not allowed
    countIntegerfalseMaximum number of objects to return (default is 25)
    fieldsStringfalseComma delimited list of the fields to be returned.
    placeStringfalseURI of a place, limiting results to objects contained in that place
    searchStringfalseOne or more search terms separated by commas, limiting results to objects that match the terms
    startIndexIntegerfalseZero-relative index of the first content object to be returned
    tagStringfalseComma delimited list of tag values, limiting results to objects with one of those tags
    typeStringfalseComma delimited list of content object types, limiting results to objects of those types
    Retrieves:
  • Content[] Paginated list of matching content objects
  • get(options)
    GET /contents/{uri}

    Retrieves

    Content

    Description

    Return a single content object by its URI.

    Options:
    NameTypeRequiredDescription
    uriStringtrueURI of the content object to get
    fieldsStringfalseNames of the fields to be returned
    Retrieves:
  • Content Representation of the requested content object
  • getEditable(options)
    GET /contents/{uri}/editable

    Retrieves

    Content

    Description

    Return a single editable content object by its URI.

    Options:
    NameTypeRequiredDescription
    uriStringtrueURI of the content object to get
    fieldsStringfalseNames of the fields to be returned
    Retrieves:
  • Content Representation of the requested content object