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 across all operations, 'true' to require it, or leave unset to validate only for known Lexicons. |
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. |
Output
- Encoding: application/json
Property | Type | Known Values | Required | Description |
---|---|---|---|---|
commit | com.atproto.repo.defs#commitMeta | - | ❌ | - |
results | array of union #createResult #updateResult #deleteResult | - | ❌ | - |
#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 | - | ✅ | - |
#createResult
Property | Type | Known Values | Required | Description |
---|---|---|---|---|
uri | string (at-uri) | - | ✅ | - |
cid | string (cid) | - | ✅ | - |
validationStatus | string | valid unknown | ❌ | - |
#updateResult
Property | Type | Known Values | Required | Description |
---|---|---|---|---|
uri | string (at-uri) | - | ✅ | - |
cid | string (cid) | - | ✅ | - |
validationStatus | string | valid unknown | ❌ | - |