Newer Version Available

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

Filter Feed Elements

Feed elements from the context user’s news feed whose parent has the specified key prefix, such as the feed elements from all the groups the context 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 elements with a User parent object, use the key prefix 005.

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

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

Suppose the context user is a member of five groups. The following resource returns all of the feed elements for all five of those groups:
1/chatter/feeds/filter/me/0F9/feed-elements

The filter feed returns only the feed elements that are visible to the context user. In this example, the resource doesn’t return the feed elements for groups the context user is not a member of.

Resource
1/chatter/feeds/filter/userId/keyPrefix/feed-elements
1/connect/communities/communityId/chatter/feeds/filter/userId/keyPrefix/feed-elements

userId must be the ID of the context user or the alias me.

Available version
31.0
Requires Chatter
Yes
HTTP methods
GET
Request parameters for GET
Parameter Name Type Description Required or Optional Available Version
density String
  • AllUpdates—Displays all updates from people and records the user follows and groups the user is a member of.
  • FewerUpdates—Displays all updates from people and records the user follows and groups the user is a member of, but hides some system-generated updates from records.
Optional 31.0
elementsPer​Bundle Integer The maximum number of feed elements per bundle. The default and maximum value is 10.

Bundled posts contain feed-tracked changes. In Salesforce1 downloadable apps, bundled posts are in record feeds only.

Note

Optional 31.0
page String The page token to use to view the page. Page tokens are returned as part of the response class, for example, currentPageToken or nextPageToken. If you pass in null, the first page is returned. Optional 31.0
pageSize Integer Specifies the number of feed elements per page. Valid values are from 1 through 100. If you pass in null, the default size is 25. Optional 31.0
q String One or more keywords to search for in the feed elements visible to the context user. The search string can contain wildcards and must contain at least two characters that aren’t wildcards. See Wildcards. Optional 31.0
recentComment​Count Integer The maximum number of comments to return with each feed element. The default value is 3. Optional 31.0
sort String Specifies the order returned by the sort, such as by date created or last modified:
  • CreatedDateDesc—Sorts by most recent creation date.
  • LastModifiedDateDesc—Sorts by most recent activity.
If you pass in null, the default value CreatedDescDate is used.
Optional 31.0
updatedSince String An opaque token defining the modification time stamp of the feed and the sort order.

The updatedSince parameter doesn’t return feed elements that are created in the same second as the request.

Optional 31.0
Response body for GET
Feed Element Page