# Rancher Event notifications

**URL:** <https://forums.suse.com/t/rancher-event-notifications/2526>\
**Category:** Rancher 1.x\
**Created:** [April 19, 2016, 8:31pm UTC](https://forums.suse.com/t/rancher-event-notifications/2526 "2016-04-19T20:31:39Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![johnrengelman](https://sea2.discourse-cdn.com/flex022/user_avatar/forums.suse.com/johnrengelman/32/134_2.png) [@johnrengelman](https://forums.suse.com/u/johnrengelman)\
**Post date:** [April 19, 2016, 8:31pm UTC](https://forums.suse.com/t/rancher-event-notifications/2526/1 "2016-04-19T20:31:39Z")

</div>

I’m looking to implement some utilities that will need to react to “events” occurring in a Rancher cluster. Specifically, I want to be informed about new containers being created/terminated.  
What’s the best way to do this via the API? Is there a way to register a Web callback to be called with events or something in the API that opens a websocket to stream event data? Or is the only way to poll for new events?  
Can you point me to the specific API calls?

---

<div class="post-metadata">

**Author:** ![vincent](https://sea2.discourse-cdn.com/flex022/user_avatar/forums.suse.com/vincent/32/7156_2.png) [@vincent](https://forums.suse.com/u/vincent)\
**Post date:** [April 21, 2016, 10:04pm UTC](https://forums.suse.com/t/rancher-event-notifications/2526/2 "2016-04-21T22:04:50Z")

</div>

There’s a websocket that the UI uses to keep everything up to date… /v1/projects//subscribe?eventNames=resource.change

Here’s a nodejs example:

> <https://gist.github.com/vincent99/491afed2306ba448dd89>
