connecting 0 events
Consuming the feed
GET /events returns a text/event-stream. Each data: line is one
JSON event. Filter with ?event=, ?registry= or ?ecosystem=.
Send a Last-Event-ID header (or ?last_id=) to replay anything missed during a
reconnect; the server keeps roughly the last thousand events in memory.
curl -N https://live.ecosyste.ms/events
curl -N "https://live.ecosyste.ms/events?ecosystem=npm"
curl -N -H "Last-Event-ID: 12345" https://live.ecosyste.ms/events
const es = new EventSource('https://live.ecosyste.ms/events?registry=rubygems.org');
es.onmessage = (e) => {
const ev = JSON.parse(e.data);
console.log(ev.event, ev.package.name, ev.version && ev.version.number);
};
Each event carries registry_url, package_url and (for new versions)
version_url linking to the full
packages.ecosyste.ms API resource, plus inline
package and version objects with the same field names as that API.
Follow the URLs for anything not included inline.