com.atproto.repo.applyWrites
#main
Apply a batch transaction of repository creates, updates, and deletes. Requires auth, implemented by PDS.
Input
- Encoding: application/json
Property | Type | Known Values | Required | Description |
---|---|---|---|---|
repo | string (at-identifier) | - | ✅ | The handle or DID of the repo (aka, current account). |
validate | boolean | - | ❌ | Can be set to 'false' to skip Lexicon schema validation of record data, for all operations. |
writes | array of union #create #update #delete | - | ✅ | - |
swapCommit | string (cid) | - | ❌ | If provided, the entire operation will fail if the current repo commit CID does not match this value. Used to prevent conflicting repo mutations. |
#create
Operation which creates a new record.
Property | Type | Known Values | Required | Description |
---|---|---|---|---|
collection | string (nsid) | - | ✅ | - |
rkey | string | - | ❌ | - |
value | unknown | - | ✅ | - |
#update
Operation which updates an existing record.
Property | Type | Known Values | Required | Description |
---|---|---|---|---|
collection | string (nsid) | - | ✅ | - |
rkey | string | - | ✅ | - |
value | unknown | - | ✅ | - |
#delete
Operation which deletes an existing record.
Property | Type | Known Values | Required | Description |
---|---|---|---|---|
collection | string (nsid) | - | ✅ | - |
rkey | string | - | ✅ | - |