social.grain.repo.applyWrites

Make several writes in the logged-in account's repo at once, as com.atproto.repo.applyWrites makes them at its PDS, and index them before answering. Called as social.grain.repo.createRecord is.

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

Procedure

procedure · POST

Input

application/json

writes

requiredarray
  • minLength: 1
  • maxLength: 200
itemsunion
One of (closed)

Output

application/json

results

requiredarray

Each write's result, in the place of its write.

itemsunion

Errors

UnknownCollection

grain does not index a write's collection.

InvalidRecord

A write's value does not fit its lexicon.

InvalidSwap

No description in schema.

ScopeMissingError

The account's PDS granted the session less than the writes need.

#create

object

Properties

collection

requiredstring · nsid

rkey

string · record-key
  • maxLength: 512

value

requiredunknown

#createResult

object

Properties

cid

requiredstring · cid

uri

requiredstring · at-uri

#delete

object

Properties

collection

requiredstring · nsid

rkey

requiredstring · record-key
  • maxLength: 512

#deleteResult

object

Properties

#update

object

Properties

collection

requiredstring · nsid

rkey

requiredstring · record-key
  • maxLength: 512

value

requiredunknown

#updateResult

object

Properties

cid

requiredstring · cid

uri

requiredstring · at-uri

Similar lexicons

semantic match

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

  • Writes records to the requesting user's repo in a space the AppView hosts for them. The write is authorized the way the space's authority would authorize it, stored, and indexed like a synced write. Records keep the URIs they will have on the user's PDS after a migration.

  • Apply a batch transaction of repository creates, updates, and deletes. Requires auth, implemented by PDS.

  • Write a record in the logged-in account's repo, creating or replacing it, at its PDS, and index it before answering. Called as social.grain.repo.createRecord is.

  • 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).