0

I'm using the following (non-APEX) REST connection to retrieve chatter records from a unique chatter group (id.) How can I limit the number of chatter records retrieved? I only want to use the last 20 chatter records for a portal feed.

GET https://<my url>/services/data/v39.0/chatter/feeds/record/0F9G0000000PeqbKAC/feed-elements

2 Answers 2

2

I think you'd need to use a custom query for that.

/services/data/v40.0/query?q=SELECT+Body+FROM+FeedItem+WHERE+ParentId='0F9G0000000PeqbKAC'+LIMIT+20

Notice the +LIMIT+20 clause at the end.

1
  • thanks. Works. We're providing an application connection allowing REST API to a 3rd party portal product (LifeRay.)
    – rickmac
    Jul 28, 2017 at 17:54
1

You need to set the pagesize query parameter. For example:

GET https://<my url>/services/data/v39.0/chatter/feeds/record/0F9G0000000PeqbKAC/feed-elements?pageSize=20

The documentation describes the available query parameters.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .