Newer Version Available

This content describes an older version of this product. View Latest

Filter Feed Resources

The filter feed is the news feed filtered to contain feed items whose parent is a specified object type.

Available resources are:

Resource Description
/chatter/feeds/filter/userId A collection of feed directory objects that contain information about filter feeds available to the logged-in user. Each object contains a URL for the filter feed, a URL for feed items in the filter feed, and a label describing the object used to filter the feed.
/chatter/feeds/filter/userId/idPrefix A feed object that contains information about a specific filter feed available to the logged-in user.
/chatter/feeds/filter/userId/idPrefix/feed-items Feed items from the logged-in user’s news feed whose parent has the specified key prefix, such as the feed items from all the groups the logged-in user is a member of.

List of Filter Feed URLs

A collection of feed directory objects that contain information about filter feeds available to the logged-in user. Each object contains a URL for the filter feed, a URL for feed items in the filter feed, and a label describing the object used to filter the feed. Each URL contains the first three characters of the filter object, which is called a key prefix and specifies the object type. Use this resource to return a list of the possible key prefix filter feeds that the logged-in user can apply to their news feed. See Filter Feed Items.

The collection of feed directory objects never contains User (005) and Group (0F9) object types. However, you can use those object types to filter the feed.

Note

Resource
1/chatter/feeds/filter/me
or
1/chatter/feeds/filter/userId

userId must be the ID of the logged-in user or the alias me.

Available since version
23.0
HTTP methods
GET or HEAD
Response body
Feed Directory
If the response body is empty, the user isn’t following any records.
Example response body for GET
1{
2   "favorites": [],
3   "feeds": [
4      {
5         "feedItemsUrl": "/services/data/v30.0/chatter/feeds/filter/005D0000001LL8OIAW/001/feed-items",
6         "feedUrl": "/services/data/v30.0/chatter/feeds/filter/005D0000001LL8OIAW/001",
7         "label": "Accounts"
8      },
9      {
10         "feedItemsUrl": "/services/data/v30.0/chatter/feeds/filter/005D0000001LL8OIAW/003/feed-items",
11         "feedUrl": "/services/data/v30.0/chatter/feeds/filter/005D0000001LL8OIAW/003",
12         "label": "Contacts"
13      },
14      {
15         "feedItemsUrl": "/services/data/v30.0/chatter/feeds/filter/005D0000001LL8OIAW/00Q/feed-items",
16         "feedUrl": "/services/data/v30.0/chatter/feeds/filter/005D0000001LL8OIAW/00Q",
17         "label": "Leads"
18      }
19   ]
20}

Specific Filter Feed URL

A feed object that contains information about a specific filter feed available to the logged-in user. The keyPrefix in the resource URL is the first three characters of the object ID and indicates the object type.

Resource
1/chatter/feeds/filter/userId/keyPrefix

userId must be the ID of the logged-in user or the alias me.

Available since version
23.0
HTTP methods
GET or HEAD
Request parameters
Parameter Name Type Description
sort String Specifies the order returned by the sort, such as by date created or last modified:
  • CreatedDateDesc—Sorts the feed items by most recent post date.
  • LastModifiedDateDesc—Sorts the feed items by most recent activity, which includes new feed items and comments.
The default value is CreatedDescDate.
Response body
Feed
Example response body
This request returns the URL for a filter feed items resource that’s filtered by the User object (key prefix 005).
1GET /chatter/feeds/filter/me/005
This is the response:
1{
2   "feedItemsUrl": "/services/data/v30.0/chatter/feeds/filter/005D0000001Gl4rIAC/005/feed-items",
3   "isModifiedUrl": null
4}

Filter Feed Items

Feed items from the logged-in user’s news feed whose parent has the specified key prefix, such as the feed items from all the groups the logged-in user is a member of. The key prefix specifies the object type and is the first three characters of an object ID.

To filter by feed items with a User parent object, use the key prefix 005.

To filter by feed items with a Group parent object, use the key prefix 0F9.

To filter by feed items with a parent object that the logged-in user is following (for example, Account), use the List of Filter Feed URLs resource to return the parent objects.

Suppose the logged-in user is a member of five groups. The following resource returns all of the feed items posted to all five of those groups:
1/chatter/feeds/filter/me/0F9/feed-items
Contrast that with a request to the Record Feed Items resource, which returns all of the feed items posted to a particular group:
1/chatter/feeds/record/0F9XXXXXXXXX/feed-items

The filter feed returns only the feed items that are visible to the logged-in user. In the first example, the resource doesn’t return the feed items for groups the logged-in user is not a member of. In the second example, if the group is public, even if the logged-in user is not a member, the resource returns all the group’s feed items.

Resource
1/chatter/feeds/filter/me/keyPrefix/feed-items
or
1/chatter/feeds/filter/userId/keyPrefix/feed-items

userId must be the ID of the logged-in user or the alias me.

Available since version
23.0
HTTP methods
GET or HEAD
Request parameters
Parameter Name Type Description Required or Optional Available Version
density String The density of the feed. One of these values:
  • AllUpdates—Displays all posts and comments from people and records the user follows and groups the user is a member of.
  • FewerUpdates—Displays all posts and comments from people and records the user follows and groups the user is a member of, but hides system-generated posts from records that nobody commented on.

The default value is AllUpdates.

Optional 29.0
page String A generated token that indicates the view of feed items in the feed. Page tokens are returned as part of the response body, in one of the URL parameters, such as nextPageURL, for example:
1"nextPageUrl": 
2"/services/data/v30.0/
3chatter/feeds/news/
4005D0000001GLowIAN
5/feed-items
6?page=2011-03-30T17:34:50Z,
70D5D0000000DSv4KAG"
Optional 23.0
pageSize Integer Specifies the number of items per page. Valid values are between 1 and 100. If you don't specify a size, the default is 25. Optional 23.0
q String One or more keywords to search for in the body and comments of feed items in this feed.

The search string can contain wildcards and must contain at least two characters that aren’t wildcards. See Wildcards.

Optional 28.0
recentComment​Count Integer Maximum number of comments to include per feed item. The default value is 3. The maximum value is 25. Optional 29.0
sort String Specifies the order returned by the sort, such as by date created or last modified:
  • CreatedDateDesc—Sorts the feed items by most recent post date.
  • LastModifiedDateDesc—Sorts the feed items by most recent activity, which includes new feed items and comments.
The default value is CreatedDescDate.
Optional 23.0
updatedSince String An opaque token defining the modification time stamp of the feed and the sort order.

Do not construct this token. Retrieve this token from the updatesToken property of the Feed Item Page response body.

Optional 30.0
Response body
Feed Item Page
Example
This request gets all the feed items whose parent is the User object and that the logged-in user can see.
1GET https://instance_name/services/data/v30.0/chatter/feeds/filter/me/005/feed-items
The response is:
1{
2   "currentPageUrl": "/services/data/v30.0/chatter/feeds/filter/005D0000001LL8OIAW/005/feed-items",
3   "isModifiedToken": null,
4   "isModifiedUrl": null,
5   "items": [
6      {
7         "actor": {
8            "companyName": "Universal Containers",
9            "firstName": "Deanna",
10            "id": "005D0000001LL8OIAW",
11            "isActive": true,
12            "isInThisCommunity": true,
13            "lastName": "Li",
14            "motif": {
15               "color": "1797C0",
16               "largeIconUrl": "/img/icon/profile64.png",
17               "mediumIconUrl": "/img/icon/profile32.png",
18               "smallIconUrl": "/img/icon/profile16.png"
19            },
20            "mySubscription": null,
21            "name": "Deanna Li",
22            "photo": {
23               "fullEmailPhotoUrl": "https://instance_name/ncsphoto
24/SqRfG_-PUTY6KtfOp_f0cEw-MQI3xmkJ21oNEOQ-5sbKHM8BOF0F77vGAZj-E49H",
25               "largePhotoUrl": "https://instance_name/profilephoto
26/729D00000000LJF/F",
27               "photoVersionId": "729D00000000LJFIA2",
28               "smallPhotoUrl": "https://instance_name/profilephoto
29/729D00000000LJF/T",
30               "standardEmailPhotoUrl": "https://instance_name/ncsphoto
31/SqRfG_-PUTY6KtfOp_f0cEw-MQI3xmkJ21oNEOQ-5sb7ZAiQf8i8QQ-eQr3mx8--",
32               "url": "/services/data/v29.0/chatter/users/005D0000001LL8OIAW/photo"
33            },
34            "title": "Salesforce Administrator",
35            "type": "User",
36            "url": "/services/data/v30.0/chatter/users/005D0000001LL8OIAW",
37            "userType": "Internal"
38         },
39         "attachment": null,
40         "body": {
41            "messageSegments": [],
42            "text": null
43         },
44         "canShare": false,
45         "clientInfo": null,
46         "comments": {
47            "comments": [],
48            "currentPageUrl": "/services/data/v30.0/chatter
49/feed-items/0D5D0000000LizgKAC/comments",
50            "nextPageUrl": null,
51            "total": 0
52         },
53         "createdDate": "2013-09-10T00:28:16.000Z",
54         "event": false,
55         "id": "0D5D0000000LizgKAC",
56         "isBookmarkedByCurrentUser": false,
57         "isDeleteRestricted": true,
58         "isLikedByCurrentUser": false,
59         "likes": {
60            "currentPageUrl": "/services/data/v30.0/chatter
61/feed-items/0D5D0000000LizgKAC/likes",
62            "likes": [],
63            "nextPageUrl": null,
64            "previousPageUrl": null,
65            "total": 0
66         },
67         "likesMessage": null,
68         "moderationFlags": null,
69         "modifiedDate": "2013-09-10T00:28:16.000Z",
70         "myLike": null,
71         "originalFeedItem": null,
72         "originalFeedItemActor": null,
73         "parent": {
74            "companyName": "Universal Containers",
75            "firstName": "Deanna",
76            "id": "005D0000001LL8OIAW",
77            "isActive": true,
78            "isInThisCommunity": true,
79            "lastName": "Li",
80            "motif": {
81               "color": "1797C0",
82               "largeIconUrl": "/img/icon/profile64.png",
83               "mediumIconUrl": "/img/icon/profile32.png",
84               "smallIconUrl": "/img/icon/profile16.png"
85            },
86            "mySubscription": null,
87            "name": "Deanna Li",
88            "photo": {
89               "fullEmailPhotoUrl": "https://instance_name/ncsphoto
90/SqRfG_-PUTY6KtfOp_f0cEw-MQI3xmkJ21oNEOQ-5sbKHM8BOF0F77vGAZj-E49H",
91               "largePhotoUrl": "https://instance_name/profilephoto
92/729D00000000LJF/F",
93               "photoVersionId": "729D00000000LJFIA2",
94               "smallPhotoUrl": "https://instance_name/profilephoto
95/729D00000000LJF/T",
96               "standardEmailPhotoUrl": "https://instance_name/ncsphoto
97/SqRfG_-PUTY6KtfOp_f0cEw-MQI3xmkJ21oNEOQ-5sb7ZAiQf8i8QQ-eQr3mx8--",
98               "url": "/services/data/v30.0/chatter
99/users/005D0000001LL8OIAW/photo"
100            },
101            "title": "Salesforce Administrator",
102            "type": "User",
103            "url": "/services/data/v30.0/chatter
104/users/005D0000001LL8OIAW",
105            "userType": "Internal"
106         },
107         "photoUrl": "https://instance_name/profilephoto/729D00000000LJF/T",
108         "preamble": {
109            "messageSegments": [
110               {
111                  "motif": {
112                     "color": "1797C0",
113                     "largeIconUrl": "/img/icon/profile64.png",
114                     "mediumIconUrl": "/img/icon/profile32.png",
115                     "smallIconUrl": "/img/icon/profile16.png"
116                  },
117                  "reference": {
118                     "id": "005D0000001LL8OIAW",
119                     "url": "/services/data/v30.0/chatter
120/users/005D0000001LL8OIAW"
121                  },
122                  "text": "Deanna Li",
123                  "type": "EntityLink"
124               },
125               {
126                  "text": " created the public group ",
127                  "type": "Text"
128               },
129               {
130                  "motif": null,
131                  "reference": {
132                     "id": "0F9D00000000qaoKAA",
133                     "url": "/services/data/v30.0/chatter
134/groups/0F9D00000000qaoKAA"
135                  },
136                  "text": "Test",
137                  "type": "EntityLink"
138               },
139               {
140                  "text": ".",
141                  "type": "Text"
142               }
143            ],
144            "text": "Deanna Li created the public group Test."
145         },
146         "relativeCreatedDate": "Yesterday at 5:28 PM",
147         "topics": {
148            "canAssignTopics": true,
149            "topics": []
150         },
151         "type": "CollaborationGroupCreated",
152         "url": "/services/data/v30.0/chatter
153/feed-items/0D5D0000000LizgKAC",
154         "visibility": "AllUsers"
155      },
156      {
157         "actor": {
158            "companyName": "Universal Containers",
159            "firstName": "Deanna",
160            "id": "005D0000001LL8OIAW",
161            "isActive": true,
162            "isInThisCommunity": true,
163            "lastName": "Li",
164            "motif": {
165               "color": "1797C0",
166               "largeIconUrl": "/img/icon/profile64.png",
167               "mediumIconUrl": "/img/icon/profile32.png",
168               "smallIconUrl": "/img/icon/profile16.png"
169            },
170            "mySubscription": null,
171            "name": "Deanna Li",
172            "photo": {
173               "fullEmailPhotoUrl": "https://instance_name/ncsphoto
174/SqRfG_-PUTY6KtfOp_f0cEw-MQI3xmkJ21oNEOQ-5sbKHM8BOF0F77vGAZj-E49H",
175               "largePhotoUrl": "https://instance_name/profilephoto
176/729D00000000LJF/F",
177               "photoVersionId": "729D00000000LJFIA2",
178               "smallPhotoUrl": "https://instance_name/profilephoto
179/729D00000000LJF/T",
180               "standardEmailPhotoUrl": "https://instance_name/ncsphoto
181/SqRfG_-PUTY6KtfOp_f0cEw-MQI3xmkJ21oNEOQ-5sb7ZAiQf8i8QQ-eQr3mx8--",
182               "url": "/services/data/v30.0/chatter
183/users/005D0000001LL8OIAW/photo"
184            },
185            "title": "Salesforce Administrator",
186            "type": "User",
187            "url": "/services/data/v30.0/chatter
188/users/005D0000001LL8OIAW",
189            "userType": "Internal"
190         },
191         "attachment": null,
192         "body": {
193            "messageSegments": [],
194            "text": null
195         },
196         "canShare": false,
197         "clientInfo": null,
198         "comments": {
199            "comments": [],
200            "currentPageUrl": "/services/data/v30.0/chatter
201/feed-items/0D5D0000000Le2BKAS/comments",
202            "nextPageUrl": null,
203            "total": 0
204         },
205         "createdDate": "2013-09-04T22:38:42.000Z",
206         "event": false,
207         "id": "0D5D0000000Le2BKAS",
208         "isBookmarkedByCurrentUser": false,
209         "isDeleteRestricted": true,
210         "isLikedByCurrentUser": false,
211         "likes": {
212            "currentPageUrl": "/services/data/v30.0/chatter
213/feed-items/0D5D0000000Le2BKAS/likes",
214            "likes": [],
215            "nextPageUrl": null,
216            "previousPageUrl": null,
217            "total": 0
218         },
219         "likesMessage": null,
220         "moderationFlags": null,
221         "modifiedDate": "2013-09-04T22:38:42.000Z",
222         "myLike": null,
223         "originalFeedItem": null,
224         "originalFeedItemActor": null,
225         "parent": {
226            "companyName": "Universal Containers",
227            "firstName": "Deanna",
228            "id": "005D0000001LL8OIAW",
229            "isActive": true,
230            "isInThisCommunity": true,
231            "lastName": "Li",
232            "motif": {
233               "color": "1797C0",
234               "largeIconUrl": "/img/icon/profile64.png",
235               "mediumIconUrl": "/img/icon/profile32.png",
236               "smallIconUrl": "/img/icon/profile16.png"
237            },
238            "mySubscription": null,
239            "name": "Deanna Li",
240            "photo": {
241               "fullEmailPhotoUrl": "https://instance_name/ncsphoto
242/SqRfG_-PUTY6KtfOp_f0cEw-MQI3xmkJ21oNEOQ-5sbKHM8BOF0F77vGAZj-E49H",
243               "largePhotoUrl": "https://instance_name/profilephoto
244/729D00000000LJF/F",
245               "photoVersionId": "729D00000000LJFIA2",
246               "smallPhotoUrl": "https://instance_name/profilephoto
247/729D00000000LJF/T",
248               "standardEmailPhotoUrl": "https://instance_name/ncsphoto
249/SqRfG_-PUTY6KtfOp_f0cEw-MQI3xmkJ21oNEOQ-5sb7ZAiQf8i8QQ-eQr3mx8--",
250               "url": "/services/data/v30.0/chatter
251/users/005D0000001LL8OIAW/photo"
252            },
253            "title": "Salesforce Administrator",
254            "type": "User",
255            "url": "/services/data/v30.0/chatter
256/users/005D0000001LL8OIAW",
257            "userType": "Internal"
258         },
259         "photoUrl": "https://instance_name/profilephoto/729D00000000LJF/T",
260         "preamble": {
261            "messageSegments": [
262               {
263                  "motif": {
264                     "color": "1797C0",
265                     "largeIconUrl": "/img/icon/profile64.png",
266                     "mediumIconUrl": "/img/icon/profile32.png",
267                     "smallIconUrl": "/img/icon/profile16.png"
268                  },
269                  "reference": {
270                     "id": "005D0000001LL8OIAW",
271                     "url": "/services/data/v30.0/chatter
272/users/005D0000001LL8OIAW"
273                  },
274                  "text": "Deanna Li",
275                  "type": "EntityLink"
276               },
277               {
278                  "text": " created the public group ",
279                  "type": "Text"
280               },
281               {
282                  "motif": null,
283                  "reference": {
284                     "id": "0F9D00000000qSzKAI",
285                     "url": "/services/data/v30.0/chatter
286/groups/0F9D00000000qSzKAI"
287                  },
288                  "text": "Connect",
289                  "type": "EntityLink"
290               },
291               {
292                  "text": ".",
293                  "type": "Text"
294               }
295            ],
296            "text": "Deanna Li created the public group Connect."
297         },
298         "relativeCreatedDate": "September 4, 2013 at 3:38 PM",
299         "topics": {
300            "canAssignTopics": true,
301            "topics": []
302         },
303         "type": "CollaborationGroupCreated",
304         "url": "/services/data/v30.0/chatter
305/feed-items/0D5D0000000Le2BKAS",
306         "visibility": "AllUsers"
307      },
308   ],
309   "nextPageUrl": "/services/data/v30.0/chatter/feeds/filter
310/005D0000001LL8OIAW/005/feed-items?page=2013-01-25T00%3A36%3A54Z%2C0D5D0000000JnAtKAK"
311}

Filter Feed Items Flat

This resource is deprecated as of version 26.0.

Returns a flat feed, that is, a feed where there is no hierarchy between feed items and comments: Feed items and comments are at the same level. All items are returned in chronological order.

Resource
1/chatter/feeds/filter/me/feed-items/flat
or
1/chatter/feeds/filter/userId/feed-items/flat

userId must be the ID of the logged-in user or the alias me.

Note

Available since version
25.0
HTTP methods
GET or HEAD
Request parameters
Parameter Name Type Description
numFeedItems Integer Specifies the number of feed items returned. Valid values are between 0 and 100. Default value is 25. Because feed items may include comments, specifying 25 flat feed items may actually return more. For example, if each feed item has one comment, and recentCommentCount is greater than 1, 50 flat feed items are returned.
page String A generated token that indicates the view of feed items in the feed. Page tokens are returned as part of the response body, in one of the URL parameters, such as nextPageURL.
recentComment​Count Integer Specifies the number of recent comments returned. Valid values are between 0 and 25. Default value is 3.
sort String. One of the following:
  • CreatedDateDesc
  • LastModifiedDateDesc
Sorts the returned feed either by created date in ascending order, or by last modified date, also in ascending order. The default is LastModifiedDateDesc
Response body
Flat Feed