social.grain.sync.refreshRecords

Read records of the caller's own again from their own PDS, proved (com.atproto.sync.getRecord: the commit signed by the account's key, the record reached from the tree it signed), and keep each, or its absence, at that commit's revision wherever the index keeps its collection: what a client just wrote or deleted shows at once, rather than when the network brings it, and the network's copy of the same revision or an older one changes nothing. A record of a collection grain does not index, or that does not fit its lexicon, is left alone. Requires service auth, or the web's session cookie from a page of the site.

Repository @grain.social did:plc:e7rftrdyz5e2rw4y6ocszew2 namespace authority
Details · procedure
Kindprocedure
Authoritysync.grain.social
Commit rev3n2sngsrimybg
Indexed
cid bafyreigkppoaznn2w7fnedhhf7mefwvcmtycikg5u4jwuf4kmblh33adhi

Checks

Valid Lint pass
JSONDownload
{
  "$type": "com.atproto.lexicon.schema",
  "defs": {
    "main": {
      "description": "Read records of the caller's own again from their own PDS, proved (com.atproto.sync.getRecord: the commit signed by the account's key, the record reached from the tree it signed), and keep each, or its absence, at that commit's revision wherever the index keeps its collection: what a client just wrote or deleted shows at once, rather than when the network brings it, and the network's copy of the same revision or an older one changes nothing. A record of a collection grain does not index, or that does not fit its lexicon, is left alone. Requires service auth, or the web's session cookie from a page of the site.",
      "errors": [
        {
          "description": "A URI names a record in a repo other than the caller's.",
          "name": "NotYours"
        },
        {
          "description": "The caller's PDS did not answer for a record, or did not prove what it answered.",
          "name": "Unreachable"
        }
      ],
      "input": {
        "encoding": "application/json",
        "schema": {
          "properties": {
            "uris": {
              "description": "Records in the caller's own repo, just created, updated or deleted.",
              "items": {
                "format": "at-uri",
                "type": "string"
              },
              "maxLength": 25,
              "type": "array"
            }
          },
          "required": [
            "uris"
          ],
          "type": "object"
        }
      },
      "output": {
        "encoding": "application/json",
        "schema": {
          "properties": {
            "records": {
              "description": "Each record named, once, as its PDS proved it.",
              "items": {
                "ref": "#recordView",
                "type": "ref"
              },
              "type": "array"
            }
          },
          "required": [
            "records"
          ],
          "type": "object"
        }
      },
      "type": "procedure"
    },
    "recordView": {
      "description": "A record as it is now.",
      "properties": {
        "cid": {
          "description": "Its CID as it is now; left out once it is gone.",
          "format": "cid",
          "type": "string"
        },
        "uri": {
          "format": "at-uri",
          "type": "string"
        }
      },
      "required": [
        "uri"
      ],
      "type": "object"
    }
  },
  "id": "social.grain.sync.refreshRecords",
  "lexicon": 1
}