Announcement

Announcement Service

Web service endpoints for announcements.

Example:
Create Announcement

Python example of creating a new system announcement:

 import urllib2, json, base64

 uri = "/api/core/v3/announcements"
 base_url = "http://jive.mycompany.com"
 url = base_url + uri

 user = "admin"
 password = "admins_password"

 auth = "Basic " + base64.encodestring('%s:%s' % (user, password)).replace("\n","");

 headers = { "Content-Type": "application/json", "Authorization": auth }

 data = json.dumps(
        { "subject": "An important announcement created using Python!",
          "content": {
             "type": "text/html",
             "text": "Meeting now in room 123!"
             }
         })

 req = urllib2.Request(url, data, headers )

 try:
     json = urllib2.urlopen(req).read()
 except urllib2.HTTPError, e:
     print e.code
     print e.read()

 print json

Create Announcement

POST /announcements

Create a new announcement with the specified characteristics.

Query Parameters:
NameTypeRequiredDescription
minorBooleanfalseFlag indicating whether this update is a minor edit (true) or not (false)
fieldsStringfalseFields to include in the returned Announcement
Takes:
  • Announcement describing the announcement to be created
  • Retrieves:
  • Announcement
  • Return Status:
    HTTP Status CodeDescription
    201 (Created)Request was successful
    400 (Bad Request)An input field is missing or malformed
    409 (Conflict)You attempt to add an announcement to a non-place object, or to a place that does not support them
    403 (Forbidden)You are not allowed to create announcements in the specified place
    404 (Not Found)The specified parent place cannot be found

    Destroy Announcement

    DELETE /announcements/{announcementID}

    Delete the specified announcement.

    Path Parameters:
    NameTypeRequiredDescription
    announcementIDStringtrueID of the announcement to be deleted
    Return Status:
    HTTP Status CodeDescription
    204 (No Content)Request was successful
    400 (Bad Request)An input field is missing or malformed
    403 (Forbidden)You are not allowed to delete the specified announcement
    404 (Not Found)The specified announcement cannot be found

    Get Announcement

    GET /announcements/{announcementID}

    Retrieve and return the specified announcement.

    Path Parameters:
    NameTypeRequiredDescription
    announcementIDStringtrueID of the announcement to be returned
    Query Parameters:
    NameTypeRequiredDescription
    fieldsStringfalseFields to be returned
    Retrieves:
  • Announcement
  • Return Status:
    HTTP Status CodeDescription
    200 (OK)Request was successful
    400 (Bad Request)If an input field is missing or malformed
    403 (Forbidden)If you are not allowed to access the specified announcement
    404 (Not Found)If the specified announcement cannot be found

    Get System Announcements

    GET /announcements

    Return a paginated list of system announcements that are currently viewable.

    Query Parameters:
    NameTypeRequiredDescription
    activeOnlyBooleanfalseFlag indicating whether only active system announcements should be returned.
    startIndexIntegerfalseZero-relative index of the first requested announcement
    countIntegerfalseMaximum number of announcements to be returned
    fieldsStringfalseFields to include in the returned announcements
    Retrieves:
  • Announcement[]
  • Return Status:
    HTTP Status CodeDescription
    200 (OK)Request was successful
    400 (Bad Request)An input field is missing or malformed
    403 (Forbidden)You are not allowed to access the requested announcements

    Mark Read

    POST /announcements/{announcementID}/read

    Mark the specified announcement as having been read.

    Path Parameters:
    NameTypeRequiredDescription
    announcementIDStringtrueID of the announcement to be marked
    Return Status:
    HTTP Status CodeDescription
    204 (No Content)Request was successful
    400 (Bad Request)An input field was malformed
    403 (Forbidden)You are not allowed to access this announcement
    404 (Not Found)The specified announcement does not exist

    Mark Unread

    DELETE /announcements/{announcementID}/read

    Mark the specified announcement as having not been read.

    Path Parameters:
    NameTypeRequiredDescription
    announcementIDStringtrueID of the announcement to be marked
    Return Status:
    HTTP Status CodeDescription
    204 (No Content)Request was successful
    400 (Bad Request)An input field was malformed
    403 (Forbidden)You are not allowed to access this announcement
    404 (Not Found)The specified announcement does not exist

    Update Announcement

    PUT /announcements/{announcementID}

    Update the specified announcement with the specified characteristics.

    Path Parameters:
    NameTypeRequiredDescription
    announcementIDStringtrueID of the announcement to be updated
    Query Parameters:
    NameTypeRequiredDescription
    minorBooleanfalseFlag indicating whether this update is a minor edit (true) or not (false)
    fieldsStringfalseFields to include in the returned entity
    Takes:
  • Announcement representing the updated announcement
  • Retrieves:
  • An Announcement representing the updated announcement
  • Return Status:
    HTTP Status CodeDescription
    200 (OK)Request was successful
    400 (Bad Request)An input field is missing or malformed
    403 (Forbidden)You are not allowed to access the specified announcement
    404 (Not Found)The specified announcement cannot be found