social.grain.sync.indexRecords

Deprecated: use social.grain.sync.refreshRecords, which this is answered from, in its own shape, for apps built before it. Index records the caller has just written to their own PDS, without waiting for the firehose. The server reads each one back from the caller's PDS, proved, before answering, so a read after this sees the write. Requires service auth; every URI must name the caller's repo.

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

Procedure

procedure · POST

Input

application/json

uris

requiredarray

Records in the caller's repo, just created, updated or deleted.

  • minLength: 1
  • maxLength: 25
itemsstring · at-uri

Output

application/json

indexed

requiredarray

Read back from the caller's PDS and indexed.

itemsstring · at-uri

notFound

requiredarray

Not in the caller's repo: deleted, or never written. Whatever the index held for it is removed.

itemsstring · at-uri

Errors

RepoMismatch

A URI names a repo other than the caller's.

UnknownCollection

A URI names a collection this server does not index.

Similar lexicons

semantic match

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

  • 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

  • Index a record from PDS (owner or admin only)

  • Notify of a record change for immediate indexing. Fetches the record from the user's PDS and indexes (or deletes) it.

  • Create a record in the logged-in account's repo, at its PDS, and index it before answering. For the web, by its session cookie, from a page of the site; a service token is refused (the apps write to their own PDS, then call social.grain.sync.refreshRecords).

  • Read records of the caller's own again from their own server, proved (com.atproto.sync.getRecord), and keep them as they are now wherever the host keeps their collection: what a site just wrote or deleted for them shows at once, rather than when the network brings it. A record the host doesn't keep is left alone.