changed 3 years ago
Linked with GitHub

Jupyter Server events API

REST API Endpoints

  • POST /api/events - create new events
  • GET /api/events/schemas - query/list registered schemas
    (maybe needs discussion)
  • POST /api/events/schemas - register schemas
    (maybe needs discussion)

WebSocket endpoints (WebsocketHandler)

  • /api/events/subscribe - fire hose of all events perhaps accept filters? (see open question below)
  • /api/events/subscribe/notification subscribe to events of type notification

Open Question: Should the WebSocket handler support making a request for multiple filters to be applied instead of just the one proposed in the URL scheme above?

Depends on jupyter_events package

  • exports EventLogger object in (formerly EventLog in jupyter_telemetry)

JupyterLab Notifications

Server-side functionality

  • Subscribes to all notification events that pass through the event bus
  • Adds each notification as a row in a SQLite database on the server with a key for the recipient identity as well as an idea
    • notification events with multiple recipients can be denormalized here and written as multiple rows
  • REST API

    • GET /api/notifications - retrieve a list of all notifications that authenticated user can see
    • GET /api/notifications/{ID} - retrieve a specific notification
    • DELETE /api/notifications/{ID} - delete a specific notification

Client-side functionality

  • Subscribe to the /api/events/notifications WebSocket
    • Throttle its incoming messages at some reasonable rate (on the order of 0.5-1 seconds)
  • Treat incoming messages from the events API as a notifier only check the /api/notifications endpoint for the actual list of messages
  • Render the badge and the notification center UI inside JupyterLab/Notebook
Select a repo