GET api/social/v1-alpha3/{portalContainerName}/activity_stream/spacesByTimestamp.{format}

Gets space activities based on a specific time.

URL:

http://{domain_name}/{rest_context_name}/private/api/social/v1-alpha3/{portalContainerName}/activity_stream/spacesByTimestamp.{format}

Level API: Platform

Requires Authentication: true

Parameters:

  • Required (path parameters):

Parameter Description
portalContainerName The portal container name.
format The format of the returned result, for example, JSON or XML.
  • Optional (query parameters):

Parameter Description
limit Specifies the number of activities to retrieve. It must be less than or equal to 100. The value you pass as limit is a maximum number of activities to be returned. The actual number of activities you receive maybe less than limit. If it is not specified, the default value will be 100.
since_time Returns the activities having the created timestamps greater than the specified since_time's created timestamp.
max_time Returns the activities having the created timestamp less than the specified max_time's created timestamp. Note that since_time and max_time must not be defined in one request, if they are defined, the since_time query param is chosen.
number_of_comments Specifies the latest number of comments to be displayed along with each activity. By default, number_of_comments=0. If number_of_comments is a positive number, this number is considered as a limit number that must be equal or less than 100. If the actual number of comments is less than the provided positive number, the number of actual comments must be returned. If the total number of comments is more than 100, it is recommended to use "activity/:activityId/comments.format" instead.
number_of_likes Specifies the latest number of detailed likes to be returned along with this activity. By default, number_of_likes=0. If number_of_likes is a positive number, this number is considered as a limit number that must be equal or less than 100. If the actual number of likes is less than the provided positive number, the number of actual likes must be returned. If the total number of likes is more than 100, it is recommended to use "activity/:activityId/likes.format" instead.

Request example:

 GET: {@code http://localhost:8080/rest/private/api/social/v1-alpha3/socialdemo/activity_stream/spaces.json?limit=30&since_id=12345&number_of_comments=5&number_of_likes=5}

Response:

 {
   "activities":[
     {
       "id":"1a2b3c4d5e6f7g8h9j",
       "title":"Hello World!!!",
       "appId":"",
       "type":"DEFAULT_ACTIVITY",
       "postedTime":123456789,
       "createdAt":"Fri Jun 17 06:42:26 +0000 2011",
       "priority":0.5,
       "templateParams":{

       },
       "titleId":"",
       "body": "",
       "identityId":"123456789abcdefghi",
       "liked":true,
       "likedByIdentities":[
         {
           "id":"123456313efghi",
           "providerId":"organization",
           "remoteId":"demo",
           "profile":{
             "fullName":"Demo GTN",
             "avatarUrl":"http://localhost:8080/profile/u/demo/avatar.jpg?u=12345"
           }
         }
       ],
       "totalNumberOfLikes":20,
       "posterIdentity":{
         "id":"123456313efghi",
         "providerId":"organization",
         "remoteId":"demo",
         "profile":{
           "fullName":"Demo GTN",
           "avatarUrl":"http://localhost:8080/profile/u/demo/avatar.jpg?u=12345"
         }
       },
       "comments":[
         {

         }
       ],
       "totalNumberOfComments":1234,
       "activityStream":{
         "type":"user",
         "prettyId":"root",
         "fullName": "Root Root",
         "faviconUrl":"http://demo3.exoplatform.org/favicons/exo-default.jpg",
         "title":"Activity Stream of Root Root",
         "permaLink":"http://localhost:8080/profile/root"
       }
     },
     {
       "id":"1a210983123f7g8h9j",
       "title":"Hello World 1!!!",
       "appId":"",
       "type":"DEFAULT_ACTIVITY",
       "postedTime":123456789,
       "createdAt":"Fri Jun 19 06:42:26 +0000 2011",
       "priority":0.5,
       "templateParams":{

       },
       "titleId":"",
       "body": "",
       "identityId":"123456789abcdefghi",
       "liked":true,
       "likedByIdentities":[
         {
           "id":"123456313efghi",
           "providerId":"organization",
           "remoteId":"demo",
           "profile":{
             "fullName":"Demo GTN",
             "avatarUrl":"http://localhost:8080/profile/u/demo/avatar.jpg?u=12345"
           }
         }
       ],
       "totalNumberOfLikes":20,
       "posterIdentity":{
         "id":"123456313efghi",
         "providerId":"organization",
         "remoteId":"demo",
         "profile":{
           "fullName":"Demo GTN",
           "avatarUrl":"http://localhost:8080/profile/u/demo/avatar.jpg?u=12345"
         }
       },
       "comments":[
         {

         }
       ],
       "totalNumberOfComments":1234,
       "activityStream":{
         "type":"user",
         "prettyId":"root",
         "fullName": "Root Root",
         "faviconUrl":"http://demo3.exoplatform.org/favicons/exo-default.jpg",
         "title":"Activity Stream of Root Root",
         "permaLink":"http://localhost:8080/profile/root"
       }
     }
   ]
 }
Copyright ©2018. All rights reserved. eXo Platform SAS
blog comments powered byDisqus