Receive new event

Hi :slight_smile:

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. :slight_smile:

=======ADD=======

is ‘id’ paramter of event api reuslt unique value globally?

“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.

It was my miss. :wink:

Ok I understood. :slight_smile: I thought that event ids unique per event and global id unique globally.

I was misunderstood about id and global id.

Thank you :slight_smile:

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.