Live Updates of a Collection
The changes of the documents as Server-Sent Events (2.3.0), scoped like every read and by filter. Events: upsert (data { id, document }, a document that is in the scope), remove (data { id }, deleted or left the scope), reset (the client loads again). With followRefs=true and expand (2.10.0) a change of a referenced document sends upsert (without id) for the documents that refer to it, refresh when more than 100 do (the client loads again). The id of an event is the resume token: send it as Last-Event-ID to resume. A comment every 25 seconds. Needs a replica set or a sharded cluster: 501 (code 5011) otherwise; at most WATCH_MAX_STREAMS streams per instance (503).
Parameters
Header Parameters
The id of the last event the client got, to resume after it.
Path Parameters
The name of your MongoDb Collection
Query Parameters
References to expand in each upsert (2.4.0), like on the list of documents. A change of a referenced document sends no event, unless followRefs (2.10.0).
With expand (2.10.0): a change of a referenced document sends upsert for the documents that refer to it (refresh beyond 100).
Lucene filter of the documents to watch.
Responses
text/event-stream
