atproto blogging
at main 89 lines 2.5 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": [ 13 "repo", 14 "collection", 15 "record" 16 ], 17 "properties": { 18 "collection": { 19 "type": "string", 20 "description": "The NSID of the record collection.", 21 "format": "nsid" 22 }, 23 "record": { 24 "type": "unknown", 25 "description": "The record itself. Must contain a $type field." 26 }, 27 "repo": { 28 "type": "string", 29 "description": "The handle or DID of the repo (aka, current account).", 30 "format": "at-identifier" 31 }, 32 "rkey": { 33 "type": "string", 34 "description": "The Record Key.", 35 "format": "record-key", 36 "maxLength": 512 37 }, 38 "swapCommit": { 39 "type": "string", 40 "description": "Compare and swap with the previous commit by CID.", 41 "format": "cid" 42 }, 43 "validate": { 44 "type": "boolean", 45 "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." 46 } 47 } 48 } 49 }, 50 "output": { 51 "encoding": "application/json", 52 "schema": { 53 "type": "object", 54 "required": [ 55 "uri", 56 "cid" 57 ], 58 "properties": { 59 "cid": { 60 "type": "string", 61 "format": "cid" 62 }, 63 "commit": { 64 "type": "ref", 65 "ref": "com.atproto.repo.defs#commitMeta" 66 }, 67 "uri": { 68 "type": "string", 69 "format": "at-uri" 70 }, 71 "validationStatus": { 72 "type": "string", 73 "knownValues": [ 74 "valid", 75 "unknown" 76 ] 77 } 78 } 79 } 80 }, 81 "errors": [ 82 { 83 "description": "Indicates that 'swapCommit' didn't match current repo commit.", 84 "name": "InvalidSwap" 85 } 86 ] 87 } 88 } 89}