-
Notifications
You must be signed in to change notification settings - Fork 635
/
Copy pathcreateRecord.json
61 lines (61 loc) · 1.66 KB
/
createRecord.json
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
{
"lexicon": 1,
"id": "com.atproto.repo.createRecord",
"defs": {
"main": {
"type": "procedure",
"description": "Create a new record.",
"input": {
"encoding": "application/json",
"schema": {
"type": "object",
"required": ["repo", "collection", "record"],
"properties": {
"repo": {
"type": "string",
"format": "at-identifier",
"description": "The handle or DID of the repo."
},
"collection": {
"type": "string",
"format": "nsid",
"description": "The NSID of the record collection."
},
"rkey": {
"type": "string",
"description": "The key of the record."
},
"validate": {
"type": "boolean",
"default": true,
"description": "Validate the record?"
},
"record": {
"type": "unknown",
"description": "The record to create."
},
"swapCommit": {
"type": "string",
"format": "cid",
"description": "Compare and swap with the previous commit by cid."
}
}
}
},
"output": {
"encoding": "application/json",
"schema": {
"type": "object",
"required": ["uri", "cid"],
"properties": {
"uri": {"type": "string", "format": "at-uri"},
"cid": {"type": "string", "format": "cid"}
}
}
},
"errors": [
{"name": "InvalidSwap"}
]
}
}
}