Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
dev:web_api:v3:streaming_api [2022/06/23 22:01] – Add documentation dstillman | dev:web_api:v3:streaming_api [2023/04/11 17:46] (current) – [Create an empty WebSocket stream] dstillman | ||
---|---|---|---|
Line 1: | Line 1: | ||
====== Zotero Streaming API ====== | ====== Zotero Streaming API ====== | ||
+ | The Zotero streaming API provides push-based notifications via WebSockets for Zotero library changes, allowing for nearly instantaneous updates when data changes in a library or when a user joins or leaves a library. | ||
+ | |||
+ | Note that this API provides library-level notifications of changes. It does not provide updated data directly. API consumers that receive notification of a library change should use their standard [[syncing|sync process]] to retrieve data, ensuring a single, consistent code path for both manual and automatic syncing. | ||
+ | |||
+ | To avoid missed updates, clients should connect to the streaming API and then, once connected, trigger a standard sync operation to bring themselves up to date with the current version of a library. | ||
===== Requests ===== | ===== Requests ===== | ||
==== Create an empty WebSocket stream ==== | ==== Create an empty WebSocket stream ==== | ||
- | <code javascript> | + | <code javascript> |
Server response: | Server response: | ||
Line 86: | Line 91: | ||
Topic subscriptions cannot be removed via '' | Topic subscriptions cannot be removed via '' | ||
- | |||
- | A maximum of [TBD] API keys can be added on a single event stream. | ||
=== Errors === | === Errors === |