The newsfeed data comes back ordered by "date" with most current date first to oldest date. So changing the "since date" won't change what is returned by default, just potentially increase the amount of older data returned. So changing the call from Oct 19 to Sept 10 won't bring more data if 1000 rows are already return for Oct 19.
If you want to "go back in time", you will need to use the to_date query parameter. I'd actually recommend using
to_date and
since_date together to go back in time. Here is an example to get data from Oct 18 back to Oct 17:
https://staging2.internal.resilientsystems.com/rest/orgs/202/newsfeed?to_date=1603065600000&since_date=1602892800000Unfortunately the API doesn't provide a way to tell if it has limited the result set to 1000 entries. So you'll have to assume that if the API returns 1000 entries then you'll have to start at oldest entry and go back from there.
Ben
------------------------------
Ben Lurie
------------------------------
Original Message:
Sent: Fri October 16, 2020 10:16 AM
From: Matteo Pedersoli
Subject: some doubts about the restAPI /newsfeed
I am using the restAPI /newsfeed to get the newsfeeds of the organization, but I have a problem:
it gives me the maximum number of the last 1000 entries, even if I set the parameter since_date = 1571235291000 (/newsfeed?since_date=1571235291000 ).
am I doing something wrong or is it the correct behavior? can't we go further back in the search?
------------------------------
Matteo Pedersoli
------------------------------