Share Service
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
Name | Type | Description | Default Value |
---|
id | long | the unique ID of the direct message to which the participants will be added | |
Form Parameters
Name | Type | Description | Default Value |
---|
participant | Set | the 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
Type | Description |
---|
List of UserSummary | all participants in the direct message after this call has completed successfully. |
Posts a new comment on the specified content object.
POST http://domain:port/application_context/api/core/v2/shares/{id}/comments
Path Parameters
Name | Type | Description | Default Value |
---|
id | long | the system wide unique identifier for the content object | |
Form Parameters
Name | Type | Description | Default Value |
---|
html | DocumentParam | the HTML body of comment | |
Response
Type | Description |
---|
Response | a 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
Name | Type | Description | Default Value |
---|
id | long | the system wide unique identifier for the content object | |
userID | long | the system wide unique identifier for the user | |
Delete share
DELETE http://domain:port/application_context/api/core/v2/shares/{id}
Path Parameters
Name | Type | Description | Default Value |
---|
id | long | | |
Delete track
DELETE http://domain:port/application_context/api/core/v2/shares/{id}/tracks/{userId}
Path Parameters
Name | Type | Description | Default Value |
---|
id | long | | |
userId | long | | |
Follow
Start following the specified comment content object.
POST http://domain:port/application_context/api/core/v2/shares/{id}/followers
Path Parameters
Name | Type | Description | Default Value |
---|
id | long | the identifier of the comment content object to follow. | |
Response
Type | Description |
---|
Response | a HTTP 201 response including the URL for the subscription in the Location header |
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
Name | Type | Description | Default Value |
---|
id | long | the system wide unique identifier for the content object | |
Query Parameters
Name | Type | Description | Default Value |
---|
offset | int | the 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" |
limit | int | the 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" |
excludeReplies | boolean | whether to only include top-level comments or not | "false" |
sort | String | the order in which the comments should be returned. Possible values are threaded and chronological. Defaults to chronological. | "chronological" |
anchor | String | optional 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. | |
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
Name | Type | Description | Default Value |
---|
id | long | the identifier of the comment content object to check for followers. | |
userId | long | the id of the follower to check for | |
Response
Type | Description |
---|
UserSummary | the 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
Name | Type | Description | Default Value |
---|
id | long | the system wide unique identifier for the content object | |
userID | long | the system wide unique identifier for the user | |
Response
Type | Description |
---|
UserSummary | the 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
Name | Type | Description | Default Value |
---|
id | long | the system wide unique identifier for the content object | |
Response
Type | Description |
---|
EntityCollection | a 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
Name | Type | Description | Default Value |
---|
id | long | | |
Get share
GET http://domain:port/application_context/api/core/v2/shares/{id}
Path Parameters
Name | Type | Description | Default Value |
---|
id | long | | |
Get track
GET http://domain:port/application_context/api/core/v2/shares/{id}/tracks/{userId}
Path Parameters
Name | Type | Description | Default Value |
---|
id | long | | |
userId | long | | |
Like
Adds a like to the specified content object
POST http://domain:port/application_context/api/core/v2/shares/{id}/likes
Path Parameters
Name | Type | Description | Default Value |
---|
id | long | the system wide unique identifier for the content object | |
Response
Type | Description |
---|
Response | a 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
Name | Type | Description | Default Value |
---|
id | long | | |
Track
POST http://domain:port/application_context/api/core/v2/shares/{id}/tracks
Path Parameters
Name | Type | Description | Default Value |
---|
id | long | | |
Unfollow
Stop following the specified comment content object
DELETE http://domain:port/application_context/api/core/v2/shares/{id}/followers/{userId}
Path Parameters
Name | Type | Description | Default Value |
---|
id | long | the identifier of the comment content object. | |
userId | long | the id of the following user to be removed. | |
Unread
DELETE http://domain:port/application_context/api/core/v2/shares/{id}/read
Path Parameters
Name | Type | Description | Default Value |
---|
id | long | | |