social.colibri.beta.polyfill.applyWrites

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.

Repository @colibri.social did:plc:mprdjqjluoswa7awzggaggj3 namespace authority
Details · procedure
Kindprocedure
Authoritypolyfill.beta.colibri.social
Commit rev3n2benzdodd22
Indexed

Procedure

procedure · POST

Input

application/json

space

requiredstring · space-ref

The space holding the repo.

writes

requiredarray

The writes, applied in order as one revision.

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

Output

application/json

results

requiredarray

One result per write, in the same order.

itemsunion

rev

requiredstring · tid

The repo revision after the writes.

Errors

AuthRequired

The request has no valid service auth.

InvalidRequest

The arguments are inconsistent or malformed beyond schema validation.

SpaceNotFound

No space matches the given space reference.

NotAuthorized

The caller may not write to or read from this repo in the space.

RepoNotHosted

The AppView does not host the caller's repo in this space, because it lives on the caller's PDS. Write to the PDS instead.

InvalidRecord

A record failed validation against its lexicon.

RecordNotFound

An update or delete names a record that does not exist.

#create

object

Creates a record.

Properties

collection

requiredstring · nsid

The record's collection.

rkey

string · record-key

Defaults to a new TID.

value

requiredunknown

The record itself.

#createResult

object

The outcome of a create.

Properties

cid

requiredstring · cid

The CID of the record or blob.

uri

requiredstring · at-uri

The record's URI, the same one it keeps after a migration.

#delete

object

Deletes a record.

Properties

collection

requiredstring · nsid

The record's collection.

rkey

requiredstring · record-key

The record key.

#deleteResult

object

The outcome of a delete.

Properties

#update

object

Replaces a record.

Properties

collection

requiredstring · nsid

The record's collection.

rkey

requiredstring · record-key

The record key.

value

requiredunknown

The record itself.

#updateResult

object

The outcome of an update.

Properties

cid

requiredstring · cid

The CID of the record or blob.

uri

requiredstring · at-uri

The record's URI, the same one it keeps after a migration.

Similar lexicons

semantic match

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

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

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

  • Write a repository record, creating or updating it as needed. Requires auth, implemented by PDS.

  • Write a record into a space. The author is always the JWT issuer. If rkey is omitted, a TID is generated.

  • Workflow envelope shared between atiproto XRPC endpoints and the agent interpreter. The server emits an outboundWorkflow when it needs the agent to execute repo writes against the user's PDS; the agent runs the actions and calls back with an inboundWorkflow.