a tool for shared writing and social publishing
at debug/datetime 74 lines 2.5 kB view raw
1{ 2 "lexicon": 1, 3 "id": "com.atproto.repo.putRecord", 4 "defs": { 5 "main": { 6 "type": "procedure", 7 "description": "Write a repository record, creating or updating it as needed. Requires auth, implemented by PDS.", 8 "input": { 9 "encoding": "application/json", 10 "schema": { 11 "type": "object", 12 "required": ["repo", "collection", "rkey", "record"], 13 "nullable": ["swapRecord"], 14 "properties": { 15 "repo": { 16 "type": "string", 17 "format": "at-identifier", 18 "description": "The handle or DID of the repo (aka, current account)." 19 }, 20 "collection": { 21 "type": "string", 22 "format": "nsid", 23 "description": "The NSID of the record collection." 24 }, 25 "rkey": { 26 "type": "string", 27 "format": "record-key", 28 "description": "The Record Key.", 29 "maxLength": 512 30 }, 31 "validate": { 32 "type": "boolean", 33 "description": "Can be set to 'false' to skip Lexicon schema validation of record data, 'true' to require it, or leave unset to validate only for known Lexicons." 34 }, 35 "record": { 36 "type": "unknown", 37 "description": "The record to write." 38 }, 39 "swapRecord": { 40 "type": "string", 41 "format": "cid", 42 "description": "Compare and swap with the previous record by CID. WARNING: nullable and optional field; may cause problems with golang implementation" 43 }, 44 "swapCommit": { 45 "type": "string", 46 "format": "cid", 47 "description": "Compare and swap with the previous commit by CID." 48 } 49 } 50 } 51 }, 52 "output": { 53 "encoding": "application/json", 54 "schema": { 55 "type": "object", 56 "required": ["uri", "cid"], 57 "properties": { 58 "uri": { "type": "string", "format": "at-uri" }, 59 "cid": { "type": "string", "format": "cid" }, 60 "commit": { 61 "type": "ref", 62 "ref": "com.atproto.repo.defs#commitMeta" 63 }, 64 "validationStatus": { 65 "type": "string", 66 "knownValues": ["valid", "unknown"] 67 } 68 } 69 } 70 }, 71 "errors": [{ "name": "InvalidSwap" }] 72 } 73 } 74}