Skip to main content

com.atproto.sync.subscribeRepos

#main

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.

Input

PropertyTypeKnown ValuesRequiredDescription
cursorinteger-The last known event seq number to backfill from.

Output

PropertyTypeKnown ValuesRequiredDescription
refsunion of
#commit
#identity
#account
#handle
#migrate
#tombstone
#info
--

#commit

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.

PropertyTypeKnown ValuesRequiredDescription
seqinteger-The stream sequence number of this message.
rebaseboolean-DEPRECATED -- unused
tooBigboolean-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.
repostring (did)-The repo this event comes from.
commitcid-link-Repo commit object CID.
prevcid-link-DEPRECATED -- unused. WARNING -- nullable and optional; stick with optional to ensure golang interoperability.
revstring-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.
sincestring-The rev of the last emitted commit from this repo (if any).
blocksbytes-CAR file containing relevant blocks, as a diff since the previous repo state.
opsarray of #repoOp--
blobsarray of cid-link--
timestring (datetime)-Timestamp of when this message was originally broadcast.

#identity

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.

PropertyTypeKnown ValuesRequiredDescription
seqinteger--
didstring (did)--
timestring (datetime)--
handlestring (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.

#account

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.

PropertyTypeKnown ValuesRequiredDescription
seqinteger--
didstring (did)--
timestring (datetime)--
activeboolean-Indicates that the account has a repository which can be fetched from the host that emitted this event.
statusstringtakendown
suspended
deleted
deactivated
If active=false, this optional field indicates a reason for why the account is not active.

#handle

DEPRECATED -- Use #identity event instead

PropertyTypeKnown ValuesRequiredDescription
seqinteger--
didstring (did)--
handlestring (handle)--
timestring (datetime)--

#migrate

DEPRECATED -- Use #account event instead

PropertyTypeKnown ValuesRequiredDescription
seqinteger--
didstring (did)--
migrateTostring--
timestring (datetime)--

#tombstone

DEPRECATED -- Use #account event instead

PropertyTypeKnown ValuesRequiredDescription
seqinteger--
didstring (did)--
timestring (datetime)--

#info

PropertyTypeKnown ValuesRequiredDescription
namestringOutdatedCursor-
messagestring--

#repoOp

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

PropertyTypeKnown ValuesRequiredDescription
actionstringcreate
update
delete
-
pathstring--
cidcid-link-For creates and updates, the new record CID. For deletions, null.