Share Service

ResourceDescription
Add participantsEndpoint to add one or more users as participants in a direct message.
Create commentPosts a new comment on the specified content object.
Delete likeDeletes the user's like of the specified content object
Delete share
Delete track
FollowStart following the specified comment content object.
Get commentsReturns the latest comments for a given content object.
Get followerCheck if the user is following the specified comment content object
Get likeIndicates whether the user likes the specified content object.
Get likesGets a list of all users that like the specified content object
Get participants
Get share
Get track
LikeAdds a like to the specified content object
Read
Track
UnfollowStop following the specified comment content object
Unread

Add participants

Endpoint to add one or more users as participants in a direct message. Participants can see the entire direct message, all of its replies, and also reply themselves.

POST http://domain:port/application_context/api/core/v2/shares/{id}/participants

Path Parameters

NameTypeDescriptionDefault Value
idlongthe unique ID of the direct message to which the participants will be added 

Form Parameters

NameTypeDescriptionDefault Value
participantSetthe set of participants which will be added; duplicate participants will be ignored. Invalid URIs (either not resolvable to a user or not a vaild URI) will cause an error. 

Response

TypeDescription
List of UserSummaryall participants in the direct message after this call has completed successfully.

Create comment

Posts a new comment on the specified content object.

POST http://domain:port/application_context/api/core/v2/shares/{id}/comments

Path Parameters

NameTypeDescriptionDefault Value
idlongthe system wide unique identifier for the content object 

Form Parameters

NameTypeDescriptionDefault Value
htmlDocumentParamthe HTML body of comment 

Response

TypeDescription
Responsea HTTP 201 response including the URL for the created comment in the Location header

Example

Form Payload
html=%3Cdiv+class%3D%22jive-rendered-content%22%3EFoobar%3C%2Fdiv%3E

Delete like

Deletes the user's like of the specified content object

DELETE http://domain:port/application_context/api/core/v2/shares/{id}/likes/{userID}

Path Parameters

NameTypeDescriptionDefault Value
idlongthe system wide unique identifier for the content object 
userIDlongthe system wide unique identifier for the user 

Response

TypeDescription
void

Delete share

DELETE http://domain:port/application_context/api/core/v2/shares/{id}

Path Parameters

NameTypeDescriptionDefault Value
idlong 

Response

TypeDescription
void

Delete track

DELETE http://domain:port/application_context/api/core/v2/shares/{id}/tracks/{userId}

Path Parameters

NameTypeDescriptionDefault Value
idlong 
userIdlong 

Response

TypeDescription
void

Follow

Start following the specified comment content object.

POST http://domain:port/application_context/api/core/v2/shares/{id}/followers

Path Parameters

NameTypeDescriptionDefault Value
idlongthe identifier of the comment content object to follow. 

Response

TypeDescription
Responsea HTTP 201 response including the URL for the subscription in the Location header

Get comments

Returns the latest comments for a given content object. When excludeReplies is set to true the comments returned will be sorted by date from oldest to newest, otherwise the comments will be returned based on a pre-order, oldest first traversal of the comment tree, e.g. the following comment tree:
   1
   |-- 3
   |-- |-- 4
   |-- |-- |-- 7
   |-- |-- |-- |-- 10
   |-- |-- 6
   |-- |-- 8
   |-- 5
 
will result in comments ordered 1 3 4 7 10 6 8 5.

GET http://domain:port/application_context/api/core/v2/shares/{id}/comments?offset=int&limit=int&excludeReplies=boolean&sort=String&anchor=String

Path Parameters

NameTypeDescriptionDefault Value
idlongthe system wide unique identifier for the content object 

Query Parameters

NameTypeDescriptionDefault Value
offsetintthe number of results which should be skipped in the returned collection. For instance, if the first 25 results have already been retrieved then results after the 25th result can be retrieved by specifying an offset of 25. The minimum value for the offset is 0, specifying anything less than 0 for the offset will result in an exception."0"
limitintthe maximum number of comments to return. If there are fewer comments available in the given time period, if either after or before is provided, then fewer comments will be returned then the limit."25"
excludeRepliesbooleanwhether to only include top-level comments or not"false"
sortStringthe order in which the comments should be returned. Possible values are threaded and chronological. Defaults to chronological."chronological"
anchorStringoptional URI for a comment to anchor at. Specifying a anchor will try to return the page containing the anchor. If the anchor could not be found then the first page of comments will be returned. 

Response

TypeDescription
EntityCollectiona collection of comments on the content object.

Example

JSON Response Payload  (No Pagination)
TBD
  JSON Response (Pagination)
TBD

Get follower

Check if the user is following the specified comment content object

GET http://domain:port/application_context/api/core/v2/shares/{id}/followers/{userId}

Path Parameters

NameTypeDescriptionDefault Value
idlongthe identifier of the comment content object to check for followers. 
userIdlongthe id of the follower to check for 

Response

TypeDescription
UserSummarythe user summary for the user if the user is following and a HTTP 404 response if the user is not following

Get like

Indicates whether the user likes the specified content object.

GET http://domain:port/application_context/api/core/v2/shares/{id}/likes/{userID}

Path Parameters

NameTypeDescriptionDefault Value
idlongthe system wide unique identifier for the content object 
userIDlongthe system wide unique identifier for the user 

Response

TypeDescription
UserSummarythe user summary if the specified user likes the content object or a HTTP 404 if the user does not like the content object

Get likes

Gets a list of all users that like the specified content object

GET http://domain:port/application_context/api/core/v2/shares/{id}/likes

Path Parameters

NameTypeDescriptionDefault Value
idlongthe system wide unique identifier for the content object 

Response

TypeDescription
EntityCollectiona collection of user summaries for the users that like the content object

Example

JSON Response Payload
TBD

Get participants

GET http://domain:port/application_context/api/core/v2/shares/{id}/participants

Path Parameters

NameTypeDescriptionDefault Value
idlong 

Response

TypeDescription
List of UserSummary

Get share

GET http://domain:port/application_context/api/core/v2/shares/{id}

Path Parameters

NameTypeDescriptionDefault Value
idlong 

Response

TypeDescription
ShareEntity

Get track

GET http://domain:port/application_context/api/core/v2/shares/{id}/tracks/{userId}

Path Parameters

NameTypeDescriptionDefault Value
idlong 
userIdlong 

Response

TypeDescription
UserSummary

Like

Adds a like to the specified content object

POST http://domain:port/application_context/api/core/v2/shares/{id}/likes

Path Parameters

NameTypeDescriptionDefault Value
idlongthe system wide unique identifier for the content object 

Response

TypeDescription
Responsea HTTP 201 response including the URL for the "like" in the Location header. If this method is called more than once for the same authenticated user then a HTTP 403 status will be returned.

Read

POST http://domain:port/application_context/api/core/v2/shares/{id}/read

Path Parameters

NameTypeDescriptionDefault Value
idlong 

Response

TypeDescription
void

Track

POST http://domain:port/application_context/api/core/v2/shares/{id}/tracks

Path Parameters

NameTypeDescriptionDefault Value
idlong 

Response

TypeDescription
Response

Unfollow

Stop following the specified comment content object

DELETE http://domain:port/application_context/api/core/v2/shares/{id}/followers/{userId}

Path Parameters

NameTypeDescriptionDefault Value
idlongthe identifier of the comment content object. 
userIdlongthe id of the following user to be removed. 

Response

TypeDescription
void

Unread

DELETE http://domain:port/application_context/api/core/v2/shares/{id}/read

Path Parameters

NameTypeDescriptionDefault Value
idlong 

Response

TypeDescription
void