Retrieving group feed data

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

curl -X GET "https://api.usergrid.com/my-org/my-app/groups/mygroup/feed"

JavaScript (HTML5)

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
    }
});

Ruby

The example assumes use of the Ruby SDK.

app = Usergrid::Application.new 'https://api.usergrid.com/my-org/my-app/'
activities = app['groups/mygroup/feed'].collection

Node.js

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://api.usergrid.com/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"