Deprecating subscribing to all public events


#1

Hi there Particle Community!

We wanted to share an upcoming change for subscribing to event streams through the Particle API.

Starting on May 1st an event prefix filter will be required to subscribe to the Particle API event stream that includes public events. This means it will no longer be possible to subscribe to the “firehose” that includes all public events.

The relevant API endpoint is GET /v1/events/:eventPrefix (API documentation).

Connecting to GET /v1/events will return an HTTP 400 Bad Request error.

Behavior of GET /v1/events/prefix will not change at this time. It will still open an event stream for public events and private events that start with prefix.

The change will also not affect the API endpoints for

  • private event stream GET /v1/devices/events/:eventPrefix (API documentatin)
  • device event stream GET /v1/devices/:deviceId/events/:eventPrefix (API documentation
  • product event stream GET /v1/products/:productIdOrSlug/events/[:eventName] (API documentation)
  • product device event stream GET /v1/products/:productIdOrSlug/devices/:id/events/[:eventName] (API documentation).

Furthermore, Particle.publish and Particle.subscribe behavior is not affected.

Why is Particle making this change?

The “firehose” of public events generates a large volume of HTTP traffic.

Reaching out to developers who were connecting to that endpoint we found that most of them were not using all those events, either mistakenly connecting to the public event stream or doing filtering in their application.

This means that intentional usage of the “firehose” of public events has been extremely low! Based on these findings we feel that deprecating this feature will have a low impact on the community.

If you have any questions or comments we’re eager to hear from you!

Thanks!

Julien and the Particle team


Particle events down for anyone else?
#2