Send Docs Feedback

Note: Most user interface tasks can be performed in Edge Classic or the New Edge experience. For an overview, getting started topics, and release notes specific to the New Edge experience, see the docs.

Retrieving activity feeds

Retrieving a user's activity feed

Use the GET method to retrieve a user’s feed.

Request URI

GET /{org_id}/{app_id}/users/{uuid|username}/feed

Example - Request

curl -X GET "https://<baas_host_name>/my-org/my-app/users/john.doe/feed"

The example assumes use of the JavaScript (HTML5) SDK.

var options = {
    method:'GET',
    endpoint:'users/john.doe/feed'
};
client.request(options, function (err, data) {
    if (err) {
        //error — GET failed
    } else {
        //success — data will contain raw results from API call        
    }
});

The example assumes use of the Ruby SDK.

app = Usergrid::Application.new 'https://<baas_host_name>/my-org/my-app/'
activities = app['users/john.doe/feed'].collection

The example assumes use of the Node.js module.

var options = {
    method:'GET',
    endpoint:'users/john.doe/feed'
};
client.request(options, function (err, data) {
    if (err) {
        //error — GET failed
    } else {
        //success — data will contain raw results from API call        
    }
});

Example - Response

{
  "action" : "get",
  "application" : "3400ba10-cd0c-11e1-bcf7-12313d1c44914",
  "params" : {},
  "path" : "/users/d9693ec3-61c9-11e2-9ffc-02e81adcf3d0/feed",
  "uri" : "https://<baas_host_name>/3400ba10-cd0c-11e1-bcf7-12313d1c44914/users/d9693ec3-61c9-11e2-9ffc-02e81adcf3d0/feed",
  "entities" : [ {
    "uuid" : "ffd79647-f399-11e1-aec3-12313b06ae01",
    "type" : "activity",
    "created" : 1346437854569,
    "modified" : 1346437854569,
    "actor" : {
      "displayName" : "John Doe",
      "image" : {
        "duration" : 0,
        "height" : 80,
        "url" : "http://www.gravatar.com/avatar/",
        "width" : 80
      },
      "uuid" : "d9693ec3-61c9-11e2-9ffc-02e81adcf3d0",
      "email" : "john.doe@gmail.com",
      "username" : "john.doe"
    },
    "content" : "Hello World!",
    "metadata" : {
      "cursor" : "gGkAAQMAgGkABgE5ffM1aQCAdQAQ_9eWR_OZEeGuwxIxOwauAQCAdQAQABlaOvOaEeGuwxIxOwauAQA",
      "path" : "/users/d9693ec3-61c9-11e2-9ffc-02e81adcf3d0/feed/ffd79647-f399-11e1-aec3-12313b06ae01"
    },
    "published" : 1346437854569,
    "verb" : "post"
  }, {
    "uuid" : "2482a1c5-e7d0-11e1-96f6-12313b06d112",
    "type" : "activity",
    "created" : 1345141694958,
    "modified" : 1345141694958,
    "actor" : {
      "displayName" : "moab",
      "image" : {
        "duration" : 0,
        "height" : 80,
        "url" : "http://www.gravatar.com/avatar/",
        "width" : 80
      },
      "uuid" : "d9693ec3-61c9-11e2-9ffc-02e81adcf3d0",
      "email" : "massoddb@mfdsadfdsaoabl.com",
      "username" : "moab"
    },
    "content" : "checking in code left and right!!",
    "metadata" : {
      "cursor" : "gGkAAQMAgGkABgE5MLFh7gCAdQAQJIKhxefQEeGW9hIxOwbREgCAdQAQJNEP6ufQEeGW9hIxOwbREgA",
      "path" : "/users/d9693ec3-61c9-11e2-9ffc-02e81adcf3d0/feed/2482a1c5-e7d0-11e1-96f6-12313b06d112"
    },
    "published" : 1345141694958,
    "verb" : "post"
  } ],
  "timestamp" : 1346438331316,
  "duration" : 144,
  "organization": "my-org",
  "applicationName": "my-app"
}

Retrieving a group's activity feed

Use the GET method to retrieve the feed for a group. This gets a list of all the activities that have been posted to this group, that is, the activities for which this group has a relationship (owns).

Request URI

GET /{org_id}/{app_id}/groups/{uuid|groupname}/feed

Parameters

Parameter Description
arg uuid|string org_id Organization UUID or organization name
arg uuid|string app_id Application UUID or application name
arg uuid|string groupname UUID or name of the group

Example - Request

curl -X GET "https://<baas_host_name>/my-org/my-app/groups/mygroup/feed"

The example assumes use of the JavaScript (HTML5) SDK.

var options = {
    method:'GET',
    endpoint:'groups/mygroup/feed'
};
client.request(options, function (err, data) {
    if (err) {
        //error
    } else {
        //success - data will contain raw results from API call
    }
});

The example assumes use of the Ruby SDK.

app = Usergrid::Application.new 'https://<baas_host_name>/my-org/my-app/'
activities = app['groups/mygroup/feed'].collection

The example assumes use of the Node.js module.

var options = {
    method:'GET',
    endpoint:'groups/mygroup/feed'
};
client.request(options, function (err, data) {
    if (err) {
        //error
    } else {
        //success - data will contain raw results from API call
    }
});

Example - Response

{
    "action": "get",
    "application": "3400ba10-cd0c-11e1-bcf7-12313d1c4491",
    "params":  {},
    "path": "/groups/d87edec7-fc4d-11e1-9917-12313d1520f1/feed",
    "uri": "https://<baas_host_name>/my-org/my-app/groups/d87edec7-fc4d-11e1-9917-12313d1520f1/feed",
    "entities":  [
       {
        "uuid": "563f5d96-37f3-11e2-a0f7-02e81ae640dc",
        "type": "activity",
        "created": 1353952903811,
        "modified": 1353952903811,
        "actor":  {
          "displayName": "John Doe",
          "image":  {
            "duration": 0,
            "height": 80,
            "url": "http://www.gravatar.com/avatar/",
            "width": 80
          },
          "uuid": "1f3567aa-da83-11e1-afad-12313b01d5c1",
          "email": "john.doe@gmail.com",
        "username": "john.doe"
        },
        "content": "Hello World!",
        "metadata":  {
          "cursor": "gGkAAQMAgGkABgE7PeHCgwCAdQAQVj9dljfzEeKg9wLoGuZA3ACAdQAQVkVRCTfzEeKg9wLoGuZA3AA",
          "path": "/groups/d87edec7-fc4d-11e1-9917-12313d1520f1/feed/563f5d96-37f3-11e2-a0f7-02e81ae640dc"
        },
        "published": 1353952903811,
        "verb": "post"
      }
    ],
  "timestamp": 1353953272756,
  "duration": 29,
  "organization": "my-org",
  "applicationName": "my-app"

Help or comments?