In the linked thread I read that it is possible to subscribe to the events endpoint of the REST API, which I think means that I get a continuous stream of changes as result: Possibility to log “recent changes” to file or log?
The documentation talks about a subscription as well, but it seems to be in a different context.
I especially want to avoid this situation talked in the documentation:
There is a limit to the number of events buffered, so if the rate of events is high or the time between polling calls is long some events might be missed.
I’ve tried opening a stream with Python, but it returns instantly instead:
import requests
url = "http://localhost:8384/rest/events"
headers = {"X-API-Key": <API-KEY-STRING>}
with requests.get(url, headers=headers, stream=True) as r:
for line in r.iter_lines():
if line:
print(line.decode("utf-8"))
Is it really possible to subscribe to the end point, and if so, how?