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
1

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.

| improve this answer | |
  • thanks. Works. We're providing an application connection allowing REST API to a 3rd party portal product (LifeRay.) – rickmac Jul 28 '17 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.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.