pub.techne.draft.permissioned.putRecords
Write up to 200 records into your own repo in one call, each for the space it names.
Each write is applied in order, exactly as putRecord would apply it, each in its own transaction. It is not atomic. A refused write does not undo the ones before it or stop the ones after it. Writing the current version again is a no-op, so send a failed batch again whole.
Input application/json
| Name | Type | What it is |
|---|---|---|
reporequired | did | Your DID. Or a collective or circle whose space you manage, if the platform holds its credential. |
writesrequired | write[], 1–200 | The writes, applied in this order. |
Each write
collectionrequired | nsid | The record's type. |
rkeyrequired | record-key | Its key, up to 512 characters. |
recordrequired | unknown | The body. Its $type must equal collection, and it must satisfy the published lexicon if there is one. |
swapCid | cid | Write only if the current version has this CID. A missing record never matches. |
spacerequired | at-uri | The space the record is for. A write with none is refused (400 InvalidRequest); a record only you read goes in your own at://{did}/pub.techne.draft.space.personal/self. |
Output application/json
| Name | Type | What it is |
|---|---|---|
resultsrequired | union[] | One per write, in the order of writes. Each is a writeResult or a writeError. |
Each writeResult, a write that applied
urirequired | at-uri | The record's address. |
cidrequired | cid | The DAG-CBOR CID, the same a PDS would compute. |
revrequired | tid | The repo revision of the version now current. |
readrequired | did[] | The DIDs the space's shares name, when you may read that space. Empty otherwise. |
space | at-uri | The space the record counts in now. |
Each writeError, a write refused with nothing of it written
errorrequired | string | InvalidRequest, InvalidSwap, Conflict, IdentityConflict or DuplicatePhone. |
messagerequired | string | Why. |
These errors stop the whole call. They are InvalidRequest (400; also 413 over 8 MiB, 415 not JSON, 422 not this input), AuthenticationRequired (401), Forbidden (403, repo is not yours; nothing is written), AccountDeleting (403) and RateLimitExceeded (429). One call spends one of your writes, however many it carries. The full lexicon is at putRecords.permissioned.draft.techne.pub.
put sends every record with a space (or a type with no public home) here, in one call, before any public record. If one is refused it throws PutError and writes nothing public.
The detail is keyed {event rkey}-det, and its space is keyed by the event's own key. The Bearer token is a session from any sign-in, or an atproto service-auth JWT with lxm set to this method.