Joseph
(GyoneUk Min)
January 11, 2022, 6:38am
1
Hi
I testing syncthing event api.
When I use GET /rest/events?events=%type%&since%last_event_id%
it wait until new event of %type%.
But I want to receive all new event of all event types.
GET /rest/events?events ← this returns all event list directly.
GET /rest/events?events?since=%global_id% ← this returns nothing.
I want to receive all new events and push to queue these, and process per event type on another thread.
Thanks a lot for your advice.
=======ADD=======
is ‘id’ paramter of event api reuslt unique value globally?
calmh
(Jakob Borg)
January 11, 2022, 7:26am
2
“Returns nothing” means it’s waiting for the next event. This is as it should be, you can’t get events which haven’t occurred yet.
Event ids are unique per subscription.
And each new combination of types (you can specify more than one), creates a new subscription. Given you can read code, it’s probably easiest to just read the go code.
Joseph
(GyoneUk Min)
January 13, 2022, 6:16am
5
Ok I understood.
I thought that event ids unique per event and global id unique globally.
I was misunderstood about id and global id.
Thank you
system
(system)
Closed
February 12, 2022, 6:17am
6
This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.