I am interested in pulling the latest events according to time frame.
Example: First Api request: I use stream_position=0 to stream_position=123456 (assume)
It generates say 1000 events and I store them in my database. I store this stream_position for my next api requests.
Next api request I make after 2 hours and users performs some activity. Say 50 events.
Next API request: I use stream_position=123456 as the start of my request until next_stream_position.
Can i expect the only new records (say 50) to be returned.
- Will this approach work ? If not what approach will work.
- I explored create_after and created_before but that puts a limit on number of events to 500 and stream_position cannot be used with it as per api documentation.
- What is stream_position exactly. Does it relate to timestamp/latest revision and can be used in next API request call after 2 hours?