very fast at protocol indexer with flexible filtering, xrpc queries, cursor-backed event stream, and more, built on fjall
rust fjall at-protocol atproto indexer
60
fork

Configure Feed

Select the types of activity you want to include in your feed.

at main 50 lines 1.9 kB view raw view rendered
1--- 2title: firehose management 3--- 4 5## GET /firehose/sources 6 7list all currently active firehose sources. returns a JSON array of `{ "url": string, "persisted": bool, "is_pds": bool }`. 8 9`persisted: true` means the source was added via the API and is stored in the database; it will survive a restart. `persisted: false` means the source came from `RELAY_HOSTS` and is not written to the database. `is_pds: true` means the source is a direct PDS connection with host authority enforcement enabled. 10 11## POST /firehose/sources 12 13add a firehose source at runtime. 14 15| field | description | 16| :--- | :--- | 17| `url` | URL of the firehose source | 18| `is_pds` | whether the source is a direct PDS connection (default `false`) | 19 20the source is persisted to the database before the ingestor task is started. 21 22if a source with the same URL already exists, it is replaced: the running task is stopped and a new one is started. any existing cursor state for that URL is preserved. 23 24returns `201 Created` on success. 25 26## DELETE /firehose/sources 27 28remove a firehose relay at runtime. 29 30| field | description | 31| :--- | :--- | 32| `url` | URL of the source to remove | 33 34the ingestor task is stopped immediately. 35 36if the source was added via the API (`persisted: true`), it is removed from the database and will not reappear on restart. if it came from `RELAY_HOSTS` (`persisted: false`), only the running task is stopped; the source reappears on the next restart. 37 38cursor state is not cleared. use `DELETE /firehose/cursors` separately if you want the relay to restart from the beginning when re-added. 39 40returns `200 OK` if the relay was found and removed, `404 Not Found` otherwise. 41 42## DELETE /firehose/cursors 43 44reset the stored cursor for a given firehose relay URL. 45 46| field | description | 47| :--- | :--- | 48| `key` | URL of the firehose source to reset | 49 50causes the next firehose connection to restart from the beginning.