com.atproto.sync.subscribeRepos

Repository event stream, aka Firehose endpoint. Outputs repo commits with diff data, and identity update events, for all repositories on the current server. See the atproto specifications for details around stream sequencing, repo versioning, CAR diff format, and more. Public and does not require auth; implemented by PDS and Relay.

kind subscription authority sync.atproto.com lexicon 1 did:plc:6msi3pj7krzih5qxqtryxlzw · indexed 264d ago

Subscription

subscription · WebSocket

Parameters

query string

cursor

integer

The last known event seq number to backfill from.

Messages

DAG-CBOR frames

#commit

object

Represents an update of repository state. Note that empty commits are allowed, which include no repo data changes, but an update to rev and signature.

#sync

object

Updates the repo to a new state, without necessarily including that state on the firehose. Used to recover from broken commit streams, data loss incidents, or in situations where upstream host does not know recent state of the repository.

#identity

object

Represents a change to an account's identity. Could be an updated handle, signing key, or pds hosting endpoint. Serves as a prod to all downstream services to refresh their identity cache.

#account

object

Represents a change to an account's status on a host (eg, PDS or Relay). The semantics of this event are that the status is at the host which emitted the event, not necessarily that at the currently active PDS. Eg, a Relay takedown would emit a takedown with active=false, even if the PDS is still active.

#info

object

Errors

FutureCursor

No description in schema.

ConsumerTooSlow

If the consumer of the stream can not keep up with events, and a backlog gets too large, the server will drop the connection.

#account

object

Represents a change to an account's status on a host (eg, PDS or Relay). The semantics of this event are that the status is at the host which emitted the event, not necessarily that at the currently active PDS. Eg, a Relay takedown would emit a takedown with active=false, even if the PDS is still active.

Properties

active

requiredboolean

Indicates that the account has a repository which can be fetched from the host that emitted this event.

did

requiredstring · did

seq

requiredinteger

status

string

If active=false, this optional field indicates a reason for why the account is not active.

  • knownValues: takendown | suspended | deleted | deactivated | desynchronized | throttled

time

requiredstring · datetime

#commit

object

Represents an update of repository state. Note that empty commits are allowed, which include no repo data changes, but an update to rev and signature.

Properties

blobs

requiredarray
itemscid-link

DEPRECATED -- will soon always be empty. List of new blobs (by CID) referenced by records in this commit.

blocks

requiredbytes

CAR file containing relevant blocks, as a diff since the previous repo state. The commit must be included as a block, and the commit block CID must be the first entry in the CAR header 'roots' list.

  • maxLength: 2000000

commit

requiredcid-link

Repo commit object CID.

ops

requiredarray
  • maxLength: 200
itemsref

List of repo mutation operations in this commit (eg, records created, updated, or deleted).

Reference

prevData

cid-link

The root CID of the MST tree for the previous commit from this repo (indicated by the 'since' revision field in this message). Corresponds to the 'data' field in the repo commit object. NOTE: this field is effectively required for the 'inductive' version of firehose.

rebase

requiredboolean

DEPRECATED -- unused

repo

requiredstring · did

The repo this event comes from. Note that all other message types name this field 'did'.

rev

requiredstring · tid

The rev of the emitted commit. Note that this information is also in the commit object included in blocks, unless this is a tooBig event.

seq

requiredinteger

The stream sequence number of this message.

since

requiredstring · tid

The rev of the last emitted commit from this repo (if any).

  • nullable

time

requiredstring · datetime

Timestamp of when this message was originally broadcast.

tooBig

requiredboolean

DEPRECATED -- replaced by #sync event and data limits. Indicates that this commit contained too many ops, or data size was too large. Consumers will need to make a separate request to get missing data.

#identity

object

Represents a change to an account's identity. Could be an updated handle, signing key, or pds hosting endpoint. Serves as a prod to all downstream services to refresh their identity cache.

Properties

did

requiredstring · did

handle

string · handle

The current handle for the account, or 'handle.invalid' if validation fails. This field is optional, might have been validated or passed-through from an upstream source. Semantics and behaviors for PDS vs Relay may evolve in the future; see atproto specs for more details.

seq

requiredinteger

time

requiredstring · datetime

#info

object

Properties

message

string

name

requiredstring
  • knownValues: OutdatedCursor

#repoOp

object

A repo operation, ie a mutation of a single record.

Properties

action

requiredstring
  • knownValues: create | update | delete

cid

requiredcid-link

For creates and updates, the new record CID. For deletions, null.

  • nullable

path

requiredstring

prev

cid-link

For updates and deletes, the previous record CID (required for inductive firehose). For creations, field should not be defined.

#sync

object

Updates the repo to a new state, without necessarily including that state on the firehose. Used to recover from broken commit streams, data loss incidents, or in situations where upstream host does not know recent state of the repository.

Properties

blocks

requiredbytes

CAR file containing the commit, as a block. The CAR header must include the commit block CID as the first 'root'.

  • maxLength: 10000

did

requiredstring · did

The account this repo event corresponds to. Must match that in the commit object.

rev

requiredstring

The rev of the commit. This value must match that in the commit object.

seq

requiredinteger

The stream sequence number of this message.

time

requiredstring · datetime

Timestamp of when this message was originally broadcast.

Similar lexicons

semantic match

Lexicons whose schemas describe something close to this one. Check them before publishing a new one that overlaps.

  • Stream every archived and live Jetstream event in seq order, framed per the xrpc.v1.json subprotocol. The kinds, dids, and collections filters are independent predicates ANDed together; each is match-all when omitted. See the parameter and error descriptions for cursor, filtering, and compression semantics.

  • Enumerates all the DID, rev, and commit CID for all repos hosted by this service. Does not require auth; implemented by PDS and Relay.