a tool for shared writing and social publishing
at debug/datetime 73 lines 2.3 kB view raw
1{ 2 "lexicon": 1, 3 "id": "com.atproto.repo.createRecord", 4 "defs": { 5 "main": { 6 "type": "procedure", 7 "description": "Create a single new repository record. Requires auth, implemented by PDS.", 8 "input": { 9 "encoding": "application/json", 10 "schema": { 11 "type": "object", 12 "required": ["repo", "collection", "record"], 13 "properties": { 14 "repo": { 15 "type": "string", 16 "format": "at-identifier", 17 "description": "The handle or DID of the repo (aka, current account)." 18 }, 19 "collection": { 20 "type": "string", 21 "format": "nsid", 22 "description": "The NSID of the record collection." 23 }, 24 "rkey": { 25 "type": "string", 26 "format": "record-key", 27 "description": "The Record Key.", 28 "maxLength": 512 29 }, 30 "validate": { 31 "type": "boolean", 32 "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." 33 }, 34 "record": { 35 "type": "unknown", 36 "description": "The record itself. Must contain a $type field." 37 }, 38 "swapCommit": { 39 "type": "string", 40 "format": "cid", 41 "description": "Compare and swap with the previous commit by CID." 42 } 43 } 44 } 45 }, 46 "output": { 47 "encoding": "application/json", 48 "schema": { 49 "type": "object", 50 "required": ["uri", "cid"], 51 "properties": { 52 "uri": { "type": "string", "format": "at-uri" }, 53 "cid": { "type": "string", "format": "cid" }, 54 "commit": { 55 "type": "ref", 56 "ref": "com.atproto.repo.defs#commitMeta" 57 }, 58 "validationStatus": { 59 "type": "string", 60 "knownValues": ["valid", "unknown"] 61 } 62 } 63 } 64 }, 65 "errors": [ 66 { 67 "name": "InvalidSwap", 68 "description": "Indicates that 'swapCommit' didn't match current repo commit." 69 } 70 ] 71 } 72 } 73}