hypothetical lexicon for an atproto'd nodeinfo
describeServer.json
edited
1{
2 "lexicon": 1,
3 "id": "com.atproto.server.describeServer",
4 "description": "Endpoint that describes the core information and feature set of a server.",
5 "defs": {
6 "main": {
7 "type": "query",
8 "description": "Describes the service-agnostic metadata of the server. Includes reference to service-specific metadata.",
9 "output": {
10 "encoding": "application/json",
11 "schema": {
12 "type": "object",
13 "required": ["did", "serverAgent", "serviceType"],
14 "properties": {
15 "did": {
16 "type": "string",
17 "format": "did"
18 },
19 "serverAgent": {
20 "type": "ref",
21 "description": "Version information for the currently running server software.",
22 "ref": "#version"
23 },
24 "contact": {
25 "type": "ref",
26 "description": "Contact information for the service operator.",
27 "ref": "#contact"
28 },
29 "links": {
30 "type": "ref",
31 "description": "URLs of service policy documents.",
32 "ref": "#links"
33 },
34 "serviceType": {
35 "type": "string",
36 "knownValues": ["pds", "relay"]
37 },
38 "serviceInfo": {
39 "type": "union",
40 "refs": ["#pdsMeta", "#relayMeta"],
41 "closed": "open"
42 }
43 }
44 }
45 }
46 },
47 "version": {
48 "type": "object",
49 "required": ["name", "revision"],
50 "properties": {
51 "name": {
52 "type": "string",
53 "description": "Name of server implementation"
54 },
55 "revision": {
56 "type": "string",
57 "description": "Version number/revision of currently running server software"
58 },
59 "source": {
60 "type": "string",
61 "format": "uri",
62 "description": "Source code repository for implementation (if applicable)"
63 },
64 "website": {
65 "type": "string",
66 "format": "uri",
67 "description": "Home page for implementation"
68 }
69 }
70 },
71 "contact": {
72 "type": "object",
73 "properties": {
74 "email": {
75 "type": "string"
76 },
77 "username": {
78 "type": "string",
79 "format": "at-identifier"
80 }
81 }
82 },
83 "links": {
84 "type": "object",
85 "properties": {
86 "home": {
87 "type": "string",
88 "format": "uri",
89 "description": "Home page of server host"
90 },
91 "privacyPolicy": {
92 "type": "string",
93 "format": "uri",
94 "description": "Privacy policy of server"
95 },
96 "support": {
97 "type": "string",
98 "format": "uri",
99 "description": "Support page of server"
100 },
101 "termsOfService": {
102 "type": "string",
103 "format": "uri",
104 "description": "Terms of service page of server"
105 }
106 }
107 },
108 "pdsMeta": {
109 "type": "object",
110 "description": "PDS-specific metadata.",
111 "properties": {
112 "serviceName": {
113 "type": "string",
114 "description": "Name of the service."
115 },
116 "serviceLogo": {
117 "type": "string",
118 "description": "A link to a logo or favicon that is associated with the PDS.",
119 "format": "uri"
120 },
121 "usage": {
122 "type": "ref",
123 "description": "Activity statistics for PDSes.",
124 "ref": "#pdsUsage"
125 },
126 "inviteCodeRequired": {
127 "type": "boolean",
128 "description": "If true, an invite code must be supplied to create an account on this instance."
129 },
130 "phoneVerificationRequired": {
131 "type": "boolean",
132 "description": "If true, a phone verification token must be supplied to create an account on this instance."
133 },
134 "availableUserDomains": {
135 "type": "array",
136 "description": "List of domain suffixes that can be used in account handles.",
137 "items": {
138 "type": "string"
139 }
140 },
141 "blobSizeLimit": {
142 "type": "integer",
143 "description": "Maximum size of a blob in bytes."
144 }
145 }
146 },
147 "relayMeta": {
148 "type": "object",
149 "description": "Relay-specific metadata.",
150 "properties": {
151 "usage": {
152 "type": "ref",
153 "description": "Activity statistics for PDSes.",
154 "ref": "#relayUsage"
155 },
156 "openCrawling": {
157 "type": "boolean",
158 "description": "If true, new PDSes can be automatically crawled by the relay on request."
159 },
160 "replayWindow": {
161 "type": "integer",
162 "description": "How long the relay stores old events for backfilling."
163 }
164 }
165 },
166 "pdsUsage": {
167 "type": "object",
168 "properties": {
169 "repos": {
170 "type": "integer",
171 "description": "Count of repositories/accounts registered to PDS."
172 },
173 "records": {
174 "type": "integer",
175 "description": "Count of records stored across all repos on PDS."
176 },
177 "blobs": {
178 "type": "integer",
179 "description": "Count of blobs stored across all repos on PDS."
180 }
181 }
182 },
183 "relayUsage": {
184 "type": "object",
185 "description": "Activity statistics for relays.",
186 "properties": {
187 "hosts": {
188 "type": "integer",
189 "description": "Count of PDSes that have ever connected to the relay."
190 },
191 "repos": {
192 "type": "integer",
193 "description": "Count of repositories/accounts known to the relay."
194 }
195 }
196 }
197 }
198}