What is the correct syntax to trigger a realtime event only on my 3 collections for every document? With or without the brackets?
client.subscribe( ['databases.[63446ca755a041305f7f].collections.[66f7fce6002b828c5b50].documents', 'databases.[63446ca755a041305f7f].collections.[667be4de65e1cbaedb43].documents', 'databases.[63446ca755a041305f7f].collections.[667698d85d98f40d9f97].documents', 'files'], response => { // Callback will be executed on changes for documents and all files. console.log("realtime :", response); this.realtimePayload = response.payload; });
see - https://appwrite.io/docs/apis/realtime for examples
and here's the correct channel formats - https://appwrite.io/docs/apis/realtime#channels
also you dont need brackets [].
should be just -
databases.databaseID.collections.collectionID.documents
where databaseID & collectionID are the actual IDs.
thank you very much π
Recommended threads
- Enabling Overage Usage
Hello Appwrite Support Team, I am currently using Appwrite under the GitHub Student Developer Pack plan. Recently, my project hit the database read limit, and ...
- appwrite-docs MCP fails in Cursor β SSE ...
Hi team, I'm having trouble getting the hosted Appwrite docs MCP working in Cursor on Windows. Environment IDE: Cursor (latest) OS: Windows 11 Node: v24.15.0 ...
- Migration from Cloud to Self-Hosted not ...
Hello Appwrite Community, I've got the problem, that when I try to migrate my Appwrite Project from the cloud to my self-hosted Appwrite, that an API Key is mi...