pub.techne.draft.permissioned.putRecord

Write one record into your own repo (or a collective's or circle's whose own member space you manage; a circle member holding only its write leg writes membership adds and their own claim) as a permissioned record, for the `space` it names (required: no space is InvalidRequest; public records go through com.atproto.repo.putRecord, and a record only you read goes in your space.personal). Any collection; a body of a collection with a published lexicon must satisfy it. It counts in that space only when the space's write policy admits you (and, for one of our own types, the space type declares the collection); otherwise it is stored and only you read it. A first write is never refused by its space's policy (only by your token's `space:` scopes). A pub.techne.draft.space.private record counts there when written under `space:` scopes covering it or with no scope claim; which app is calling is not asked. Replacing a record already written there needs `space:` scopes covering it, or no scope claim; anyone else is 403 Forbidden. The output's `space` says where it counts. Writing the current version again is a no-op (in an app's space, only under covering scopes or with no scope claim; else Forbidden). One write of your rate (RateLimitExceeded). A token with space scopes from Techne's ePDS: a write to a space they do not cover is 403 Forbidden. Draft tier.

Details · procedure
Kindprocedure
Authoritypermissioned.draft.techne.pub
Commit rev3n3iob6xcsw2u
Indexed

Procedure

procedure · POST

Input

application/json

collection

requiredstring · nsid

record

requiredunknown

The record body. Its `$type` must equal `collection`; a collection with a published lexicon must satisfy it.

repo

requiredstring · did

The owner's DID. Must equal the JWT's iss.

rkey

requiredstring · record-key

The record key. By convention a pub.techne.draft.description's rkey is sidecar_rkey(subject.uri) (one description per subject) and a pub.techne.draft.share's is a TID.

  • maxLength: 512

space

requiredstring · at-uri

The space this record is for. Public records are written with com.atproto.repo.putRecord, not here. Required: at://{authority}/{spaceType}/{skey} (a record only you read goes in your own pub.techne.draft.space.personal, at://{you}/pub.techne.draft.space.personal/self; a source's own records in at://{repo}/pub.techne.draft.space.source/self). A write naming no space is refused as InvalidRequest. The key holds one record per space (the 0016 record address): writing it for another space writes another record and leaves this one; to move a record, delete it and write it again.

swapCid

string · cid

Write only if the record's current CID is this one. A missing record never matches.

Output

application/json

cid

requiredstring · cid

The DAG-CBOR CID of the record, the same CID a PDS would compute.

read

requiredarray

The DIDs the `share`s placed in the space the record counts in name (its authority left out), when the caller may read that space; empty otherwise. For a source space this is its whole audience beside the owner (as getGrants).

itemsstring · did

rev

requiredstring · tid

The repo revision of the version now current.

space

string · at-uri

The space the record counts in now. Absent when it counts in none (the space's write policy does not admit the writer).

uri

requiredstring · at-uri

Errors

InvalidRequest

HTTP 400. Malformed input (no `space`: name one, since public records go through com.atproto.repo.putRecord; a bad DID, NSID, record key or space address, a record whose $type is not collection, or one with no DAG-CBOR form), or a body that fails its collection's published lexicon. Also HTTP 413, 415, 400 or 422 for a request body that is not the method's input (see the description).

Forbidden

HTTP 403. repo is not the caller's own (or a collective's or circle's the caller may write as, see the description); or the call's `space:` scopes do not cover the write; or the write replaces a record already written for an app's space (pub.techne.draft.space.private) under `space:` scopes that do not cover a put there. A first write is never refused by its space's policy (only by the token's `space:` scopes). Nothing is written.

LastManager

HTTP 409. The write, as a circle, would leave it with members and nobody at role >= 30. Make someone else manager first. Nothing is written.

AccountDeleting

HTTP 403. The caller's account is being deleted, or is deleted. Nothing is written.

InvalidSwap

HTTP 409. swapCid did not match the current version.

AuthenticationRequired

HTTP 401. No credential, or one that fails verification (for a service-auth JWT: wrong aud or lxm, expired, replayed, or an issuer whose key does not resolve right now; retry later in that case).

Conflict

HTTP 409. The same key holds a public record in the caller's repo, or a claim (a share, membership, connection and the like keep one space per key) written for another space, or a concurrent write replaced this version before it was recorded (read the record back).

IdentityConflict

HTTP 409. The write would change a contact's identity (pub.techne.draft.contact: a held number or did changed or dropped, an archived contact un-archived or archived at another instant, a number and a did that are not one account, or a deleted contact's key written again). Writing it again never succeeds: archive the contact and write a new one.

DuplicatePhone

HTTP 409. A pub.techne.draft.contact write introduces a number (a new contact's, or a first one) that another of the caller's active contacts already carries (an archived contact, or one bound to an account that is gone, does not count). Not refused for a write that archives the contact.

RateLimitExceeded

HTTP 429. The caller has written faster than its per-DID write limit allows (by default 20 writes a second, a burst of 200; putRecord and deleteRecord each spend one, and putRecords one per call whatever the number of writes it carries; counted per AppView instance). Retry later. Also HTTP 429, with nothing written, for a pub.techne.draft.contact write that binds a number to an account (`phone` and `did` both set, where the stored contact does not already carry both): such a write refused because that account does not hold the number (IdentityConflict) spends one of the caller's phone lookups, the budget pub.techne.draft.identity.accountsForPhones spends (10 a minute per caller, counted per AppView instance), and a matching one spends none; and with none left every such write is refused. Retry in a minute.

Similar lexicons

semantic match

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

  • Write up to 200 records into the caller's own repo in one call: each write is applied in order, exactly as putRecord applies it (the same admission, receipts, no-op re-put and swapCid), each in its own transaction. NOT atomic: a write that is refused does not undo the writes before it or stop the ones after it, and each write's result says what happened to it. That is why this is not called applyWrites: atproto's com.atproto.repo.applyWrites commits all of its writes or none, and this does not (

  • Delete a record from the caller's own repo (a takedown, a mistake, or a `share` the owner withdraws, which stops that reader's future reads, with a 'revoke-read' receipt once no share in its source space names it). The caller authenticates with its own credential: a session from any sign-in lane (OAuth included), or an atproto service-auth JWT (iss = the caller, aud = the AppView's service DID, lxm = this method). repo must be the caller, or a collective or circle the platform holds the credenti

  • Publish your records, and keep private ones in the spaces you also grant. Create, edit and delete the public pub.techne records an app keeps in your repo for you: your profile, events you host and their listings, the approvals and invites you give as a host, connections, evaluations and check-ins, feedback on whether a tag fits a record, venue research and short card lines, asks and offers, places, collectives, feed recipes and the queries an app publishes, an app's own public configuration, and

  • Write as a collective: a batch of creates, updates and deletes applied atomically to the repo of a collective account whose credential this service holds, written with that credential. The same input and output as com.atproto.repo.applyWrites, with `repo` the collective's DID; each write is a com.atproto.repo.applyWrites#create, #update or #delete. The service checks the caller's role in the collective first: whoever manages the collective's own member space (`pub.techne.draft.space.collective.m

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