h3. {noformat}activity_stream/:identityId{noformat}  {anchor:id=SOCref.DevRef.V1alpha1.ActivityStreamResource.Identity}

h4. GET {noformat}activity_stream/:identityId.format{noformat} {anchor:id=SOCref.DevRef.V1alpha1.ActivityStreamResource.Identity.GetDefault}

*Description*: Gets activities of a defined identity which can be a user identity, a space identity, or any type of identities.
There is one special _identityId_ called "me" which stands for the authenticated user who makes this request.

*Url*:

{code}http://{domain_name}/{rest_context_name}/private/api/social/{version}/{portal_container_name}/activity_stream/:identityId.{format}{code}

For example:

* [http://platform35.demo.exoplatform.org/rest/private/api/social/v1-alpha3/portal/activity_stream/1234567890.json]
* [http://platform35.demo.exoplatform.org/rest/private/api/social/v1-alpha3/portal/activity_stream/1234567890.json?limit=20]
* [http://localhost:8080/rest-socialdemo/private/api/social/v1-alpha3/socialdemo/activity_stream/f92cd6f0c0a80137102696ac26430766.json]

*Supported Format*: json

*Requires Authentication*: true

*Parameters*:
* *Optional*
** *limit*: The number of activities retrieved with the default value of 100. This input value must be less than or equal to its default value (100). The number of the returned results is actually less than or equal to the *limit* value.
** *{noformat}since_id{noformat}*: Returns the activities having the created timestamps greater than the specified *{noformat}since_id{noformat}*_'s created timestamp.
** *{noformat}max_id{noformat}*: Returns the activities having the created timestamps less than the specified *{noformat}max_id{noformat}*'s created timestamp. Note that *{noformat}since_id{noformat}* and *{noformat} max_id{noformat}* must not be defined in one request, if they are, the *{noformat}since_id{noformat}* query param is chosen.
** *{noformat}number_of_comments{noformat}*: Specifies the number of latest comments to be displayed along with each activity. By default, *{noformat}number_of_comments=0{noformat}*. If *{noformat}number_of_comments{noformat}* is a positive number, this number is considered as a limit number that must be equal or less than 100. If the total 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 _{noformat}activity/:activityId/comments.format{noformat}_ instead.
** *{noformat}number_of_likes{noformat}*: Specifies the number of latest detailed likes to be returned along with this activity. By default, *{noformat}number_of_likes=0{noformat}*. If *{noformat}number_of_likes{noformat}* is a positive number, this number is considered as a limit number that must be equal or less than 100. If the total 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 _{noformat}activity/:activityId/likes.format{noformat}_ instead.

*Examples*:
* *JSON*

*Request*

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

** *Response*
{code}
{
  "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"
      }
    }
  ]
}
{code}

h3. {noformat}activity_stream/feed{noformat}  {anchor:id=SOCref.DevRef.V1alpha1.ActivityStreamResources.Feed}

h4. GET {noformat}activity_stream/feed.format{noformat} {anchor:id=SOCref.DevRef.V1alpha1.ActivityStreamResource.Feed.Getlastest}

*Description*: Gets the activity stream feed of the authenticated user identity who makes this request.

*URL*:

{code}http://{domain_name}/{rest_context_name}/private/api/social/{version}/{portal_container_name}/activity_stream/feed.{format}{code}

For example:
* [http://platform35.demo.exoplatform.org/rest/private/api/social/v1-alpha3/portal/activity_stream/feed.json?limit=20&since_id=12345]
* [http://localhost:8080/rest/private/api/social/v1-alpha3/socialdemo/activity_stream/feed.json?limit=20&max_id=123456&number_of_comments=10]

*Supported Format*: json

*Requires Authentication*: true

*Parameters*:

* *Optional*
** *limit*: Specifies the number of activities to be retrieved. This number must be less than or equal to *100*. The value you pass to *limit* is a maximum number of activities to be returned. the total number of activities you receive maybe less than *limit*. If *limit* is not specified, the default value will be 100.
** *{noformat}since_id{noformat}*: Returns the activities having the created timestamps greater than the specified *{noformat}since_id{noformat}*'s created timestamp.
** *{noformat}max_id{noformat}*: Returns the activities having the created timestamps less than the specified *{noformat}max_id{noformat}*'s created timestamp. Note that *{noformat}since_id{noformat}* and *{noformat}max_id{noformat}* must not be defined in one request, if they are, the *{noformat}since_id{noformat}* query param is chosen.
** *{noformat}number_of_comments{noformat}*: Specifies the number of latest comments to be displayed along with each activity. By default, *{noformat}number_of_comments=0{noformat}*. If *{noformat}number_of_comments{noformat}* is a positive number, this number is considered as a limit number that must be equal or less than 100. If the total 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 _{noformat}activity/:activityId/comments.format{noformat}_ instead.
** *{noformat}number_of_likes{noformat}*: Specifies the number of latest detailed likes to be returned along with this activity. By default, *{noformat}number_of_likes=0{noformat}*. If *{noformat}number_of_likes{noformat}* is a positive number, this number is considered as a limit number that must be equal or less than 100. If the total 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 _{noformat}activity/:activityId/likes.format{noformat}_ instead.

*Examples*
* *JSON*

*Request*:

{code}
GET: http://localhost:8080/rest-socialdemo/private/api/social/v1-alpha3/socialdemo/activity_stream/feed.json?limit=30&since_id=12345&number_of_comments=5&number_of_likes=5
{code}
** *Response*
{code}
{
  "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"
      }
    }
  ]
}
{code}

h3. {noformat}activity_stream/connections{noformat} {anchor:id=SOCref.DevRef.V1alpha1.ActivityStreamResources.Connection}


h4. GET {noformat}activity_stream/connections.format{noformat} {anchor:id=SOCref.DevRef.V1alpha1.ActivityStreamResources.Connection.default}

*Description*: Gets activities of connections of the authenticated user identity who makes this request.

*URL*:
{code}http://{domain_name}/{rest_context_name}/private/api/social/{version}/{portal_container_name}/activity_stream/connections.{format}{code}

For example:

* [http://platform35.demo.exoplatform.org/rest/private/api/social/v1-alpha3/portal/activity_stream/connections.json]
* [http://platform35.demo.exoplatform.org/rest/private/api/social/v1-alpha3/portal/activity_stream/connections.json?limit=20]

*Supported Format*: json

*Requires Authentication*: true

*Parameters*:
* *Optional*:
** *limit*: The number of activities retrieved with the default value of 100. This input value must be less than or equal to its default value (100). The number of the returned results is actually less than or equal to the *limit* value.
** *{noformat}since_id{noformat}*: Returns the activities having the created timestamps greater than the specified *{noformat}since_id{noformat}*'s created timestamp.
** *{noformat}max_id{noformat}*: Returns the activities having the created timestamps less than the specified *{noformat}max_id{noformat}*'s created timestamp. Note that *{noformat}since_id{noformat}* and *{noformat}max_id{noformat}* must not be defined in one request, if they are, the *{noformat}since_id{noformat}* query param is chosen.
** *{noformat}number_of_comments{noformat}*: Specifies the number of latest comments to be displayed along with each activity. By default, *{noformat}number_of_comments=0{noformat}*. If *{noformat}number_of_comments=0{noformat}* is a positive number, this number is considered as a limit number that must be equal or less than 100. If the total 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 _{noformat}activity/:activityId/comments.format{noformat}_ instead.
** *{noformat}number_of_likes{noformat}*: Specifies the number of latest detailed likes to be returned along with this activity. By default, *{noformat}number_of_likes=0{noformat}*. If *{noformat}number_of_likes{noformat}* is a positive number, this number is considered as a limit number that must be equal or less than 100. If the total 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 _{noformat}activity/:activityId/likes.format{noformat}_ instead.

*Examples*:
* *JSON*

*Request*:

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

*Response*:

{code}
{
{
  "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"
      }
    }
  ]
}
{code}


h3. {noformat}activity_stream/spaces{noformat} {anchor:id=SOCref.DevRef.V1alpha1.ActivityStreamResources.Spaces}


h4. GET {noformat}activity_stream/spaces.format{noformat}   {anchor:id=SOCref.DevRef.V1alpha1.ActivityStreamResources.Spaces.GetDefault}

*Description*: Gets activities of spaces in which the authenticated user identity is a member or a manager making this request.

*URL*:

{code}http://{domain_name}/{rest_context_name}/private/api/social/{version}/{portal_container_name}/activity_stream/spaces.{format}{code}

For example:
* [http://platform35.demo.exoplatform.org/rest/private/api/social/v1-alpha3/portal/activity_stream/spaces.json]
* [http://platform35.demo.exoplatform.org/rest/private/api/social/v1-alpha3/portal/activity_stream/spaces.json?limit=20]

*Supported Format*: json

*Requires Authentication*: true

*Parameters*:
* *Optional*
** *limit*: The number of activities retrieved with the default value of 100. This input value must be less than or equal to its default value (100). The number of the returned results is actually less than or equal to the *limit* value.
** *{noformat}since_id{noformat}*: Returns the activities having the created timestamps greater than the specified since_id's created timestamp.
** *{noformat}max_id{noformat}*: Returns the activities having the created timestamps less than the specified *{noformat}max_id{noformat}*'s created timestamp. Note that *{noformat}since_id{noformat}* and *{noformat}max_id{noformat}* must not be defined in one request, if they are, the *{noformat}since_id{noformat}* query param is chosen.
** *{noformat}number_of_comments{noformat}*: Specifies the number of latest comments to be displayed along with each activity. By default, *{noformat}number_of_comments=0{noformat}*. If *{noformat}number_of_comments{noformat}* is a positive number, this number is considered as a limit number that must be equal or less than 100. If the total number of comments is less than the provided positive number, the total number of comments must be returned. If the total number of comments is more than 100, it is recommended to use _{noformat}activity/:activityId/comments.format{noformat}_ instead.
** *{noformat}number_of_likes{noformat}*: Specifies the number of latest detailed likes to be returned along with this activity. By default, *{noformat}number_of_likes=0{noformat}*. If *{noformat}number_of_likes{noformat}* is a positive number, this number is considered as a limit number that must be equal or less than 100. If the total number of likes is less than the provided positive number, the total number of likes must be returned. If the total number of likes is more than 100, it is recommended to use _{noformat}activity/:activityId/likes.format{noformat}_ instead.

*Examples*:
* *JSON*

*Request*:

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

*Response*:

{code}
{
  "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"
      }
    }
  ]
}
{code}
