zone.stratos.sync.listRepoOps

lexicon.northsky.app

Documentation

Incremental pull sync of a repo's operation log (oplog), mirroring com.atproto.space.listRepoOps semantics. Returns record operations after the `since` revision, with current record values inlined by default. Boundary-gated: the caller only observes operations for records within its enrolled boundaries. The response reaches the head of the oplog when `cursor` is absent; the repo's current signed commit is then included (unless the repo has no commits yet), consistent with the operations returned. When a concurrent write is detected, a cursor is returned instead of the commit; that response can carry no operations and repeat the cursor you sent, so poll again while a cursor is present and do not read an unchanged cursor as a stall. A write that commits after the head probe is not detected; it falls outside this snapshot and arrives on a later poll. Callers must authenticate with a signed service JWT via the Authorization: Bearer header. The oplog is a droppable transport optimization; if `since` predates retained history the OplogTruncated error is returned (stricter than upstream, which silently restarts) so the caller falls back to full-state recovery (listRecordPaths).

main query

Incremental pull sync of a repo's operation log (oplog), mirroring com.atproto.space.listRepoOps semantics. Returns record operations after the `since` revision, with current record values inlined by default. Boundary-gated: the caller only observes operations for records within its enrolled boundaries. The response reaches the head of the oplog when `cursor` is absent; the repo's current signed commit is then included (unless the repo has no commits yet), consistent with the operations returned. When a concurrent write is detected, a cursor is returned instead of the commit; that response can carry no operations and repeat the cursor you sent, so poll again while a cursor is present and do not read an unchanged cursor as a stall. A write that commits after the head probe is not detected; it falls outside this snapshot and arrives on a later poll. Callers must authenticate with a signed service JWT via the Authorization: Bearer header. The oplog is a droppable transport optimization; if `since` predates retained history the OplogTruncated error is returned (stricter than upstream, which silently restarts) so the caller falls back to full-state recovery (listRecordPaths).

Parameters

cursor string Optional

Opaque pagination cursor from a previous response. Takes precedence over `since` when both are supplied.

did string did Required

The DID of the repo to sync.

excludeValues boolean Optional

When true, record values are omitted and only operation metadata is returned.

limit integer Optional

Maximum number of operations to return in this page.

since string tid Optional

A revision (TID): the caller's own sync position. Only operations after this revision are returned. Omit to start from the beginning of retained history. Use `cursor` to continue a paginated response.

Output

Encodingapplication/json
commit ref#signedCommit Optional

The repo's current signed MST commit. Included when the response reaches the head of the oplog; omitted on backfill responses and when the repo has no commits yet (no writes) - in that case there is nothing to sign and also no ops to sync.

cursor string Optional

Opaque pagination cursor to fetch the next page. Absent once the response reaches the head of the oplog. Can repeat the cursor you sent when a concurrent write was detected.

ops array Required

The operations in this page, in ascending revision order.

Errors

OplogTruncated The requested `since` revision falls outside retained history: it predates the oldest retained event (compacted), postdates the newest (not a rev this repo issued), or there is no retained log to check it against. Also returned for an unusable `cursor`: malformed, predating retained history (compacted between pages), or beyond the newest retained event. The caller must fall back to full-state recovery. Stricter than upstream, which restarts from the beginning of retained history instead of erroring.
RepoNotFound The requested repo does not exist.
AuthRequired Service authentication is required.
Try It

Requests are sent directly from your browser. Some servers may block requests due to CORS.

Base URL for XRPC calls (e.g., https://api.bsky.social)
Parameters
Opaque pagination cursor from a previous response. Takes precedence over `since` when both are supplied.
The DID of the repo to sync.
When true, record values are omitted and only operation metadata is returned.
Maximum number of operations to return in this page.
A revision (TID): the caller's own sync position. Only operations after this revision are returned. Omit to start from the beginning of retained history. Use `cursor` to continue a paginated response.
View raw schema
{
  "type": "query",
  "errors": [
    {
      "name": "OplogTruncated",
      "description": "The requested `since` revision falls outside retained history: it predates the oldest retained event (compacted), postdates the newest (not a rev this repo issued), or there is no retained log to check it against. Also returned for an unusable `cursor`: malformed, predating retained history (compacted between pages), or beyond the newest retained event. The caller must fall back to full-state recovery. Stricter than upstream, which restarts from the beginning of retained history instead of erroring."
    },
    {
      "name": "RepoNotFound",
      "description": "The requested repo does not exist."
    },
    {
      "name": "AuthRequired",
      "description": "Service authentication is required."
    }
  ],
  "output": {
    "schema": {
      "type": "object",
      "required": [
        "ops"
      ],
      "properties": {
        "ops": {
          "type": "array",
          "items": {
            "ref": "#repoOp",
            "type": "ref"
          },
          "description": "The operations in this page, in ascending revision order."
        },
        "commit": {
          "ref": "#signedCommit",
          "type": "ref",
          "description": "The repo's current signed MST commit. Included when the response reaches the head of the oplog; omitted on backfill responses and when the repo has no commits yet (no writes) - in that case there is nothing to sign and also no ops to sync."
        },
        "cursor": {
          "type": "string",
          "description": "Opaque pagination cursor to fetch the next page. Absent once the response reaches the head of the oplog. Can repeat the cursor you sent when a concurrent write was detected."
        }
      }
    },
    "encoding": "application/json"
  },
  "parameters": {
    "type": "params",
    "required": [
      "did"
    ],
    "properties": {
      "did": {
        "type": "string",
        "format": "did",
        "description": "The DID of the repo to sync."
      },
      "limit": {
        "type": "integer",
        "default": 100,
        "maximum": 1000,
        "minimum": 1,
        "description": "Maximum number of operations to return in this page."
      },
      "since": {
        "type": "string",
        "format": "tid",
        "description": "A revision (TID): the caller's own sync position. Only operations after this revision are returned. Omit to start from the beginning of retained history. Use `cursor` to continue a paginated response."
      },
      "cursor": {
        "type": "string",
        "description": "Opaque pagination cursor from a previous response. Takes precedence over `since` when both are supplied."
      },
      "excludeValues": {
        "type": "boolean",
        "default": false,
        "description": "When true, record values are omitted and only operation metadata is returned."
      }
    }
  },
  "description": "Incremental pull sync of a repo's operation log (oplog), mirroring com.atproto.space.listRepoOps semantics. Returns record operations after the `since` revision, with current record values inlined by default. Boundary-gated: the caller only observes operations for records within its enrolled boundaries. The response reaches the head of the oplog when `cursor` is absent; the repo's current signed commit is then included (unless the repo has no commits yet), consistent with the operations returned. When a concurrent write is detected, a cursor is returned instead of the commit; that response can carry no operations and repeat the cursor you sent, so poll again while a cursor is present and do not read an unchanged cursor as a stall. A write that commits after the head probe is not detected; it falls outside this snapshot and arrives on a later poll. Callers must authenticate with a signed service JWT via the Authorization: Bearer header. The oplog is a droppable transport optimization; if `since` predates retained history the OplogTruncated error is returned (stricter than upstream, which silently restarts) so the caller falls back to full-state recovery (listRecordPaths)."
}
repoOp object

A single record operation in the oplog. `cid` null means delete; `prev` null means create.

Properties

cid string cid RequiredNullable

The CID (string form) of the current record value. Null for a delete.

collection string nsid Required

The record collection.

prev string cid RequiredNullable

The CID (string form) of the record value this operation superseded. Null for a create, or when the superseded value predates the returned window.

rev string tid Required

The revision of the commit that produced this operation. Atomic multi-writes share one rev.

rkey string record-key Required

The record key.

value unknown Optional

The current record value, inlined by default for create/update ops. Omitted when excludeValues is true, for a delete, or when the value has been superseded by a later operation.

View raw schema
{
  "type": "object",
  "nullable": [
    "cid",
    "prev"
  ],
  "required": [
    "rev",
    "collection",
    "rkey",
    "cid",
    "prev"
  ],
  "properties": {
    "cid": {
      "type": "string",
      "format": "cid",
      "description": "The CID (string form) of the current record value. Null for a delete."
    },
    "rev": {
      "type": "string",
      "format": "tid",
      "description": "The revision of the commit that produced this operation. Atomic multi-writes share one rev."
    },
    "prev": {
      "type": "string",
      "format": "cid",
      "description": "The CID (string form) of the record value this operation superseded. Null for a create, or when the superseded value predates the returned window."
    },
    "rkey": {
      "type": "string",
      "format": "record-key",
      "description": "The record key."
    },
    "value": {
      "type": "unknown",
      "description": "The current record value, inlined by default for create/update ops. Omitted when excludeValues is true, for a delete, or when the value has been superseded by a later operation."
    },
    "collection": {
      "type": "string",
      "format": "nsid",
      "description": "The record collection."
    }
  },
  "description": "A single record operation in the oplog. `cid` null means delete; `prev` null means create."
}
signedCommit object

A signed MST v3 commit, as persisted (read verbatim, not re-signed).

Properties

data string cid Required

The CID (string form) of the MST root node.

did string did Required

The DID of the repo.

prev string cid Optional

The CID (string form) of the previous commit. Absent for the first commit.

rev string tid Required

The commit revision.

sig string Required

The commit signature, base64-encoded (the exact persisted bytes).

version integer Required

The commit version (3).

View raw schema
{
  "type": "object",
  "required": [
    "did",
    "version",
    "data",
    "rev",
    "sig"
  ],
  "properties": {
    "did": {
      "type": "string",
      "format": "did",
      "description": "The DID of the repo."
    },
    "rev": {
      "type": "string",
      "format": "tid",
      "description": "The commit revision."
    },
    "sig": {
      "type": "string",
      "description": "The commit signature, base64-encoded (the exact persisted bytes)."
    },
    "data": {
      "type": "string",
      "format": "cid",
      "description": "The CID (string form) of the MST root node."
    },
    "prev": {
      "type": "string",
      "format": "cid",
      "description": "The CID (string form) of the previous commit. Absent for the first commit."
    },
    "version": {
      "type": "integer",
      "description": "The commit version (3)."
    }
  },
  "description": "A signed MST v3 commit, as persisted (read verbatim, not re-signed)."
}

Lexicon Garden

@