@wazootech/worlds-client 0.0.0-stage → 0.8.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +143 -2
- package/THIRD_PARTY_NOTICES.md +33 -0
- package/dist/index.d.ts +2045 -0
- package/dist/index.js +1016 -0
- package/openapi/openapi.json +3658 -0
- package/package.json +60 -4
|
@@ -0,0 +1,3658 @@
|
|
|
1
|
+
{
|
|
2
|
+
"openapi": "3.0.0",
|
|
3
|
+
"info": {
|
|
4
|
+
"title": "Worlds API",
|
|
5
|
+
"version": "0.1.0",
|
|
6
|
+
"description": "Data-plane API for Wazoo Worlds — search, SPARQL, import, export, and World lifecycle."
|
|
7
|
+
},
|
|
8
|
+
"servers": [
|
|
9
|
+
{
|
|
10
|
+
"url": "https://data.wazoo.dev",
|
|
11
|
+
"description": "Worlds API"
|
|
12
|
+
}
|
|
13
|
+
],
|
|
14
|
+
"security": [
|
|
15
|
+
{
|
|
16
|
+
"bearerWorldsToken": []
|
|
17
|
+
}
|
|
18
|
+
],
|
|
19
|
+
"components": {
|
|
20
|
+
"securitySchemes": {
|
|
21
|
+
"bearerWorldsToken": {
|
|
22
|
+
"type": "http",
|
|
23
|
+
"scheme": "bearer",
|
|
24
|
+
"bearerFormat": "wzw",
|
|
25
|
+
"description": "Worlds API data-plane token."
|
|
26
|
+
}
|
|
27
|
+
},
|
|
28
|
+
"schemas": {
|
|
29
|
+
"WorldResource": {
|
|
30
|
+
"type": "object",
|
|
31
|
+
"properties": {
|
|
32
|
+
"id": {
|
|
33
|
+
"type": "string",
|
|
34
|
+
"pattern": "^w_[0-7][0-9a-hjkmnp-tv-z]{25}$",
|
|
35
|
+
"description": "Immutable World ID minted by Worlds API as `w_<ULID>`."
|
|
36
|
+
},
|
|
37
|
+
"displayName": {
|
|
38
|
+
"type": "string",
|
|
39
|
+
"description": "User-facing display name for the world. Set on creation or update."
|
|
40
|
+
},
|
|
41
|
+
"state": {
|
|
42
|
+
"type": "string",
|
|
43
|
+
"description": "Lifecycle state: active, deleted, or suspended. Deleted worlds enter a 30-day grace period before permanent purge."
|
|
44
|
+
},
|
|
45
|
+
"storage": {
|
|
46
|
+
"type": "string",
|
|
47
|
+
"enum": [
|
|
48
|
+
"d1"
|
|
49
|
+
],
|
|
50
|
+
"deprecated": true,
|
|
51
|
+
"description": "Storage backend for the world. All worlds share a single Cloudflare D1 database, separated by world_id."
|
|
52
|
+
},
|
|
53
|
+
"embeddingModel": {
|
|
54
|
+
"type": "string",
|
|
55
|
+
"description": "Embedding model identifier used for vector search indexing, e.g. openai/text-embedding-3-small or openrouter/openai/text-embedding-3-small. Values outside the allowlist (including the legacy tfjs-universal-sentence-encoder default) are reported as embeddingStatus unconfigured and search stays keyword-only."
|
|
56
|
+
},
|
|
57
|
+
"embeddingStatus": {
|
|
58
|
+
"type": "string",
|
|
59
|
+
"enum": [
|
|
60
|
+
"unconfigured",
|
|
61
|
+
"no_credential",
|
|
62
|
+
"invalid",
|
|
63
|
+
"stale",
|
|
64
|
+
"partial",
|
|
65
|
+
"ready"
|
|
66
|
+
],
|
|
67
|
+
"description": "Whether vector search is usable for this world. unconfigured: embeddings are not enabled or the model is not allowlisted. no_credential: the namespace has no active embedding credential for the provider of this world's model. invalid: the provider rejected the namespace credential. stale: vectors are not built for the current model; search is keyword-only until POST /worlds/{worldId}/reindex. partial: some vectors failed to sync; hybrid search covers what exists. ready: vectors are current."
|
|
68
|
+
},
|
|
69
|
+
"chunkSize": {
|
|
70
|
+
"type": "integer",
|
|
71
|
+
"description": "Maximum number of RDF quads per chunk when indexing for vector search."
|
|
72
|
+
},
|
|
73
|
+
"topK": {
|
|
74
|
+
"type": "integer",
|
|
75
|
+
"description": "Default number of top search results to return when the caller does not override."
|
|
76
|
+
},
|
|
77
|
+
"minScore": {
|
|
78
|
+
"type": "number",
|
|
79
|
+
"description": "Default minimum relevance score (0–1) for search results. Results below this threshold are omitted."
|
|
80
|
+
},
|
|
81
|
+
"inference": {
|
|
82
|
+
"$ref": "#/components/schemas/InferenceSetting"
|
|
83
|
+
},
|
|
84
|
+
"provenance": {
|
|
85
|
+
"type": "boolean",
|
|
86
|
+
"description": "Whether the world records when each fact was written or removed, by which API key and from what source. Read the records with POST /worlds/{worldId}/provenance."
|
|
87
|
+
},
|
|
88
|
+
"createTime": {
|
|
89
|
+
"type": "string",
|
|
90
|
+
"description": "ISO 8601 timestamp when the world was created."
|
|
91
|
+
},
|
|
92
|
+
"updateTime": {
|
|
93
|
+
"type": "string",
|
|
94
|
+
"description": "ISO 8601 timestamp when the world was last updated."
|
|
95
|
+
},
|
|
96
|
+
"deleteTime": {
|
|
97
|
+
"type": "string",
|
|
98
|
+
"description": "ISO 8601 timestamp when the world was soft-deleted. Null if not deleted."
|
|
99
|
+
},
|
|
100
|
+
"expireTime": {
|
|
101
|
+
"type": "string",
|
|
102
|
+
"description": "ISO 8601 timestamp when the world will be permanently purged after the grace period. Null if not scheduled for purge."
|
|
103
|
+
}
|
|
104
|
+
},
|
|
105
|
+
"required": [
|
|
106
|
+
"id",
|
|
107
|
+
"displayName",
|
|
108
|
+
"state",
|
|
109
|
+
"storage",
|
|
110
|
+
"embeddingModel",
|
|
111
|
+
"embeddingStatus",
|
|
112
|
+
"chunkSize",
|
|
113
|
+
"topK",
|
|
114
|
+
"minScore",
|
|
115
|
+
"provenance",
|
|
116
|
+
"createTime",
|
|
117
|
+
"updateTime"
|
|
118
|
+
]
|
|
119
|
+
},
|
|
120
|
+
"InferenceSetting": {
|
|
121
|
+
"type": "object",
|
|
122
|
+
"properties": {
|
|
123
|
+
"enabled": {
|
|
124
|
+
"type": "boolean",
|
|
125
|
+
"description": "Opt the world in to OWL 2 RL materialization on write. false is the same as never setting it."
|
|
126
|
+
},
|
|
127
|
+
"graphs": {
|
|
128
|
+
"type": "string",
|
|
129
|
+
"enum": [
|
|
130
|
+
"per-graph",
|
|
131
|
+
"union"
|
|
132
|
+
],
|
|
133
|
+
"description": "Named-graph mode. per-graph (default) lists each entailed quad in the graph(s) that entail it alone; union merges all graphs and lists everything in the default graph."
|
|
134
|
+
},
|
|
135
|
+
"maxAssertedQuads": {
|
|
136
|
+
"type": "integer",
|
|
137
|
+
"minimum": 0,
|
|
138
|
+
"exclusiveMinimum": true,
|
|
139
|
+
"description": "Size guard (default 100000). A commit that would exceed this many asserted quads fails before writing instead of exhausting the isolate."
|
|
140
|
+
}
|
|
141
|
+
},
|
|
142
|
+
"required": [
|
|
143
|
+
"enabled"
|
|
144
|
+
],
|
|
145
|
+
"description": "OWL 2 RL inference setting. Omitted when never configured, which means inference is off."
|
|
146
|
+
},
|
|
147
|
+
"CreateWorldRequest": {
|
|
148
|
+
"type": "object",
|
|
149
|
+
"properties": {
|
|
150
|
+
"displayName": {
|
|
151
|
+
"type": "string",
|
|
152
|
+
"description": "User-facing display name for the new world."
|
|
153
|
+
},
|
|
154
|
+
"embeddingModel": {
|
|
155
|
+
"type": "string",
|
|
156
|
+
"enum": [
|
|
157
|
+
"openai/text-embedding-3-small",
|
|
158
|
+
"openai/text-embedding-3-large",
|
|
159
|
+
"openai/text-embedding-ada-002",
|
|
160
|
+
"openrouter/openai/text-embedding-3-small",
|
|
161
|
+
"openrouter/openai/text-embedding-3-large"
|
|
162
|
+
],
|
|
163
|
+
"description": "Embedding model to use for vector search, as provider/model. Allowlist: openai/text-embedding-3-small (recommended), openai/text-embedding-3-large (pinned to 1536 dimensions), legacy openai/text-embedding-ada-002, and the same OpenAI models through OpenRouter as openrouter/openai/text-embedding-3-small and openrouter/openai/text-embedding-3-large. The model's provider decides which namespace credential is used. Defaults to the platform default, which reports embeddingStatus unconfigured until a model is chosen."
|
|
164
|
+
},
|
|
165
|
+
"chunkSize": {
|
|
166
|
+
"type": "integer",
|
|
167
|
+
"minimum": 0,
|
|
168
|
+
"exclusiveMinimum": true,
|
|
169
|
+
"description": "Maximum quads per chunk for vector search indexing. Defaults to the platform default."
|
|
170
|
+
},
|
|
171
|
+
"topK": {
|
|
172
|
+
"type": "integer",
|
|
173
|
+
"minimum": 0,
|
|
174
|
+
"exclusiveMinimum": true,
|
|
175
|
+
"description": "Default number of top results for search queries against this world."
|
|
176
|
+
},
|
|
177
|
+
"minScore": {
|
|
178
|
+
"type": "number",
|
|
179
|
+
"minimum": 0,
|
|
180
|
+
"maximum": 1,
|
|
181
|
+
"description": "Default minimum relevance score (0–1) for search results in this world."
|
|
182
|
+
},
|
|
183
|
+
"inference": {
|
|
184
|
+
"allOf": [
|
|
185
|
+
{
|
|
186
|
+
"$ref": "#/components/schemas/InferenceSetting"
|
|
187
|
+
},
|
|
188
|
+
{
|
|
189
|
+
"description": "Opt the world in to OWL 2 RL inference. Off when omitted. The data plane additionally needs the quads.derived column before enabling."
|
|
190
|
+
}
|
|
191
|
+
]
|
|
192
|
+
},
|
|
193
|
+
"provenance": {
|
|
194
|
+
"type": "boolean",
|
|
195
|
+
"description": "Record when each fact is written or removed, by which API key and from what source. Off when omitted. Adds to the database rows each write uses."
|
|
196
|
+
}
|
|
197
|
+
}
|
|
198
|
+
},
|
|
199
|
+
"UpdateWorldRequest": {
|
|
200
|
+
"type": "object",
|
|
201
|
+
"properties": {
|
|
202
|
+
"displayName": {
|
|
203
|
+
"type": "string",
|
|
204
|
+
"minLength": 1,
|
|
205
|
+
"description": "New display name for the world."
|
|
206
|
+
},
|
|
207
|
+
"embeddingModel": {
|
|
208
|
+
"type": "string",
|
|
209
|
+
"enum": [
|
|
210
|
+
"openai/text-embedding-3-small",
|
|
211
|
+
"openai/text-embedding-3-large",
|
|
212
|
+
"openai/text-embedding-ada-002",
|
|
213
|
+
"openrouter/openai/text-embedding-3-small",
|
|
214
|
+
"openrouter/openai/text-embedding-3-large"
|
|
215
|
+
],
|
|
216
|
+
"description": "New embedding model, as provider/model. Requires an active embedding credential, for the new model's provider, in the namespace. Changing the model marks the world stale (embeddingStatus stale): search is keyword-only until POST /worlds/{worldId}/reindex is called. It does not reindex automatically because reindexing spends the customer's provider budget."
|
|
217
|
+
},
|
|
218
|
+
"chunkSize": {
|
|
219
|
+
"type": "integer",
|
|
220
|
+
"minimum": 0,
|
|
221
|
+
"exclusiveMinimum": true,
|
|
222
|
+
"description": "New chunk size for vector search indexing."
|
|
223
|
+
},
|
|
224
|
+
"topK": {
|
|
225
|
+
"type": "integer",
|
|
226
|
+
"minimum": 0,
|
|
227
|
+
"exclusiveMinimum": true,
|
|
228
|
+
"description": "New default top-K for search queries."
|
|
229
|
+
},
|
|
230
|
+
"minScore": {
|
|
231
|
+
"type": "number",
|
|
232
|
+
"minimum": 0,
|
|
233
|
+
"maximum": 1,
|
|
234
|
+
"description": "New default minimum score threshold for search results."
|
|
235
|
+
},
|
|
236
|
+
"inference": {
|
|
237
|
+
"allOf": [
|
|
238
|
+
{
|
|
239
|
+
"$ref": "#/components/schemas/InferenceSetting"
|
|
240
|
+
},
|
|
241
|
+
{
|
|
242
|
+
"description": "Replaces the world's inference setting. Enabling does not back-fill existing data: inferred quads appear only for later changes."
|
|
243
|
+
}
|
|
244
|
+
]
|
|
245
|
+
},
|
|
246
|
+
"provenance": {
|
|
247
|
+
"type": "boolean",
|
|
248
|
+
"description": "Turns provenance recording on or off. Facts written while it is off never get records. Turning it off keeps the existing records, but they cannot be read until it is on again."
|
|
249
|
+
}
|
|
250
|
+
}
|
|
251
|
+
},
|
|
252
|
+
"VectorCleanupReport": {
|
|
253
|
+
"type": "object",
|
|
254
|
+
"properties": {
|
|
255
|
+
"worlds": {
|
|
256
|
+
"type": "integer",
|
|
257
|
+
"minimum": 0,
|
|
258
|
+
"description": "Worlds of the namespace whose vectors were cleaned."
|
|
259
|
+
},
|
|
260
|
+
"attempted": {
|
|
261
|
+
"type": "integer",
|
|
262
|
+
"minimum": 0
|
|
263
|
+
},
|
|
264
|
+
"deleted": {
|
|
265
|
+
"type": "integer",
|
|
266
|
+
"minimum": 0
|
|
267
|
+
},
|
|
268
|
+
"failed": {
|
|
269
|
+
"type": "integer",
|
|
270
|
+
"minimum": 0
|
|
271
|
+
},
|
|
272
|
+
"incomplete": {
|
|
273
|
+
"type": "boolean",
|
|
274
|
+
"description": "True when vectors remain (a failure, or more than one request can remove). Calling the endpoint again is safe and continues; the purge sweep retries too."
|
|
275
|
+
},
|
|
276
|
+
"errors": {
|
|
277
|
+
"type": "array",
|
|
278
|
+
"items": {
|
|
279
|
+
"type": "string"
|
|
280
|
+
}
|
|
281
|
+
}
|
|
282
|
+
},
|
|
283
|
+
"required": [
|
|
284
|
+
"worlds",
|
|
285
|
+
"attempted",
|
|
286
|
+
"deleted",
|
|
287
|
+
"failed",
|
|
288
|
+
"incomplete",
|
|
289
|
+
"errors"
|
|
290
|
+
]
|
|
291
|
+
},
|
|
292
|
+
"ImportResponse": {
|
|
293
|
+
"type": "object",
|
|
294
|
+
"properties": {
|
|
295
|
+
"imported": {
|
|
296
|
+
"type": "object",
|
|
297
|
+
"properties": {
|
|
298
|
+
"quads": {
|
|
299
|
+
"type": "integer",
|
|
300
|
+
"description": "Number of RDF quads successfully imported."
|
|
301
|
+
},
|
|
302
|
+
"chunks": {
|
|
303
|
+
"type": "integer",
|
|
304
|
+
"description": "Number of vector search chunks created from the imported quads."
|
|
305
|
+
}
|
|
306
|
+
},
|
|
307
|
+
"required": [
|
|
308
|
+
"quads",
|
|
309
|
+
"chunks"
|
|
310
|
+
],
|
|
311
|
+
"description": "Imported quad and chunk counts."
|
|
312
|
+
}
|
|
313
|
+
},
|
|
314
|
+
"required": [
|
|
315
|
+
"imported"
|
|
316
|
+
]
|
|
317
|
+
},
|
|
318
|
+
"ErrorResponse": {
|
|
319
|
+
"type": "object",
|
|
320
|
+
"properties": {
|
|
321
|
+
"error": {
|
|
322
|
+
"type": "object",
|
|
323
|
+
"properties": {
|
|
324
|
+
"code": {
|
|
325
|
+
"type": "string",
|
|
326
|
+
"description": "Machine-readable error code, e.g. NOT_FOUND, INVALID_ARGUMENT, RATE_LIMITED."
|
|
327
|
+
},
|
|
328
|
+
"message": {
|
|
329
|
+
"type": "string",
|
|
330
|
+
"description": "Human-readable error message describing what went wrong."
|
|
331
|
+
}
|
|
332
|
+
},
|
|
333
|
+
"required": [
|
|
334
|
+
"code",
|
|
335
|
+
"message"
|
|
336
|
+
]
|
|
337
|
+
}
|
|
338
|
+
},
|
|
339
|
+
"required": [
|
|
340
|
+
"error"
|
|
341
|
+
]
|
|
342
|
+
},
|
|
343
|
+
"EmbeddingFailureResponse": {
|
|
344
|
+
"type": "object",
|
|
345
|
+
"properties": {
|
|
346
|
+
"error": {
|
|
347
|
+
"type": "object",
|
|
348
|
+
"properties": {
|
|
349
|
+
"code": {
|
|
350
|
+
"type": "string",
|
|
351
|
+
"enum": [
|
|
352
|
+
"EMBEDDING_FAILED"
|
|
353
|
+
],
|
|
354
|
+
"description": "The embedding service failed or returned unusable vectors. Nothing was written; retrying the same request is safe."
|
|
355
|
+
},
|
|
356
|
+
"message": {
|
|
357
|
+
"type": "string"
|
|
358
|
+
},
|
|
359
|
+
"reason": {
|
|
360
|
+
"type": "string",
|
|
361
|
+
"enum": [
|
|
362
|
+
"budget_exceeded",
|
|
363
|
+
"no_credential",
|
|
364
|
+
"auth",
|
|
365
|
+
"rate_limited",
|
|
366
|
+
"timeout",
|
|
367
|
+
"provider_error",
|
|
368
|
+
"bad_request",
|
|
369
|
+
"bad_response"
|
|
370
|
+
],
|
|
371
|
+
"description": "Class of the embedding failure (never provider text): no_credential, auth, rate_limited, timeout, provider_error, bad_request, or bad_response (including vectors of the wrong length)."
|
|
372
|
+
}
|
|
373
|
+
},
|
|
374
|
+
"required": [
|
|
375
|
+
"code",
|
|
376
|
+
"message",
|
|
377
|
+
"reason"
|
|
378
|
+
]
|
|
379
|
+
}
|
|
380
|
+
},
|
|
381
|
+
"required": [
|
|
382
|
+
"error"
|
|
383
|
+
]
|
|
384
|
+
},
|
|
385
|
+
"ImportRequest": {
|
|
386
|
+
"type": "object",
|
|
387
|
+
"properties": {
|
|
388
|
+
"data": {
|
|
389
|
+
"type": "string",
|
|
390
|
+
"minLength": 1,
|
|
391
|
+
"description": "RDF payload to import. The format must match the contentType field."
|
|
392
|
+
},
|
|
393
|
+
"contentType": {
|
|
394
|
+
"type": "string",
|
|
395
|
+
"default": "text/turtle",
|
|
396
|
+
"description": "MIME type of the import payload. Supported values: text/turtle, application/trig, application/n-triples, application/n-quads, text/n3, application/json (quad rows), text/plain or application/x-ndjson (text chunks). Defaults to text/turtle."
|
|
397
|
+
},
|
|
398
|
+
"source": {
|
|
399
|
+
"type": "string",
|
|
400
|
+
"minLength": 1,
|
|
401
|
+
"maxLength": 200,
|
|
402
|
+
"description": "Where the data came from, such as a feed or tool name. Recorded with each new fact when the world keeps provenance, and ignored otherwise."
|
|
403
|
+
}
|
|
404
|
+
},
|
|
405
|
+
"required": [
|
|
406
|
+
"data"
|
|
407
|
+
]
|
|
408
|
+
},
|
|
409
|
+
"ExportQuadsResponse": {
|
|
410
|
+
"type": "object",
|
|
411
|
+
"properties": {
|
|
412
|
+
"quads": {
|
|
413
|
+
"type": "array",
|
|
414
|
+
"items": {
|
|
415
|
+
"$ref": "#/components/schemas/Quad"
|
|
416
|
+
},
|
|
417
|
+
"description": "Page of exported RDF quads."
|
|
418
|
+
},
|
|
419
|
+
"nextOffset": {
|
|
420
|
+
"type": "integer",
|
|
421
|
+
"description": "Offset for the next page. Omit this field when there are no more results."
|
|
422
|
+
}
|
|
423
|
+
},
|
|
424
|
+
"required": [
|
|
425
|
+
"quads"
|
|
426
|
+
]
|
|
427
|
+
},
|
|
428
|
+
"Quad": {
|
|
429
|
+
"type": "object",
|
|
430
|
+
"properties": {
|
|
431
|
+
"subject": {
|
|
432
|
+
"type": "string",
|
|
433
|
+
"description": "RDF subject URI."
|
|
434
|
+
},
|
|
435
|
+
"predicate": {
|
|
436
|
+
"type": "string",
|
|
437
|
+
"description": "RDF predicate URI."
|
|
438
|
+
},
|
|
439
|
+
"object": {
|
|
440
|
+
"type": "string",
|
|
441
|
+
"description": "RDF object URI or literal value."
|
|
442
|
+
},
|
|
443
|
+
"graph": {
|
|
444
|
+
"type": "string",
|
|
445
|
+
"description": "Named graph URI. Null when the quad belongs to the default graph."
|
|
446
|
+
}
|
|
447
|
+
},
|
|
448
|
+
"required": [
|
|
449
|
+
"subject",
|
|
450
|
+
"predicate",
|
|
451
|
+
"object"
|
|
452
|
+
]
|
|
453
|
+
},
|
|
454
|
+
"SearchResponse": {
|
|
455
|
+
"type": "object",
|
|
456
|
+
"properties": {
|
|
457
|
+
"results": {
|
|
458
|
+
"type": "array",
|
|
459
|
+
"items": {
|
|
460
|
+
"$ref": "#/components/schemas/SearchResult"
|
|
461
|
+
},
|
|
462
|
+
"description": "Ranked search results, best first."
|
|
463
|
+
},
|
|
464
|
+
"mode": {
|
|
465
|
+
"type": "string",
|
|
466
|
+
"enum": [
|
|
467
|
+
"semantic",
|
|
468
|
+
"keyword",
|
|
469
|
+
"hybrid",
|
|
470
|
+
"fallback"
|
|
471
|
+
],
|
|
472
|
+
"description": "Search mode that actually ran: keyword (full-text), semantic (vector), hybrid (both), or fallback (LIKE) when the primary engine is unavailable."
|
|
473
|
+
}
|
|
474
|
+
},
|
|
475
|
+
"required": [
|
|
476
|
+
"results",
|
|
477
|
+
"mode"
|
|
478
|
+
]
|
|
479
|
+
},
|
|
480
|
+
"SearchResult": {
|
|
481
|
+
"type": "object",
|
|
482
|
+
"properties": {
|
|
483
|
+
"id": {
|
|
484
|
+
"type": "string",
|
|
485
|
+
"description": "Stable deterministic identifier for the matched quad and text (shared across backends), used for ranked-list evaluation and deduplication."
|
|
486
|
+
},
|
|
487
|
+
"subject": {
|
|
488
|
+
"type": "string",
|
|
489
|
+
"description": "RDF subject URI identifying the matched resource, e.g. https://example.org/entity/42."
|
|
490
|
+
},
|
|
491
|
+
"predicate": {
|
|
492
|
+
"type": "string",
|
|
493
|
+
"description": "RDF predicate URI describing the relationship, e.g. http://schema.org/name."
|
|
494
|
+
},
|
|
495
|
+
"graph": {
|
|
496
|
+
"type": "string",
|
|
497
|
+
"description": "Named graph URI the quad belongs to. Absent when the world uses a default graph."
|
|
498
|
+
},
|
|
499
|
+
"content": {
|
|
500
|
+
"type": "string",
|
|
501
|
+
"description": "Text content of the matched quad, used for display and snippet generation. The single text field replacing the legacy object field."
|
|
502
|
+
},
|
|
503
|
+
"score": {
|
|
504
|
+
"type": "number",
|
|
505
|
+
"nullable": true,
|
|
506
|
+
"description": "Relevance score from the search engine on the normalized 0–1 scale (1.0 = best). Null for fallback LIKE search results."
|
|
507
|
+
},
|
|
508
|
+
"scoreType": {
|
|
509
|
+
"type": "string",
|
|
510
|
+
"enum": [
|
|
511
|
+
"rrf",
|
|
512
|
+
"cosine",
|
|
513
|
+
"unranked"
|
|
514
|
+
],
|
|
515
|
+
"description": "Scoring family the score expresses: rrf (reciprocal rank fusion, normalized), cosine (vector similarity), or unranked (fallback results carry no ordering meaning)."
|
|
516
|
+
}
|
|
517
|
+
},
|
|
518
|
+
"required": [
|
|
519
|
+
"id",
|
|
520
|
+
"subject",
|
|
521
|
+
"predicate",
|
|
522
|
+
"content",
|
|
523
|
+
"score",
|
|
524
|
+
"scoreType"
|
|
525
|
+
]
|
|
526
|
+
},
|
|
527
|
+
"SearchRequest": {
|
|
528
|
+
"type": "object",
|
|
529
|
+
"properties": {
|
|
530
|
+
"query": {
|
|
531
|
+
"type": "string",
|
|
532
|
+
"minLength": 1,
|
|
533
|
+
"description": "Natural language or keyword search query to find matching content in the world."
|
|
534
|
+
},
|
|
535
|
+
"limit": {
|
|
536
|
+
"type": "integer",
|
|
537
|
+
"minimum": 1,
|
|
538
|
+
"maximum": 100,
|
|
539
|
+
"default": 20,
|
|
540
|
+
"description": "Maximum number of results to return (1–100). Defaults to 20. The response is capped at this value after ranking; the engine's internal candidate pool is at least this large."
|
|
541
|
+
},
|
|
542
|
+
"minScore": {
|
|
543
|
+
"type": "number",
|
|
544
|
+
"minimum": 0,
|
|
545
|
+
"maximum": 1,
|
|
546
|
+
"description": "Override the world's minimum relevance score on the normalized 0–1 scale (1.0 = best). Results below this threshold are omitted after ranking."
|
|
547
|
+
},
|
|
548
|
+
"filter": {
|
|
549
|
+
"$ref": "#/components/schemas/SearchFilter"
|
|
550
|
+
}
|
|
551
|
+
},
|
|
552
|
+
"required": [
|
|
553
|
+
"query"
|
|
554
|
+
]
|
|
555
|
+
},
|
|
556
|
+
"SearchFilter": {
|
|
557
|
+
"type": "object",
|
|
558
|
+
"properties": {
|
|
559
|
+
"include": {
|
|
560
|
+
"type": "object",
|
|
561
|
+
"properties": {
|
|
562
|
+
"subjects": {
|
|
563
|
+
"type": "array",
|
|
564
|
+
"items": {
|
|
565
|
+
"type": "string"
|
|
566
|
+
},
|
|
567
|
+
"description": "Only match quads whose subject is in this list. Applied before ranking."
|
|
568
|
+
},
|
|
569
|
+
"predicates": {
|
|
570
|
+
"type": "array",
|
|
571
|
+
"items": {
|
|
572
|
+
"type": "string"
|
|
573
|
+
},
|
|
574
|
+
"description": "Only match quads whose predicate is in this list. Applied before ranking."
|
|
575
|
+
},
|
|
576
|
+
"graphs": {
|
|
577
|
+
"type": "array",
|
|
578
|
+
"items": {
|
|
579
|
+
"type": "string"
|
|
580
|
+
},
|
|
581
|
+
"description": "Only match quads whose graph is in this list. Applied before ranking."
|
|
582
|
+
}
|
|
583
|
+
},
|
|
584
|
+
"description": "Include allowlist: only quads matching these exact subject/predicate/graph values are candidates."
|
|
585
|
+
},
|
|
586
|
+
"exclude": {
|
|
587
|
+
"type": "object",
|
|
588
|
+
"properties": {
|
|
589
|
+
"subjects": {
|
|
590
|
+
"type": "array",
|
|
591
|
+
"items": {
|
|
592
|
+
"type": "string"
|
|
593
|
+
},
|
|
594
|
+
"description": "Exclude quads whose subject is in this list. Applied before ranking."
|
|
595
|
+
},
|
|
596
|
+
"predicates": {
|
|
597
|
+
"type": "array",
|
|
598
|
+
"items": {
|
|
599
|
+
"type": "string"
|
|
600
|
+
},
|
|
601
|
+
"description": "Exclude quads whose predicate is in this list. Applied before ranking."
|
|
602
|
+
},
|
|
603
|
+
"graphs": {
|
|
604
|
+
"type": "array",
|
|
605
|
+
"items": {
|
|
606
|
+
"type": "string"
|
|
607
|
+
},
|
|
608
|
+
"description": "Exclude quads whose graph is in this list. Applied before ranking."
|
|
609
|
+
}
|
|
610
|
+
},
|
|
611
|
+
"description": "Exclude denylist: quads matching these exact subject/predicate/graph values are not candidates."
|
|
612
|
+
}
|
|
613
|
+
},
|
|
614
|
+
"description": "Include/exclude quad filters applied before ranking (SDK QuadFilter semantics)."
|
|
615
|
+
},
|
|
616
|
+
"SparqlRequest": {
|
|
617
|
+
"type": "object",
|
|
618
|
+
"properties": {
|
|
619
|
+
"query": {
|
|
620
|
+
"type": "string",
|
|
621
|
+
"minLength": 1,
|
|
622
|
+
"description": "SPARQL 1.1 query string. Supports SELECT, ASK, and SPARQL UPDATE (INSERT/DELETE). SELECT results are limited by the server-configured maximum."
|
|
623
|
+
}
|
|
624
|
+
},
|
|
625
|
+
"required": [
|
|
626
|
+
"query"
|
|
627
|
+
]
|
|
628
|
+
},
|
|
629
|
+
"ApiKeyCreateResponse": {
|
|
630
|
+
"type": "object",
|
|
631
|
+
"properties": {
|
|
632
|
+
"uid": {
|
|
633
|
+
"type": "string",
|
|
634
|
+
"description": "Unique identifier for the created API key."
|
|
635
|
+
},
|
|
636
|
+
"token": {
|
|
637
|
+
"type": "string",
|
|
638
|
+
"description": "The full bearer token (wzw format). Displayed once on creation — store it securely."
|
|
639
|
+
},
|
|
640
|
+
"name": {
|
|
641
|
+
"type": "string",
|
|
642
|
+
"description": "Human-readable label for the key."
|
|
643
|
+
},
|
|
644
|
+
"namespace": {
|
|
645
|
+
"type": "string",
|
|
646
|
+
"description": "Namespace the key is scoped to."
|
|
647
|
+
},
|
|
648
|
+
"worldId": {
|
|
649
|
+
"type": "string",
|
|
650
|
+
"nullable": true,
|
|
651
|
+
"pattern": "^w_[0-7][0-9a-hjkmnp-tv-z]{25}$",
|
|
652
|
+
"description": "World ID the key is scoped to, or null if the key has namespace-wide access."
|
|
653
|
+
},
|
|
654
|
+
"createTime": {
|
|
655
|
+
"type": "string",
|
|
656
|
+
"description": "ISO 8601 timestamp when the key was created."
|
|
657
|
+
}
|
|
658
|
+
},
|
|
659
|
+
"required": [
|
|
660
|
+
"uid",
|
|
661
|
+
"token",
|
|
662
|
+
"name",
|
|
663
|
+
"namespace",
|
|
664
|
+
"worldId",
|
|
665
|
+
"createTime"
|
|
666
|
+
]
|
|
667
|
+
},
|
|
668
|
+
"ApiKeyCreateRequest": {
|
|
669
|
+
"type": "object",
|
|
670
|
+
"properties": {
|
|
671
|
+
"namespace": {
|
|
672
|
+
"type": "string",
|
|
673
|
+
"minLength": 1,
|
|
674
|
+
"description": "Namespace to scope the API key to. Required. The key can only access worlds within this namespace."
|
|
675
|
+
},
|
|
676
|
+
"worldId": {
|
|
677
|
+
"type": "string",
|
|
678
|
+
"pattern": "^w_[0-7][0-9a-hjkmnp-tv-z]{25}$",
|
|
679
|
+
"description": "Optional world ID to scope the key to a single world. Omit to allow access to all worlds in the namespace."
|
|
680
|
+
},
|
|
681
|
+
"name": {
|
|
682
|
+
"type": "string",
|
|
683
|
+
"description": "Human-readable label for the key. Helps identify keys in the list."
|
|
684
|
+
},
|
|
685
|
+
"scopes": {
|
|
686
|
+
"type": "array",
|
|
687
|
+
"items": {
|
|
688
|
+
"type": "string",
|
|
689
|
+
"enum": [
|
|
690
|
+
"data:read",
|
|
691
|
+
"data:write",
|
|
692
|
+
"embeddings:admin"
|
|
693
|
+
]
|
|
694
|
+
},
|
|
695
|
+
"description": "Optional scope grant. Defaults to [\"data:read\", \"data:write\"]. Use [\"data:read\"] for read-only keys. embeddings:admin grants management of the namespace embedding credential and is never part of the default grant."
|
|
696
|
+
}
|
|
697
|
+
},
|
|
698
|
+
"required": [
|
|
699
|
+
"namespace"
|
|
700
|
+
]
|
|
701
|
+
},
|
|
702
|
+
"ApiKeyResource": {
|
|
703
|
+
"type": "object",
|
|
704
|
+
"properties": {
|
|
705
|
+
"uid": {
|
|
706
|
+
"type": "string",
|
|
707
|
+
"description": "Unique identifier for the API key."
|
|
708
|
+
},
|
|
709
|
+
"name": {
|
|
710
|
+
"type": "string",
|
|
711
|
+
"description": "Human-readable label for the key."
|
|
712
|
+
},
|
|
713
|
+
"namespace": {
|
|
714
|
+
"type": "string",
|
|
715
|
+
"description": "Namespace the key is scoped to."
|
|
716
|
+
},
|
|
717
|
+
"worldId": {
|
|
718
|
+
"type": "string",
|
|
719
|
+
"pattern": "^w_[0-7][0-9a-hjkmnp-tv-z]{25}$",
|
|
720
|
+
"description": "World ID the key is scoped to, or absent for namespace-wide keys."
|
|
721
|
+
},
|
|
722
|
+
"scopes": {
|
|
723
|
+
"type": "array",
|
|
724
|
+
"items": {
|
|
725
|
+
"type": "string"
|
|
726
|
+
},
|
|
727
|
+
"description": "Granted scopes, e.g. [\"data:read\", \"data:write\"]."
|
|
728
|
+
},
|
|
729
|
+
"createTime": {
|
|
730
|
+
"type": "string",
|
|
731
|
+
"description": "ISO 8601 timestamp when the key was created."
|
|
732
|
+
}
|
|
733
|
+
},
|
|
734
|
+
"required": [
|
|
735
|
+
"uid",
|
|
736
|
+
"name",
|
|
737
|
+
"namespace",
|
|
738
|
+
"scopes",
|
|
739
|
+
"createTime"
|
|
740
|
+
]
|
|
741
|
+
},
|
|
742
|
+
"VectorSyncReport": {
|
|
743
|
+
"type": "object",
|
|
744
|
+
"properties": {
|
|
745
|
+
"enabled": {
|
|
746
|
+
"type": "boolean"
|
|
747
|
+
},
|
|
748
|
+
"attempted": {
|
|
749
|
+
"type": "integer",
|
|
750
|
+
"minimum": 0
|
|
751
|
+
},
|
|
752
|
+
"upserted": {
|
|
753
|
+
"type": "integer",
|
|
754
|
+
"minimum": 0
|
|
755
|
+
},
|
|
756
|
+
"failedUpserts": {
|
|
757
|
+
"type": "integer",
|
|
758
|
+
"minimum": 0
|
|
759
|
+
},
|
|
760
|
+
"embeddingFailures": {
|
|
761
|
+
"type": "integer",
|
|
762
|
+
"minimum": 0
|
|
763
|
+
},
|
|
764
|
+
"staleDeleteFailures": {
|
|
765
|
+
"type": "integer",
|
|
766
|
+
"minimum": 0
|
|
767
|
+
},
|
|
768
|
+
"errors": {
|
|
769
|
+
"type": "array",
|
|
770
|
+
"items": {
|
|
771
|
+
"type": "string"
|
|
772
|
+
}
|
|
773
|
+
}
|
|
774
|
+
},
|
|
775
|
+
"required": [
|
|
776
|
+
"enabled",
|
|
777
|
+
"attempted",
|
|
778
|
+
"upserted",
|
|
779
|
+
"failedUpserts",
|
|
780
|
+
"embeddingFailures",
|
|
781
|
+
"staleDeleteFailures",
|
|
782
|
+
"errors"
|
|
783
|
+
]
|
|
784
|
+
},
|
|
785
|
+
"ProvenanceResponse": {
|
|
786
|
+
"type": "object",
|
|
787
|
+
"properties": {
|
|
788
|
+
"records": {
|
|
789
|
+
"type": "array",
|
|
790
|
+
"items": {
|
|
791
|
+
"$ref": "#/components/schemas/ProvenanceRecord"
|
|
792
|
+
},
|
|
793
|
+
"description": "One row per event, grouped by fact."
|
|
794
|
+
}
|
|
795
|
+
},
|
|
796
|
+
"required": [
|
|
797
|
+
"records"
|
|
798
|
+
]
|
|
799
|
+
},
|
|
800
|
+
"ProvenanceRecord": {
|
|
801
|
+
"type": "object",
|
|
802
|
+
"properties": {
|
|
803
|
+
"factId": {
|
|
804
|
+
"type": "string",
|
|
805
|
+
"description": "Stable identifier of the fact, derived from its content. Every event of one fact shares it."
|
|
806
|
+
},
|
|
807
|
+
"subject": {
|
|
808
|
+
"type": "string",
|
|
809
|
+
"description": "Subject of the fact."
|
|
810
|
+
},
|
|
811
|
+
"predicate": {
|
|
812
|
+
"type": "string",
|
|
813
|
+
"description": "Predicate of the fact."
|
|
814
|
+
},
|
|
815
|
+
"object": {
|
|
816
|
+
"type": "string",
|
|
817
|
+
"description": "Object of the fact."
|
|
818
|
+
},
|
|
819
|
+
"graph": {
|
|
820
|
+
"type": "string",
|
|
821
|
+
"description": "Named graph IRI. Absent for the default graph."
|
|
822
|
+
},
|
|
823
|
+
"type": {
|
|
824
|
+
"type": "string",
|
|
825
|
+
"enum": [
|
|
826
|
+
"write",
|
|
827
|
+
"remove"
|
|
828
|
+
],
|
|
829
|
+
"description": "What happened. Absent, with time and the writer fields, when the fact has no records."
|
|
830
|
+
},
|
|
831
|
+
"time": {
|
|
832
|
+
"type": "string",
|
|
833
|
+
"description": "ISO 8601 timestamp of the event."
|
|
834
|
+
},
|
|
835
|
+
"writerKeyId": {
|
|
836
|
+
"type": "string",
|
|
837
|
+
"description": "ID of the API key that made the change, or `admin` for the platform's own key. Set by the API; callers cannot choose it."
|
|
838
|
+
},
|
|
839
|
+
"writerName": {
|
|
840
|
+
"type": "string",
|
|
841
|
+
"description": "Name of that API key, if it has one."
|
|
842
|
+
},
|
|
843
|
+
"source": {
|
|
844
|
+
"type": "string",
|
|
845
|
+
"description": "The source given with the import."
|
|
846
|
+
},
|
|
847
|
+
"replacesFactId": {
|
|
848
|
+
"type": "string",
|
|
849
|
+
"description": "factId of the fact this one replaced: same subject, predicate and graph, removed in the same change."
|
|
850
|
+
}
|
|
851
|
+
},
|
|
852
|
+
"required": [
|
|
853
|
+
"factId",
|
|
854
|
+
"subject",
|
|
855
|
+
"predicate",
|
|
856
|
+
"object"
|
|
857
|
+
]
|
|
858
|
+
},
|
|
859
|
+
"ProvenanceRequest": {
|
|
860
|
+
"type": "object",
|
|
861
|
+
"properties": {
|
|
862
|
+
"subject": {
|
|
863
|
+
"type": "string",
|
|
864
|
+
"minLength": 1,
|
|
865
|
+
"description": "Subject IRI whose facts to look up."
|
|
866
|
+
},
|
|
867
|
+
"predicate": {
|
|
868
|
+
"type": "string",
|
|
869
|
+
"minLength": 1,
|
|
870
|
+
"description": "Only return facts with this predicate IRI."
|
|
871
|
+
},
|
|
872
|
+
"limit": {
|
|
873
|
+
"type": "integer",
|
|
874
|
+
"minimum": 1,
|
|
875
|
+
"maximum": 100,
|
|
876
|
+
"default": 20,
|
|
877
|
+
"description": "Maximum number of records to return (1–100)."
|
|
878
|
+
}
|
|
879
|
+
},
|
|
880
|
+
"required": [
|
|
881
|
+
"subject"
|
|
882
|
+
]
|
|
883
|
+
},
|
|
884
|
+
"NamespaceWriteBudget": {
|
|
885
|
+
"type": "object",
|
|
886
|
+
"properties": {
|
|
887
|
+
"namespace": {
|
|
888
|
+
"type": "string"
|
|
889
|
+
},
|
|
890
|
+
"dailyRows": {
|
|
891
|
+
"type": "integer",
|
|
892
|
+
"nullable": true,
|
|
893
|
+
"minimum": 0,
|
|
894
|
+
"exclusiveMinimum": true,
|
|
895
|
+
"description": "The override set for this namespace, or null when it uses the default."
|
|
896
|
+
},
|
|
897
|
+
"defaultDailyRows": {
|
|
898
|
+
"type": "integer",
|
|
899
|
+
"nullable": true,
|
|
900
|
+
"minimum": 0,
|
|
901
|
+
"exclusiveMinimum": true,
|
|
902
|
+
"description": "The deployment default (NAMESPACE_DAILY_ROW_WRITE_BUDGET), or null when none is set."
|
|
903
|
+
},
|
|
904
|
+
"effectiveDailyRows": {
|
|
905
|
+
"type": "integer",
|
|
906
|
+
"nullable": true,
|
|
907
|
+
"minimum": 0,
|
|
908
|
+
"exclusiveMinimum": true,
|
|
909
|
+
"description": "The budget that applies now: the override, else the default. Null means no budget."
|
|
910
|
+
},
|
|
911
|
+
"rowsWrittenToday": {
|
|
912
|
+
"type": "integer",
|
|
913
|
+
"minimum": 0,
|
|
914
|
+
"description": "D1 rows the namespace has written today (UTC), index writes included."
|
|
915
|
+
},
|
|
916
|
+
"day": {
|
|
917
|
+
"type": "string",
|
|
918
|
+
"description": "The UTC day, YYYY-MM-DD."
|
|
919
|
+
}
|
|
920
|
+
},
|
|
921
|
+
"required": [
|
|
922
|
+
"namespace",
|
|
923
|
+
"dailyRows",
|
|
924
|
+
"defaultDailyRows",
|
|
925
|
+
"effectiveDailyRows",
|
|
926
|
+
"rowsWrittenToday",
|
|
927
|
+
"day"
|
|
928
|
+
]
|
|
929
|
+
},
|
|
930
|
+
"SetNamespaceWriteBudgetRequest": {
|
|
931
|
+
"type": "object",
|
|
932
|
+
"properties": {
|
|
933
|
+
"dailyRows": {
|
|
934
|
+
"type": "integer",
|
|
935
|
+
"minimum": 1,
|
|
936
|
+
"maximum": 1000000000,
|
|
937
|
+
"description": "Daily D1 rows the namespace may write (UTC day). Each stored quad costs about 9 rows, and about 94 per asserted quad with inference on."
|
|
938
|
+
}
|
|
939
|
+
},
|
|
940
|
+
"required": [
|
|
941
|
+
"dailyRows"
|
|
942
|
+
]
|
|
943
|
+
},
|
|
944
|
+
"EmbeddingProviderList": {
|
|
945
|
+
"type": "object",
|
|
946
|
+
"properties": {
|
|
947
|
+
"providers": {
|
|
948
|
+
"type": "array",
|
|
949
|
+
"items": {
|
|
950
|
+
"$ref": "#/components/schemas/EmbeddingCredential"
|
|
951
|
+
},
|
|
952
|
+
"description": "One entry per provider the namespace has stored a credential for, newest first, revoked ones included."
|
|
953
|
+
}
|
|
954
|
+
},
|
|
955
|
+
"required": [
|
|
956
|
+
"providers"
|
|
957
|
+
]
|
|
958
|
+
},
|
|
959
|
+
"EmbeddingCredential": {
|
|
960
|
+
"type": "object",
|
|
961
|
+
"properties": {
|
|
962
|
+
"provider": {
|
|
963
|
+
"type": "string",
|
|
964
|
+
"enum": [
|
|
965
|
+
"openai",
|
|
966
|
+
"openrouter"
|
|
967
|
+
],
|
|
968
|
+
"description": "Embedding provider."
|
|
969
|
+
},
|
|
970
|
+
"status": {
|
|
971
|
+
"type": "string",
|
|
972
|
+
"enum": [
|
|
973
|
+
"active",
|
|
974
|
+
"invalid",
|
|
975
|
+
"revoked"
|
|
976
|
+
],
|
|
977
|
+
"description": "active: usable. invalid: the provider rejected the key repeatedly; rotate it. revoked: deleted; worlds fall back to keyword-only search."
|
|
978
|
+
},
|
|
979
|
+
"fingerprint": {
|
|
980
|
+
"type": "string",
|
|
981
|
+
"description": "First 8 hex characters of the key's SHA-256, for support."
|
|
982
|
+
},
|
|
983
|
+
"last4": {
|
|
984
|
+
"type": "string",
|
|
985
|
+
"description": "Last four characters of the key."
|
|
986
|
+
},
|
|
987
|
+
"createTime": {
|
|
988
|
+
"type": "string",
|
|
989
|
+
"description": "ISO 8601 creation time."
|
|
990
|
+
},
|
|
991
|
+
"rotateTime": {
|
|
992
|
+
"type": "string",
|
|
993
|
+
"description": "ISO 8601 time of the most recent rotation."
|
|
994
|
+
},
|
|
995
|
+
"revokeTime": {
|
|
996
|
+
"type": "string",
|
|
997
|
+
"description": "ISO 8601 time the credential was revoked."
|
|
998
|
+
}
|
|
999
|
+
},
|
|
1000
|
+
"required": [
|
|
1001
|
+
"provider",
|
|
1002
|
+
"status",
|
|
1003
|
+
"fingerprint",
|
|
1004
|
+
"last4",
|
|
1005
|
+
"createTime"
|
|
1006
|
+
]
|
|
1007
|
+
},
|
|
1008
|
+
"EmbeddingCredentialRequest": {
|
|
1009
|
+
"type": "object",
|
|
1010
|
+
"properties": {
|
|
1011
|
+
"apiKey": {
|
|
1012
|
+
"type": "string",
|
|
1013
|
+
"maxLength": 512,
|
|
1014
|
+
"description": "The provider API key. Write-only: it is encrypted at rest and never returned or logged; only a fingerprint and last four characters are exposed."
|
|
1015
|
+
}
|
|
1016
|
+
},
|
|
1017
|
+
"required": [
|
|
1018
|
+
"apiKey"
|
|
1019
|
+
]
|
|
1020
|
+
}
|
|
1021
|
+
},
|
|
1022
|
+
"parameters": {}
|
|
1023
|
+
},
|
|
1024
|
+
"paths": {
|
|
1025
|
+
"/health": {
|
|
1026
|
+
"get": {
|
|
1027
|
+
"security": [],
|
|
1028
|
+
"tags": [
|
|
1029
|
+
"Health"
|
|
1030
|
+
],
|
|
1031
|
+
"operationId": "getHealth",
|
|
1032
|
+
"summary": "Get health",
|
|
1033
|
+
"description": "Liveness probe. Returns 200 when the service can reach its database; 503 when the database is unreachable.",
|
|
1034
|
+
"x-mint": {
|
|
1035
|
+
"metadata": {
|
|
1036
|
+
"title": "Get health"
|
|
1037
|
+
}
|
|
1038
|
+
},
|
|
1039
|
+
"responses": {
|
|
1040
|
+
"200": {
|
|
1041
|
+
"description": "Service is healthy",
|
|
1042
|
+
"content": {
|
|
1043
|
+
"application/json": {
|
|
1044
|
+
"schema": {
|
|
1045
|
+
"type": "object",
|
|
1046
|
+
"properties": {
|
|
1047
|
+
"status": {
|
|
1048
|
+
"type": "string",
|
|
1049
|
+
"enum": [
|
|
1050
|
+
"ok"
|
|
1051
|
+
]
|
|
1052
|
+
},
|
|
1053
|
+
"gitSha": {
|
|
1054
|
+
"type": "string",
|
|
1055
|
+
"nullable": true
|
|
1056
|
+
}
|
|
1057
|
+
},
|
|
1058
|
+
"required": [
|
|
1059
|
+
"status",
|
|
1060
|
+
"gitSha"
|
|
1061
|
+
]
|
|
1062
|
+
}
|
|
1063
|
+
}
|
|
1064
|
+
}
|
|
1065
|
+
},
|
|
1066
|
+
"503": {
|
|
1067
|
+
"description": "Service is degraded",
|
|
1068
|
+
"content": {
|
|
1069
|
+
"application/json": {
|
|
1070
|
+
"schema": {
|
|
1071
|
+
"type": "object",
|
|
1072
|
+
"properties": {
|
|
1073
|
+
"status": {
|
|
1074
|
+
"type": "string",
|
|
1075
|
+
"enum": [
|
|
1076
|
+
"degraded"
|
|
1077
|
+
]
|
|
1078
|
+
},
|
|
1079
|
+
"gitSha": {
|
|
1080
|
+
"type": "string",
|
|
1081
|
+
"nullable": true
|
|
1082
|
+
},
|
|
1083
|
+
"error": {
|
|
1084
|
+
"type": "string"
|
|
1085
|
+
}
|
|
1086
|
+
},
|
|
1087
|
+
"required": [
|
|
1088
|
+
"status",
|
|
1089
|
+
"gitSha",
|
|
1090
|
+
"error"
|
|
1091
|
+
]
|
|
1092
|
+
}
|
|
1093
|
+
}
|
|
1094
|
+
}
|
|
1095
|
+
}
|
|
1096
|
+
}
|
|
1097
|
+
}
|
|
1098
|
+
},
|
|
1099
|
+
"/ready": {
|
|
1100
|
+
"get": {
|
|
1101
|
+
"security": [],
|
|
1102
|
+
"tags": [
|
|
1103
|
+
"Health"
|
|
1104
|
+
],
|
|
1105
|
+
"operationId": "getReadiness",
|
|
1106
|
+
"summary": "Get readiness",
|
|
1107
|
+
"description": "Readiness probe. Returns 200 only when D1 is reachable and its control-plane schema matches this service.",
|
|
1108
|
+
"x-mint": {
|
|
1109
|
+
"metadata": {
|
|
1110
|
+
"title": "Get readiness"
|
|
1111
|
+
}
|
|
1112
|
+
},
|
|
1113
|
+
"responses": {
|
|
1114
|
+
"200": {
|
|
1115
|
+
"description": "Service and control-plane schema are ready",
|
|
1116
|
+
"content": {
|
|
1117
|
+
"application/json": {
|
|
1118
|
+
"schema": {
|
|
1119
|
+
"type": "object",
|
|
1120
|
+
"properties": {
|
|
1121
|
+
"status": {
|
|
1122
|
+
"type": "string",
|
|
1123
|
+
"enum": [
|
|
1124
|
+
"ready"
|
|
1125
|
+
]
|
|
1126
|
+
}
|
|
1127
|
+
},
|
|
1128
|
+
"required": [
|
|
1129
|
+
"status"
|
|
1130
|
+
]
|
|
1131
|
+
}
|
|
1132
|
+
}
|
|
1133
|
+
}
|
|
1134
|
+
},
|
|
1135
|
+
"503": {
|
|
1136
|
+
"description": "Service is not ready",
|
|
1137
|
+
"content": {
|
|
1138
|
+
"application/json": {
|
|
1139
|
+
"schema": {
|
|
1140
|
+
"type": "object",
|
|
1141
|
+
"properties": {
|
|
1142
|
+
"status": {
|
|
1143
|
+
"type": "string",
|
|
1144
|
+
"enum": [
|
|
1145
|
+
"not_ready"
|
|
1146
|
+
]
|
|
1147
|
+
},
|
|
1148
|
+
"error": {
|
|
1149
|
+
"type": "string"
|
|
1150
|
+
}
|
|
1151
|
+
},
|
|
1152
|
+
"required": [
|
|
1153
|
+
"status",
|
|
1154
|
+
"error"
|
|
1155
|
+
]
|
|
1156
|
+
}
|
|
1157
|
+
}
|
|
1158
|
+
}
|
|
1159
|
+
}
|
|
1160
|
+
}
|
|
1161
|
+
}
|
|
1162
|
+
},
|
|
1163
|
+
"/worlds": {
|
|
1164
|
+
"get": {
|
|
1165
|
+
"tags": [
|
|
1166
|
+
"Worlds"
|
|
1167
|
+
],
|
|
1168
|
+
"operationId": "listWorlds",
|
|
1169
|
+
"summary": "List worlds",
|
|
1170
|
+
"description": "List all worlds accessible to the authenticated token. Admin tokens see all worlds; namespace-scoped tokens see only their namespace's worlds.",
|
|
1171
|
+
"x-mint": {
|
|
1172
|
+
"metadata": {
|
|
1173
|
+
"title": "List worlds"
|
|
1174
|
+
}
|
|
1175
|
+
},
|
|
1176
|
+
"security": [
|
|
1177
|
+
{
|
|
1178
|
+
"bearerWorldsToken": []
|
|
1179
|
+
}
|
|
1180
|
+
],
|
|
1181
|
+
"responses": {
|
|
1182
|
+
"200": {
|
|
1183
|
+
"description": "World list",
|
|
1184
|
+
"content": {
|
|
1185
|
+
"application/json": {
|
|
1186
|
+
"schema": {
|
|
1187
|
+
"type": "object",
|
|
1188
|
+
"properties": {
|
|
1189
|
+
"worlds": {
|
|
1190
|
+
"type": "array",
|
|
1191
|
+
"items": {
|
|
1192
|
+
"$ref": "#/components/schemas/WorldResource"
|
|
1193
|
+
}
|
|
1194
|
+
}
|
|
1195
|
+
},
|
|
1196
|
+
"required": [
|
|
1197
|
+
"worlds"
|
|
1198
|
+
]
|
|
1199
|
+
}
|
|
1200
|
+
}
|
|
1201
|
+
}
|
|
1202
|
+
}
|
|
1203
|
+
}
|
|
1204
|
+
},
|
|
1205
|
+
"post": {
|
|
1206
|
+
"tags": [
|
|
1207
|
+
"Worlds"
|
|
1208
|
+
],
|
|
1209
|
+
"operationId": "createWorld",
|
|
1210
|
+
"summary": "Create world",
|
|
1211
|
+
"description": "Create a new World metadata record in the shared D1 database. Worlds API mints its ID as w_<ULID>; callers cannot choose the ID or a slug.",
|
|
1212
|
+
"x-mint": {
|
|
1213
|
+
"metadata": {
|
|
1214
|
+
"title": "Create world"
|
|
1215
|
+
}
|
|
1216
|
+
},
|
|
1217
|
+
"security": [
|
|
1218
|
+
{
|
|
1219
|
+
"bearerWorldsToken": []
|
|
1220
|
+
}
|
|
1221
|
+
],
|
|
1222
|
+
"requestBody": {
|
|
1223
|
+
"required": true,
|
|
1224
|
+
"content": {
|
|
1225
|
+
"application/json": {
|
|
1226
|
+
"schema": {
|
|
1227
|
+
"$ref": "#/components/schemas/CreateWorldRequest"
|
|
1228
|
+
}
|
|
1229
|
+
}
|
|
1230
|
+
}
|
|
1231
|
+
},
|
|
1232
|
+
"responses": {
|
|
1233
|
+
"201": {
|
|
1234
|
+
"description": "Created World",
|
|
1235
|
+
"content": {
|
|
1236
|
+
"application/json": {
|
|
1237
|
+
"schema": {
|
|
1238
|
+
"$ref": "#/components/schemas/WorldResource"
|
|
1239
|
+
}
|
|
1240
|
+
}
|
|
1241
|
+
}
|
|
1242
|
+
},
|
|
1243
|
+
"400": {
|
|
1244
|
+
"description": "Bad request",
|
|
1245
|
+
"content": {
|
|
1246
|
+
"application/json": {
|
|
1247
|
+
"schema": {
|
|
1248
|
+
"type": "object",
|
|
1249
|
+
"properties": {
|
|
1250
|
+
"error": {
|
|
1251
|
+
"type": "object",
|
|
1252
|
+
"properties": {
|
|
1253
|
+
"code": {
|
|
1254
|
+
"type": "string"
|
|
1255
|
+
},
|
|
1256
|
+
"message": {
|
|
1257
|
+
"type": "string"
|
|
1258
|
+
}
|
|
1259
|
+
},
|
|
1260
|
+
"required": [
|
|
1261
|
+
"code",
|
|
1262
|
+
"message"
|
|
1263
|
+
]
|
|
1264
|
+
}
|
|
1265
|
+
},
|
|
1266
|
+
"required": [
|
|
1267
|
+
"error"
|
|
1268
|
+
]
|
|
1269
|
+
}
|
|
1270
|
+
}
|
|
1271
|
+
}
|
|
1272
|
+
},
|
|
1273
|
+
"409": {
|
|
1274
|
+
"description": "embeddingModel was given but the namespace has no active embedding credential (EMBEDDING_CREDENTIAL_REQUIRED).",
|
|
1275
|
+
"content": {
|
|
1276
|
+
"application/json": {
|
|
1277
|
+
"schema": {
|
|
1278
|
+
"type": "object",
|
|
1279
|
+
"properties": {
|
|
1280
|
+
"error": {
|
|
1281
|
+
"type": "object",
|
|
1282
|
+
"properties": {
|
|
1283
|
+
"code": {
|
|
1284
|
+
"type": "string"
|
|
1285
|
+
},
|
|
1286
|
+
"message": {
|
|
1287
|
+
"type": "string"
|
|
1288
|
+
}
|
|
1289
|
+
},
|
|
1290
|
+
"required": [
|
|
1291
|
+
"code",
|
|
1292
|
+
"message"
|
|
1293
|
+
]
|
|
1294
|
+
}
|
|
1295
|
+
},
|
|
1296
|
+
"required": [
|
|
1297
|
+
"error"
|
|
1298
|
+
]
|
|
1299
|
+
}
|
|
1300
|
+
}
|
|
1301
|
+
}
|
|
1302
|
+
}
|
|
1303
|
+
}
|
|
1304
|
+
}
|
|
1305
|
+
},
|
|
1306
|
+
"/worlds/{worldId}": {
|
|
1307
|
+
"get": {
|
|
1308
|
+
"tags": [
|
|
1309
|
+
"Worlds"
|
|
1310
|
+
],
|
|
1311
|
+
"operationId": "getWorld",
|
|
1312
|
+
"summary": "Get world",
|
|
1313
|
+
"description": "Retrieve a single world by its unique identifier. Returns the full WorldResource including state, storage backend (deprecated), and search configuration.",
|
|
1314
|
+
"x-mint": {
|
|
1315
|
+
"metadata": {
|
|
1316
|
+
"title": "Get world"
|
|
1317
|
+
}
|
|
1318
|
+
},
|
|
1319
|
+
"security": [
|
|
1320
|
+
{
|
|
1321
|
+
"bearerWorldsToken": []
|
|
1322
|
+
}
|
|
1323
|
+
],
|
|
1324
|
+
"parameters": [
|
|
1325
|
+
{
|
|
1326
|
+
"schema": {
|
|
1327
|
+
"type": "string",
|
|
1328
|
+
"pattern": "^w_[0-7][0-9a-hjkmnp-tv-z]{25}$",
|
|
1329
|
+
"description": "The world-api-minted world ID, a w_ prefix and a lowercase ULID."
|
|
1330
|
+
},
|
|
1331
|
+
"required": true,
|
|
1332
|
+
"description": "The world-api-minted world ID, a w_ prefix and a lowercase ULID.",
|
|
1333
|
+
"name": "worldId",
|
|
1334
|
+
"in": "path"
|
|
1335
|
+
}
|
|
1336
|
+
],
|
|
1337
|
+
"responses": {
|
|
1338
|
+
"200": {
|
|
1339
|
+
"description": "World",
|
|
1340
|
+
"content": {
|
|
1341
|
+
"application/json": {
|
|
1342
|
+
"schema": {
|
|
1343
|
+
"$ref": "#/components/schemas/WorldResource"
|
|
1344
|
+
}
|
|
1345
|
+
}
|
|
1346
|
+
}
|
|
1347
|
+
},
|
|
1348
|
+
"404": {
|
|
1349
|
+
"description": "Not found",
|
|
1350
|
+
"content": {
|
|
1351
|
+
"application/json": {
|
|
1352
|
+
"schema": {
|
|
1353
|
+
"type": "object",
|
|
1354
|
+
"properties": {
|
|
1355
|
+
"error": {
|
|
1356
|
+
"type": "object",
|
|
1357
|
+
"properties": {
|
|
1358
|
+
"code": {
|
|
1359
|
+
"type": "string"
|
|
1360
|
+
},
|
|
1361
|
+
"message": {
|
|
1362
|
+
"type": "string"
|
|
1363
|
+
}
|
|
1364
|
+
},
|
|
1365
|
+
"required": [
|
|
1366
|
+
"code",
|
|
1367
|
+
"message"
|
|
1368
|
+
]
|
|
1369
|
+
}
|
|
1370
|
+
},
|
|
1371
|
+
"required": [
|
|
1372
|
+
"error"
|
|
1373
|
+
]
|
|
1374
|
+
}
|
|
1375
|
+
}
|
|
1376
|
+
}
|
|
1377
|
+
}
|
|
1378
|
+
}
|
|
1379
|
+
},
|
|
1380
|
+
"patch": {
|
|
1381
|
+
"tags": [
|
|
1382
|
+
"Worlds"
|
|
1383
|
+
],
|
|
1384
|
+
"operationId": "updateWorld",
|
|
1385
|
+
"summary": "Update world",
|
|
1386
|
+
"description": "Update a world's display name, embedding model, or search configuration. Changing the embedding model marks the world stale (embeddingStatus stale): search runs keyword-only until POST /worlds/{worldId}/reindex is called. It does not reindex automatically, because reindexing spends the namespace's embedding budget. Setting a model requires an active embedding credential for the namespace.",
|
|
1387
|
+
"x-mint": {
|
|
1388
|
+
"metadata": {
|
|
1389
|
+
"title": "Update world"
|
|
1390
|
+
}
|
|
1391
|
+
},
|
|
1392
|
+
"security": [
|
|
1393
|
+
{
|
|
1394
|
+
"bearerWorldsToken": []
|
|
1395
|
+
}
|
|
1396
|
+
],
|
|
1397
|
+
"parameters": [
|
|
1398
|
+
{
|
|
1399
|
+
"schema": {
|
|
1400
|
+
"type": "string",
|
|
1401
|
+
"pattern": "^w_[0-7][0-9a-hjkmnp-tv-z]{25}$",
|
|
1402
|
+
"description": "The world-api-minted world ID, a w_ prefix and a lowercase ULID."
|
|
1403
|
+
},
|
|
1404
|
+
"required": true,
|
|
1405
|
+
"description": "The world-api-minted world ID, a w_ prefix and a lowercase ULID.",
|
|
1406
|
+
"name": "worldId",
|
|
1407
|
+
"in": "path"
|
|
1408
|
+
}
|
|
1409
|
+
],
|
|
1410
|
+
"requestBody": {
|
|
1411
|
+
"required": true,
|
|
1412
|
+
"content": {
|
|
1413
|
+
"application/json": {
|
|
1414
|
+
"schema": {
|
|
1415
|
+
"$ref": "#/components/schemas/UpdateWorldRequest"
|
|
1416
|
+
}
|
|
1417
|
+
}
|
|
1418
|
+
}
|
|
1419
|
+
},
|
|
1420
|
+
"responses": {
|
|
1421
|
+
"200": {
|
|
1422
|
+
"description": "Updated World",
|
|
1423
|
+
"content": {
|
|
1424
|
+
"application/json": {
|
|
1425
|
+
"schema": {
|
|
1426
|
+
"$ref": "#/components/schemas/WorldResource"
|
|
1427
|
+
}
|
|
1428
|
+
}
|
|
1429
|
+
}
|
|
1430
|
+
},
|
|
1431
|
+
"400": {
|
|
1432
|
+
"description": "Bad request",
|
|
1433
|
+
"content": {
|
|
1434
|
+
"application/json": {
|
|
1435
|
+
"schema": {
|
|
1436
|
+
"type": "object",
|
|
1437
|
+
"properties": {
|
|
1438
|
+
"error": {
|
|
1439
|
+
"type": "object",
|
|
1440
|
+
"properties": {
|
|
1441
|
+
"code": {
|
|
1442
|
+
"type": "string"
|
|
1443
|
+
},
|
|
1444
|
+
"message": {
|
|
1445
|
+
"type": "string"
|
|
1446
|
+
}
|
|
1447
|
+
},
|
|
1448
|
+
"required": [
|
|
1449
|
+
"code",
|
|
1450
|
+
"message"
|
|
1451
|
+
]
|
|
1452
|
+
}
|
|
1453
|
+
},
|
|
1454
|
+
"required": [
|
|
1455
|
+
"error"
|
|
1456
|
+
]
|
|
1457
|
+
}
|
|
1458
|
+
}
|
|
1459
|
+
}
|
|
1460
|
+
},
|
|
1461
|
+
"404": {
|
|
1462
|
+
"description": "Not found",
|
|
1463
|
+
"content": {
|
|
1464
|
+
"application/json": {
|
|
1465
|
+
"schema": {
|
|
1466
|
+
"type": "object",
|
|
1467
|
+
"properties": {
|
|
1468
|
+
"error": {
|
|
1469
|
+
"type": "object",
|
|
1470
|
+
"properties": {
|
|
1471
|
+
"code": {
|
|
1472
|
+
"type": "string"
|
|
1473
|
+
},
|
|
1474
|
+
"message": {
|
|
1475
|
+
"type": "string"
|
|
1476
|
+
}
|
|
1477
|
+
},
|
|
1478
|
+
"required": [
|
|
1479
|
+
"code",
|
|
1480
|
+
"message"
|
|
1481
|
+
]
|
|
1482
|
+
}
|
|
1483
|
+
},
|
|
1484
|
+
"required": [
|
|
1485
|
+
"error"
|
|
1486
|
+
]
|
|
1487
|
+
}
|
|
1488
|
+
}
|
|
1489
|
+
}
|
|
1490
|
+
}
|
|
1491
|
+
}
|
|
1492
|
+
},
|
|
1493
|
+
"delete": {
|
|
1494
|
+
"tags": [
|
|
1495
|
+
"Worlds"
|
|
1496
|
+
],
|
|
1497
|
+
"operationId": "deleteWorld",
|
|
1498
|
+
"summary": "Delete world",
|
|
1499
|
+
"description": "Soft-delete a world. The world enters a 30-day grace period during which it can be restored via undelete. After the grace period, the world is permanently purged.",
|
|
1500
|
+
"x-mint": {
|
|
1501
|
+
"metadata": {
|
|
1502
|
+
"title": "Delete world"
|
|
1503
|
+
}
|
|
1504
|
+
},
|
|
1505
|
+
"security": [
|
|
1506
|
+
{
|
|
1507
|
+
"bearerWorldsToken": []
|
|
1508
|
+
}
|
|
1509
|
+
],
|
|
1510
|
+
"parameters": [
|
|
1511
|
+
{
|
|
1512
|
+
"schema": {
|
|
1513
|
+
"type": "string",
|
|
1514
|
+
"pattern": "^w_[0-7][0-9a-hjkmnp-tv-z]{25}$",
|
|
1515
|
+
"description": "The world-api-minted world ID, a w_ prefix and a lowercase ULID."
|
|
1516
|
+
},
|
|
1517
|
+
"required": true,
|
|
1518
|
+
"description": "The world-api-minted world ID, a w_ prefix and a lowercase ULID.",
|
|
1519
|
+
"name": "worldId",
|
|
1520
|
+
"in": "path"
|
|
1521
|
+
}
|
|
1522
|
+
],
|
|
1523
|
+
"responses": {
|
|
1524
|
+
"204": {
|
|
1525
|
+
"description": "Deleted"
|
|
1526
|
+
},
|
|
1527
|
+
"404": {
|
|
1528
|
+
"description": "Not found",
|
|
1529
|
+
"content": {
|
|
1530
|
+
"application/json": {
|
|
1531
|
+
"schema": {
|
|
1532
|
+
"type": "object",
|
|
1533
|
+
"properties": {
|
|
1534
|
+
"error": {
|
|
1535
|
+
"type": "object",
|
|
1536
|
+
"properties": {
|
|
1537
|
+
"code": {
|
|
1538
|
+
"type": "string"
|
|
1539
|
+
},
|
|
1540
|
+
"message": {
|
|
1541
|
+
"type": "string"
|
|
1542
|
+
}
|
|
1543
|
+
},
|
|
1544
|
+
"required": [
|
|
1545
|
+
"code",
|
|
1546
|
+
"message"
|
|
1547
|
+
]
|
|
1548
|
+
}
|
|
1549
|
+
},
|
|
1550
|
+
"required": [
|
|
1551
|
+
"error"
|
|
1552
|
+
]
|
|
1553
|
+
}
|
|
1554
|
+
}
|
|
1555
|
+
}
|
|
1556
|
+
}
|
|
1557
|
+
}
|
|
1558
|
+
}
|
|
1559
|
+
},
|
|
1560
|
+
"/worlds/{worldId}/undelete": {
|
|
1561
|
+
"post": {
|
|
1562
|
+
"tags": [
|
|
1563
|
+
"Worlds"
|
|
1564
|
+
],
|
|
1565
|
+
"operationId": "undeleteWorld",
|
|
1566
|
+
"summary": "Undelete world",
|
|
1567
|
+
"description": "Restore a soft-deleted world within its 30-day grace period. Returns the restored WorldResource. Fails if the grace period has expired.",
|
|
1568
|
+
"x-mint": {
|
|
1569
|
+
"metadata": {
|
|
1570
|
+
"title": "Undelete world"
|
|
1571
|
+
}
|
|
1572
|
+
},
|
|
1573
|
+
"security": [
|
|
1574
|
+
{
|
|
1575
|
+
"bearerWorldsToken": []
|
|
1576
|
+
}
|
|
1577
|
+
],
|
|
1578
|
+
"parameters": [
|
|
1579
|
+
{
|
|
1580
|
+
"schema": {
|
|
1581
|
+
"type": "string",
|
|
1582
|
+
"pattern": "^w_[0-7][0-9a-hjkmnp-tv-z]{25}$",
|
|
1583
|
+
"description": "The world-api-minted world ID, a w_ prefix and a lowercase ULID."
|
|
1584
|
+
},
|
|
1585
|
+
"required": true,
|
|
1586
|
+
"description": "The world-api-minted world ID, a w_ prefix and a lowercase ULID.",
|
|
1587
|
+
"name": "worldId",
|
|
1588
|
+
"in": "path"
|
|
1589
|
+
}
|
|
1590
|
+
],
|
|
1591
|
+
"responses": {
|
|
1592
|
+
"200": {
|
|
1593
|
+
"description": "Restored World",
|
|
1594
|
+
"content": {
|
|
1595
|
+
"application/json": {
|
|
1596
|
+
"schema": {
|
|
1597
|
+
"$ref": "#/components/schemas/WorldResource"
|
|
1598
|
+
}
|
|
1599
|
+
}
|
|
1600
|
+
}
|
|
1601
|
+
},
|
|
1602
|
+
"404": {
|
|
1603
|
+
"description": "Not found",
|
|
1604
|
+
"content": {
|
|
1605
|
+
"application/json": {
|
|
1606
|
+
"schema": {
|
|
1607
|
+
"type": "object",
|
|
1608
|
+
"properties": {
|
|
1609
|
+
"error": {
|
|
1610
|
+
"type": "object",
|
|
1611
|
+
"properties": {
|
|
1612
|
+
"code": {
|
|
1613
|
+
"type": "string"
|
|
1614
|
+
},
|
|
1615
|
+
"message": {
|
|
1616
|
+
"type": "string"
|
|
1617
|
+
}
|
|
1618
|
+
},
|
|
1619
|
+
"required": [
|
|
1620
|
+
"code",
|
|
1621
|
+
"message"
|
|
1622
|
+
]
|
|
1623
|
+
}
|
|
1624
|
+
},
|
|
1625
|
+
"required": [
|
|
1626
|
+
"error"
|
|
1627
|
+
]
|
|
1628
|
+
}
|
|
1629
|
+
}
|
|
1630
|
+
}
|
|
1631
|
+
},
|
|
1632
|
+
"409": {
|
|
1633
|
+
"description": "Restore blocked",
|
|
1634
|
+
"content": {
|
|
1635
|
+
"application/json": {
|
|
1636
|
+
"schema": {
|
|
1637
|
+
"type": "object",
|
|
1638
|
+
"properties": {
|
|
1639
|
+
"error": {
|
|
1640
|
+
"type": "object",
|
|
1641
|
+
"properties": {
|
|
1642
|
+
"code": {
|
|
1643
|
+
"type": "string"
|
|
1644
|
+
},
|
|
1645
|
+
"message": {
|
|
1646
|
+
"type": "string"
|
|
1647
|
+
}
|
|
1648
|
+
},
|
|
1649
|
+
"required": [
|
|
1650
|
+
"code",
|
|
1651
|
+
"message"
|
|
1652
|
+
]
|
|
1653
|
+
}
|
|
1654
|
+
},
|
|
1655
|
+
"required": [
|
|
1656
|
+
"error"
|
|
1657
|
+
]
|
|
1658
|
+
}
|
|
1659
|
+
}
|
|
1660
|
+
}
|
|
1661
|
+
}
|
|
1662
|
+
}
|
|
1663
|
+
}
|
|
1664
|
+
},
|
|
1665
|
+
"/worlds/{worldId}/suspend": {
|
|
1666
|
+
"post": {
|
|
1667
|
+
"tags": [
|
|
1668
|
+
"Worlds"
|
|
1669
|
+
],
|
|
1670
|
+
"operationId": "suspendWorld",
|
|
1671
|
+
"summary": "Suspend world",
|
|
1672
|
+
"description": "Suspend a world, temporarily blocking all read and write operations. The world can be resumed later without data loss.",
|
|
1673
|
+
"x-mint": {
|
|
1674
|
+
"metadata": {
|
|
1675
|
+
"title": "Suspend world"
|
|
1676
|
+
}
|
|
1677
|
+
},
|
|
1678
|
+
"security": [
|
|
1679
|
+
{
|
|
1680
|
+
"bearerWorldsToken": []
|
|
1681
|
+
}
|
|
1682
|
+
],
|
|
1683
|
+
"parameters": [
|
|
1684
|
+
{
|
|
1685
|
+
"schema": {
|
|
1686
|
+
"type": "string",
|
|
1687
|
+
"pattern": "^w_[0-7][0-9a-hjkmnp-tv-z]{25}$",
|
|
1688
|
+
"description": "The world-api-minted world ID, a w_ prefix and a lowercase ULID."
|
|
1689
|
+
},
|
|
1690
|
+
"required": true,
|
|
1691
|
+
"description": "The world-api-minted world ID, a w_ prefix and a lowercase ULID.",
|
|
1692
|
+
"name": "worldId",
|
|
1693
|
+
"in": "path"
|
|
1694
|
+
}
|
|
1695
|
+
],
|
|
1696
|
+
"responses": {
|
|
1697
|
+
"200": {
|
|
1698
|
+
"description": "Suspended World",
|
|
1699
|
+
"content": {
|
|
1700
|
+
"application/json": {
|
|
1701
|
+
"schema": {
|
|
1702
|
+
"$ref": "#/components/schemas/WorldResource"
|
|
1703
|
+
}
|
|
1704
|
+
}
|
|
1705
|
+
}
|
|
1706
|
+
},
|
|
1707
|
+
"404": {
|
|
1708
|
+
"description": "Not found",
|
|
1709
|
+
"content": {
|
|
1710
|
+
"application/json": {
|
|
1711
|
+
"schema": {
|
|
1712
|
+
"type": "object",
|
|
1713
|
+
"properties": {
|
|
1714
|
+
"error": {
|
|
1715
|
+
"type": "object",
|
|
1716
|
+
"properties": {
|
|
1717
|
+
"code": {
|
|
1718
|
+
"type": "string"
|
|
1719
|
+
},
|
|
1720
|
+
"message": {
|
|
1721
|
+
"type": "string"
|
|
1722
|
+
}
|
|
1723
|
+
},
|
|
1724
|
+
"required": [
|
|
1725
|
+
"code",
|
|
1726
|
+
"message"
|
|
1727
|
+
]
|
|
1728
|
+
}
|
|
1729
|
+
},
|
|
1730
|
+
"required": [
|
|
1731
|
+
"error"
|
|
1732
|
+
]
|
|
1733
|
+
}
|
|
1734
|
+
}
|
|
1735
|
+
}
|
|
1736
|
+
}
|
|
1737
|
+
}
|
|
1738
|
+
}
|
|
1739
|
+
},
|
|
1740
|
+
"/worlds/{worldId}/resume": {
|
|
1741
|
+
"post": {
|
|
1742
|
+
"tags": [
|
|
1743
|
+
"Worlds"
|
|
1744
|
+
],
|
|
1745
|
+
"operationId": "resumeWorld",
|
|
1746
|
+
"summary": "Resume world",
|
|
1747
|
+
"description": "Resume a suspended world, restoring full read and write access.",
|
|
1748
|
+
"x-mint": {
|
|
1749
|
+
"metadata": {
|
|
1750
|
+
"title": "Resume world"
|
|
1751
|
+
}
|
|
1752
|
+
},
|
|
1753
|
+
"security": [
|
|
1754
|
+
{
|
|
1755
|
+
"bearerWorldsToken": []
|
|
1756
|
+
}
|
|
1757
|
+
],
|
|
1758
|
+
"parameters": [
|
|
1759
|
+
{
|
|
1760
|
+
"schema": {
|
|
1761
|
+
"type": "string",
|
|
1762
|
+
"pattern": "^w_[0-7][0-9a-hjkmnp-tv-z]{25}$",
|
|
1763
|
+
"description": "The world-api-minted world ID, a w_ prefix and a lowercase ULID."
|
|
1764
|
+
},
|
|
1765
|
+
"required": true,
|
|
1766
|
+
"description": "The world-api-minted world ID, a w_ prefix and a lowercase ULID.",
|
|
1767
|
+
"name": "worldId",
|
|
1768
|
+
"in": "path"
|
|
1769
|
+
}
|
|
1770
|
+
],
|
|
1771
|
+
"responses": {
|
|
1772
|
+
"200": {
|
|
1773
|
+
"description": "Resumed World",
|
|
1774
|
+
"content": {
|
|
1775
|
+
"application/json": {
|
|
1776
|
+
"schema": {
|
|
1777
|
+
"$ref": "#/components/schemas/WorldResource"
|
|
1778
|
+
}
|
|
1779
|
+
}
|
|
1780
|
+
}
|
|
1781
|
+
},
|
|
1782
|
+
"404": {
|
|
1783
|
+
"description": "Not found",
|
|
1784
|
+
"content": {
|
|
1785
|
+
"application/json": {
|
|
1786
|
+
"schema": {
|
|
1787
|
+
"type": "object",
|
|
1788
|
+
"properties": {
|
|
1789
|
+
"error": {
|
|
1790
|
+
"type": "object",
|
|
1791
|
+
"properties": {
|
|
1792
|
+
"code": {
|
|
1793
|
+
"type": "string"
|
|
1794
|
+
},
|
|
1795
|
+
"message": {
|
|
1796
|
+
"type": "string"
|
|
1797
|
+
}
|
|
1798
|
+
},
|
|
1799
|
+
"required": [
|
|
1800
|
+
"code",
|
|
1801
|
+
"message"
|
|
1802
|
+
]
|
|
1803
|
+
}
|
|
1804
|
+
},
|
|
1805
|
+
"required": [
|
|
1806
|
+
"error"
|
|
1807
|
+
]
|
|
1808
|
+
}
|
|
1809
|
+
}
|
|
1810
|
+
}
|
|
1811
|
+
}
|
|
1812
|
+
}
|
|
1813
|
+
}
|
|
1814
|
+
},
|
|
1815
|
+
"/admin/namespaces/{namespace}/delete": {
|
|
1816
|
+
"post": {
|
|
1817
|
+
"tags": [
|
|
1818
|
+
"Admin"
|
|
1819
|
+
],
|
|
1820
|
+
"operationId": "deleteNamespaceWorlds",
|
|
1821
|
+
"summary": "Mark all worlds for a namespace deleted (account deletion)",
|
|
1822
|
+
"description": "Admin-only. Soft-deletes all worlds in a namespace and revokes all API keys for that namespace. Used for account deletion workflows.",
|
|
1823
|
+
"x-mint": {
|
|
1824
|
+
"metadata": {
|
|
1825
|
+
"title": "Delete namespace worlds"
|
|
1826
|
+
}
|
|
1827
|
+
},
|
|
1828
|
+
"security": [
|
|
1829
|
+
{
|
|
1830
|
+
"bearerWorldsToken": []
|
|
1831
|
+
}
|
|
1832
|
+
],
|
|
1833
|
+
"parameters": [
|
|
1834
|
+
{
|
|
1835
|
+
"schema": {
|
|
1836
|
+
"type": "string"
|
|
1837
|
+
},
|
|
1838
|
+
"required": true,
|
|
1839
|
+
"name": "namespace",
|
|
1840
|
+
"in": "path"
|
|
1841
|
+
}
|
|
1842
|
+
],
|
|
1843
|
+
"responses": {
|
|
1844
|
+
"200": {
|
|
1845
|
+
"description": "Delete result",
|
|
1846
|
+
"content": {
|
|
1847
|
+
"application/json": {
|
|
1848
|
+
"schema": {
|
|
1849
|
+
"type": "object",
|
|
1850
|
+
"properties": {
|
|
1851
|
+
"deletedWorlds": {
|
|
1852
|
+
"type": "integer"
|
|
1853
|
+
},
|
|
1854
|
+
"revokedKeys": {
|
|
1855
|
+
"type": "integer"
|
|
1856
|
+
},
|
|
1857
|
+
"vectorCleanup": {
|
|
1858
|
+
"$ref": "#/components/schemas/VectorCleanupReport"
|
|
1859
|
+
}
|
|
1860
|
+
},
|
|
1861
|
+
"required": [
|
|
1862
|
+
"deletedWorlds",
|
|
1863
|
+
"revokedKeys"
|
|
1864
|
+
]
|
|
1865
|
+
}
|
|
1866
|
+
}
|
|
1867
|
+
}
|
|
1868
|
+
},
|
|
1869
|
+
"403": {
|
|
1870
|
+
"description": "Forbidden",
|
|
1871
|
+
"content": {
|
|
1872
|
+
"application/json": {
|
|
1873
|
+
"schema": {
|
|
1874
|
+
"type": "object",
|
|
1875
|
+
"properties": {
|
|
1876
|
+
"error": {
|
|
1877
|
+
"type": "object",
|
|
1878
|
+
"properties": {
|
|
1879
|
+
"code": {
|
|
1880
|
+
"type": "string"
|
|
1881
|
+
},
|
|
1882
|
+
"message": {
|
|
1883
|
+
"type": "string"
|
|
1884
|
+
}
|
|
1885
|
+
},
|
|
1886
|
+
"required": [
|
|
1887
|
+
"code",
|
|
1888
|
+
"message"
|
|
1889
|
+
]
|
|
1890
|
+
}
|
|
1891
|
+
},
|
|
1892
|
+
"required": [
|
|
1893
|
+
"error"
|
|
1894
|
+
]
|
|
1895
|
+
}
|
|
1896
|
+
}
|
|
1897
|
+
}
|
|
1898
|
+
}
|
|
1899
|
+
}
|
|
1900
|
+
}
|
|
1901
|
+
},
|
|
1902
|
+
"/admin/purge": {
|
|
1903
|
+
"post": {
|
|
1904
|
+
"tags": [
|
|
1905
|
+
"Admin"
|
|
1906
|
+
],
|
|
1907
|
+
"operationId": "purgeWorlds",
|
|
1908
|
+
"summary": "Run purge sweep on demand",
|
|
1909
|
+
"description": "Admin-only. Triggers the purge sweep to permanently delete all worlds whose 30-day grace period has expired. Normally runs on a schedule; this endpoint forces an immediate sweep.",
|
|
1910
|
+
"x-mint": {
|
|
1911
|
+
"metadata": {
|
|
1912
|
+
"title": "Run purge sweep on demand"
|
|
1913
|
+
}
|
|
1914
|
+
},
|
|
1915
|
+
"security": [
|
|
1916
|
+
{
|
|
1917
|
+
"bearerWorldsToken": []
|
|
1918
|
+
}
|
|
1919
|
+
],
|
|
1920
|
+
"responses": {
|
|
1921
|
+
"200": {
|
|
1922
|
+
"description": "Purge sweep result",
|
|
1923
|
+
"content": {
|
|
1924
|
+
"application/json": {
|
|
1925
|
+
"schema": {
|
|
1926
|
+
"type": "object",
|
|
1927
|
+
"properties": {
|
|
1928
|
+
"purged": {
|
|
1929
|
+
"type": "integer"
|
|
1930
|
+
},
|
|
1931
|
+
"failed": {
|
|
1932
|
+
"type": "integer"
|
|
1933
|
+
}
|
|
1934
|
+
},
|
|
1935
|
+
"required": [
|
|
1936
|
+
"purged",
|
|
1937
|
+
"failed"
|
|
1938
|
+
]
|
|
1939
|
+
}
|
|
1940
|
+
}
|
|
1941
|
+
}
|
|
1942
|
+
},
|
|
1943
|
+
"403": {
|
|
1944
|
+
"description": "Forbidden",
|
|
1945
|
+
"content": {
|
|
1946
|
+
"application/json": {
|
|
1947
|
+
"schema": {
|
|
1948
|
+
"type": "object",
|
|
1949
|
+
"properties": {
|
|
1950
|
+
"error": {
|
|
1951
|
+
"type": "object",
|
|
1952
|
+
"properties": {
|
|
1953
|
+
"code": {
|
|
1954
|
+
"type": "string"
|
|
1955
|
+
},
|
|
1956
|
+
"message": {
|
|
1957
|
+
"type": "string"
|
|
1958
|
+
}
|
|
1959
|
+
},
|
|
1960
|
+
"required": [
|
|
1961
|
+
"code",
|
|
1962
|
+
"message"
|
|
1963
|
+
]
|
|
1964
|
+
}
|
|
1965
|
+
},
|
|
1966
|
+
"required": [
|
|
1967
|
+
"error"
|
|
1968
|
+
]
|
|
1969
|
+
}
|
|
1970
|
+
}
|
|
1971
|
+
}
|
|
1972
|
+
}
|
|
1973
|
+
}
|
|
1974
|
+
}
|
|
1975
|
+
},
|
|
1976
|
+
"/worlds/{worldId}/import": {
|
|
1977
|
+
"post": {
|
|
1978
|
+
"tags": [
|
|
1979
|
+
"ImportExport"
|
|
1980
|
+
],
|
|
1981
|
+
"operationId": "importWorld",
|
|
1982
|
+
"summary": "Import graph data",
|
|
1983
|
+
"description": "Import RDF data into a world. Accepts Turtle (the default), TriG, N-Triples, N-Quads, or N3 payloads; application/json quad rows; or text/plain chunks. Quads are stored in the world's Cloudflare D1 database and indexed for vector search.",
|
|
1984
|
+
"x-mint": {
|
|
1985
|
+
"metadata": {
|
|
1986
|
+
"title": "Import graph data"
|
|
1987
|
+
}
|
|
1988
|
+
},
|
|
1989
|
+
"security": [
|
|
1990
|
+
{
|
|
1991
|
+
"bearerWorldsToken": []
|
|
1992
|
+
}
|
|
1993
|
+
],
|
|
1994
|
+
"parameters": [
|
|
1995
|
+
{
|
|
1996
|
+
"schema": {
|
|
1997
|
+
"type": "string",
|
|
1998
|
+
"pattern": "^w_[0-7][0-9a-hjkmnp-tv-z]{25}$",
|
|
1999
|
+
"description": "The world-api-minted world ID, a w_ prefix and a lowercase ULID."
|
|
2000
|
+
},
|
|
2001
|
+
"required": true,
|
|
2002
|
+
"description": "The world-api-minted world ID, a w_ prefix and a lowercase ULID.",
|
|
2003
|
+
"name": "worldId",
|
|
2004
|
+
"in": "path"
|
|
2005
|
+
}
|
|
2006
|
+
],
|
|
2007
|
+
"requestBody": {
|
|
2008
|
+
"required": true,
|
|
2009
|
+
"content": {
|
|
2010
|
+
"application/json": {
|
|
2011
|
+
"schema": {
|
|
2012
|
+
"$ref": "#/components/schemas/ImportRequest"
|
|
2013
|
+
}
|
|
2014
|
+
}
|
|
2015
|
+
}
|
|
2016
|
+
},
|
|
2017
|
+
"responses": {
|
|
2018
|
+
"200": {
|
|
2019
|
+
"description": "Import result",
|
|
2020
|
+
"content": {
|
|
2021
|
+
"application/json": {
|
|
2022
|
+
"schema": {
|
|
2023
|
+
"$ref": "#/components/schemas/ImportResponse"
|
|
2024
|
+
}
|
|
2025
|
+
}
|
|
2026
|
+
}
|
|
2027
|
+
},
|
|
2028
|
+
"400": {
|
|
2029
|
+
"description": "Bad request",
|
|
2030
|
+
"content": {
|
|
2031
|
+
"application/json": {
|
|
2032
|
+
"schema": {
|
|
2033
|
+
"type": "object",
|
|
2034
|
+
"properties": {
|
|
2035
|
+
"error": {
|
|
2036
|
+
"type": "object",
|
|
2037
|
+
"properties": {
|
|
2038
|
+
"code": {
|
|
2039
|
+
"type": "string"
|
|
2040
|
+
},
|
|
2041
|
+
"message": {
|
|
2042
|
+
"type": "string"
|
|
2043
|
+
}
|
|
2044
|
+
},
|
|
2045
|
+
"required": [
|
|
2046
|
+
"code",
|
|
2047
|
+
"message"
|
|
2048
|
+
]
|
|
2049
|
+
}
|
|
2050
|
+
},
|
|
2051
|
+
"required": [
|
|
2052
|
+
"error"
|
|
2053
|
+
]
|
|
2054
|
+
}
|
|
2055
|
+
}
|
|
2056
|
+
}
|
|
2057
|
+
},
|
|
2058
|
+
"429": {
|
|
2059
|
+
"description": "The namespace has used its daily database write budget (WRITE_BUDGET_EXCEEDED). Nothing was written; it resets at 00:00 UTC. Reads are unaffected. A 429 EMBEDDING_BUDGET_EXCEEDED means the daily embedding budget ran out during the write; nothing was written.",
|
|
2060
|
+
"content": {
|
|
2061
|
+
"application/json": {
|
|
2062
|
+
"schema": {
|
|
2063
|
+
"$ref": "#/components/schemas/ErrorResponse"
|
|
2064
|
+
}
|
|
2065
|
+
}
|
|
2066
|
+
}
|
|
2067
|
+
},
|
|
2068
|
+
"502": {
|
|
2069
|
+
"description": "The embedding service failed or returned vectors of the wrong length (EMBEDDING_FAILED; reason says which class). Nothing was written and the same request can be retried. Worlds that are not embedding-enabled (stale or no credential) are written keyword-only and never return this.",
|
|
2070
|
+
"content": {
|
|
2071
|
+
"application/json": {
|
|
2072
|
+
"schema": {
|
|
2073
|
+
"$ref": "#/components/schemas/EmbeddingFailureResponse"
|
|
2074
|
+
}
|
|
2075
|
+
}
|
|
2076
|
+
}
|
|
2077
|
+
}
|
|
2078
|
+
}
|
|
2079
|
+
}
|
|
2080
|
+
},
|
|
2081
|
+
"/worlds/{worldId}/export": {
|
|
2082
|
+
"get": {
|
|
2083
|
+
"tags": [
|
|
2084
|
+
"ImportExport"
|
|
2085
|
+
],
|
|
2086
|
+
"operationId": "exportWorld",
|
|
2087
|
+
"summary": "Export graph data",
|
|
2088
|
+
"description": "Export RDF quads from a world. Supports JSON (RDF/JSON array), Turtle, TriG, and JSON-LD output formats. Use the limit and offset query parameters for pagination.",
|
|
2089
|
+
"x-mint": {
|
|
2090
|
+
"metadata": {
|
|
2091
|
+
"title": "Export graph data"
|
|
2092
|
+
}
|
|
2093
|
+
},
|
|
2094
|
+
"security": [
|
|
2095
|
+
{
|
|
2096
|
+
"bearerWorldsToken": []
|
|
2097
|
+
}
|
|
2098
|
+
],
|
|
2099
|
+
"parameters": [
|
|
2100
|
+
{
|
|
2101
|
+
"schema": {
|
|
2102
|
+
"type": "string",
|
|
2103
|
+
"pattern": "^w_[0-7][0-9a-hjkmnp-tv-z]{25}$",
|
|
2104
|
+
"description": "The world-api-minted world ID, a w_ prefix and a lowercase ULID."
|
|
2105
|
+
},
|
|
2106
|
+
"required": true,
|
|
2107
|
+
"description": "The world-api-minted world ID, a w_ prefix and a lowercase ULID.",
|
|
2108
|
+
"name": "worldId",
|
|
2109
|
+
"in": "path"
|
|
2110
|
+
},
|
|
2111
|
+
{
|
|
2112
|
+
"schema": {
|
|
2113
|
+
"type": "string",
|
|
2114
|
+
"default": "application/json",
|
|
2115
|
+
"description": "Export format. Supported: application/json (quad rows), text/plain (text chunks), application/n-quads, application/n-triples, text/turtle, application/trig, application/ld+json. Defaults to application/json."
|
|
2116
|
+
},
|
|
2117
|
+
"required": false,
|
|
2118
|
+
"description": "Export format. Supported: application/json (quad rows), text/plain (text chunks), application/n-quads, application/n-triples, text/turtle, application/trig, application/ld+json. Defaults to application/json.",
|
|
2119
|
+
"name": "format",
|
|
2120
|
+
"in": "query"
|
|
2121
|
+
},
|
|
2122
|
+
{
|
|
2123
|
+
"schema": {
|
|
2124
|
+
"type": "string",
|
|
2125
|
+
"description": "Maximum number of quads in this page (a positive integer). Honored by every format. Defaults to 1000 for application/json and text/plain; serialized RDF formats return the whole world when limit is omitted. When more data remains, the response carries an X-Next-Offset header (and nextOffset in JSON bodies)."
|
|
2126
|
+
},
|
|
2127
|
+
"required": false,
|
|
2128
|
+
"description": "Maximum number of quads in this page (a positive integer). Honored by every format. Defaults to 1000 for application/json and text/plain; serialized RDF formats return the whole world when limit is omitted. When more data remains, the response carries an X-Next-Offset header (and nextOffset in JSON bodies).",
|
|
2129
|
+
"name": "limit",
|
|
2130
|
+
"in": "query"
|
|
2131
|
+
},
|
|
2132
|
+
{
|
|
2133
|
+
"schema": {
|
|
2134
|
+
"type": "string",
|
|
2135
|
+
"description": "Pagination offset (a non-negative integer). Use the X-Next-Offset header, or nextOffset in JSON bodies, from the previous response."
|
|
2136
|
+
},
|
|
2137
|
+
"required": false,
|
|
2138
|
+
"description": "Pagination offset (a non-negative integer). Use the X-Next-Offset header, or nextOffset in JSON bodies, from the previous response.",
|
|
2139
|
+
"name": "offset",
|
|
2140
|
+
"in": "query"
|
|
2141
|
+
}
|
|
2142
|
+
],
|
|
2143
|
+
"responses": {
|
|
2144
|
+
"200": {
|
|
2145
|
+
"description": "Export result",
|
|
2146
|
+
"content": {
|
|
2147
|
+
"application/json": {
|
|
2148
|
+
"schema": {
|
|
2149
|
+
"$ref": "#/components/schemas/ExportQuadsResponse"
|
|
2150
|
+
}
|
|
2151
|
+
},
|
|
2152
|
+
"text/plain": {
|
|
2153
|
+
"schema": {
|
|
2154
|
+
"nullable": true
|
|
2155
|
+
}
|
|
2156
|
+
},
|
|
2157
|
+
"application/n-quads": {
|
|
2158
|
+
"schema": {
|
|
2159
|
+
"nullable": true
|
|
2160
|
+
}
|
|
2161
|
+
},
|
|
2162
|
+
"application/n-triples": {
|
|
2163
|
+
"schema": {
|
|
2164
|
+
"nullable": true
|
|
2165
|
+
}
|
|
2166
|
+
},
|
|
2167
|
+
"text/turtle": {
|
|
2168
|
+
"schema": {
|
|
2169
|
+
"nullable": true
|
|
2170
|
+
}
|
|
2171
|
+
},
|
|
2172
|
+
"application/trig": {
|
|
2173
|
+
"schema": {
|
|
2174
|
+
"nullable": true
|
|
2175
|
+
}
|
|
2176
|
+
},
|
|
2177
|
+
"application/ld+json": {
|
|
2178
|
+
"schema": {
|
|
2179
|
+
"nullable": true
|
|
2180
|
+
}
|
|
2181
|
+
}
|
|
2182
|
+
}
|
|
2183
|
+
},
|
|
2184
|
+
"400": {
|
|
2185
|
+
"description": "Bad request",
|
|
2186
|
+
"content": {
|
|
2187
|
+
"application/json": {
|
|
2188
|
+
"schema": {
|
|
2189
|
+
"type": "object",
|
|
2190
|
+
"properties": {
|
|
2191
|
+
"error": {
|
|
2192
|
+
"type": "object",
|
|
2193
|
+
"properties": {
|
|
2194
|
+
"code": {
|
|
2195
|
+
"type": "string"
|
|
2196
|
+
},
|
|
2197
|
+
"message": {
|
|
2198
|
+
"type": "string"
|
|
2199
|
+
}
|
|
2200
|
+
},
|
|
2201
|
+
"required": [
|
|
2202
|
+
"code",
|
|
2203
|
+
"message"
|
|
2204
|
+
]
|
|
2205
|
+
}
|
|
2206
|
+
},
|
|
2207
|
+
"required": [
|
|
2208
|
+
"error"
|
|
2209
|
+
]
|
|
2210
|
+
}
|
|
2211
|
+
}
|
|
2212
|
+
}
|
|
2213
|
+
}
|
|
2214
|
+
}
|
|
2215
|
+
}
|
|
2216
|
+
},
|
|
2217
|
+
"/worlds/{worldId}/search": {
|
|
2218
|
+
"post": {
|
|
2219
|
+
"tags": [
|
|
2220
|
+
"Search"
|
|
2221
|
+
],
|
|
2222
|
+
"operationId": "searchWorld",
|
|
2223
|
+
"summary": "Search world",
|
|
2224
|
+
"description": "Full-text and vector similarity search across a world's graph data. Returns ranked results with id, subject, predicate, content, score, and scoreType on the normalized 0–1 scale, plus the mode that actually ran. Falls back to LIKE-based search if the primary engine is unavailable.",
|
|
2225
|
+
"x-mint": {
|
|
2226
|
+
"metadata": {
|
|
2227
|
+
"title": "Search world"
|
|
2228
|
+
}
|
|
2229
|
+
},
|
|
2230
|
+
"security": [
|
|
2231
|
+
{
|
|
2232
|
+
"bearerWorldsToken": []
|
|
2233
|
+
}
|
|
2234
|
+
],
|
|
2235
|
+
"parameters": [
|
|
2236
|
+
{
|
|
2237
|
+
"schema": {
|
|
2238
|
+
"type": "string",
|
|
2239
|
+
"pattern": "^w_[0-7][0-9a-hjkmnp-tv-z]{25}$",
|
|
2240
|
+
"description": "The world-api-minted world ID, a w_ prefix and a lowercase ULID."
|
|
2241
|
+
},
|
|
2242
|
+
"required": true,
|
|
2243
|
+
"description": "The world-api-minted world ID, a w_ prefix and a lowercase ULID.",
|
|
2244
|
+
"name": "worldId",
|
|
2245
|
+
"in": "path"
|
|
2246
|
+
}
|
|
2247
|
+
],
|
|
2248
|
+
"requestBody": {
|
|
2249
|
+
"required": true,
|
|
2250
|
+
"content": {
|
|
2251
|
+
"application/json": {
|
|
2252
|
+
"schema": {
|
|
2253
|
+
"$ref": "#/components/schemas/SearchRequest"
|
|
2254
|
+
}
|
|
2255
|
+
}
|
|
2256
|
+
}
|
|
2257
|
+
},
|
|
2258
|
+
"responses": {
|
|
2259
|
+
"200": {
|
|
2260
|
+
"description": "Search results",
|
|
2261
|
+
"content": {
|
|
2262
|
+
"application/json": {
|
|
2263
|
+
"schema": {
|
|
2264
|
+
"$ref": "#/components/schemas/SearchResponse"
|
|
2265
|
+
}
|
|
2266
|
+
}
|
|
2267
|
+
}
|
|
2268
|
+
},
|
|
2269
|
+
"400": {
|
|
2270
|
+
"description": "Bad request",
|
|
2271
|
+
"content": {
|
|
2272
|
+
"application/json": {
|
|
2273
|
+
"schema": {
|
|
2274
|
+
"type": "object",
|
|
2275
|
+
"properties": {
|
|
2276
|
+
"error": {
|
|
2277
|
+
"type": "object",
|
|
2278
|
+
"properties": {
|
|
2279
|
+
"code": {
|
|
2280
|
+
"type": "string"
|
|
2281
|
+
},
|
|
2282
|
+
"message": {
|
|
2283
|
+
"type": "string"
|
|
2284
|
+
}
|
|
2285
|
+
},
|
|
2286
|
+
"required": [
|
|
2287
|
+
"code",
|
|
2288
|
+
"message"
|
|
2289
|
+
]
|
|
2290
|
+
}
|
|
2291
|
+
},
|
|
2292
|
+
"required": [
|
|
2293
|
+
"error"
|
|
2294
|
+
]
|
|
2295
|
+
}
|
|
2296
|
+
}
|
|
2297
|
+
}
|
|
2298
|
+
}
|
|
2299
|
+
}
|
|
2300
|
+
}
|
|
2301
|
+
},
|
|
2302
|
+
"/worlds/sparql": {
|
|
2303
|
+
"post": {
|
|
2304
|
+
"tags": [
|
|
2305
|
+
"SPARQL"
|
|
2306
|
+
],
|
|
2307
|
+
"operationId": "sparqlNoWorld",
|
|
2308
|
+
"summary": "SPARQL without world",
|
|
2309
|
+
"description": "Always returns 400. Use POST /worlds/{worldId}/sparql to execute a SPARQL query against a specific world.",
|
|
2310
|
+
"x-mint": {
|
|
2311
|
+
"metadata": {
|
|
2312
|
+
"title": "SPARQL without world"
|
|
2313
|
+
}
|
|
2314
|
+
},
|
|
2315
|
+
"security": [
|
|
2316
|
+
{
|
|
2317
|
+
"bearerWorldsToken": []
|
|
2318
|
+
}
|
|
2319
|
+
],
|
|
2320
|
+
"responses": {
|
|
2321
|
+
"400": {
|
|
2322
|
+
"description": "Must specify a World",
|
|
2323
|
+
"content": {
|
|
2324
|
+
"application/json": {
|
|
2325
|
+
"schema": {
|
|
2326
|
+
"type": "object",
|
|
2327
|
+
"properties": {
|
|
2328
|
+
"error": {
|
|
2329
|
+
"type": "object",
|
|
2330
|
+
"properties": {
|
|
2331
|
+
"code": {
|
|
2332
|
+
"type": "string"
|
|
2333
|
+
},
|
|
2334
|
+
"message": {
|
|
2335
|
+
"type": "string"
|
|
2336
|
+
}
|
|
2337
|
+
},
|
|
2338
|
+
"required": [
|
|
2339
|
+
"code",
|
|
2340
|
+
"message"
|
|
2341
|
+
]
|
|
2342
|
+
}
|
|
2343
|
+
},
|
|
2344
|
+
"required": [
|
|
2345
|
+
"error"
|
|
2346
|
+
]
|
|
2347
|
+
}
|
|
2348
|
+
}
|
|
2349
|
+
}
|
|
2350
|
+
}
|
|
2351
|
+
}
|
|
2352
|
+
}
|
|
2353
|
+
},
|
|
2354
|
+
"/worlds/{worldId}/sparql": {
|
|
2355
|
+
"post": {
|
|
2356
|
+
"tags": [
|
|
2357
|
+
"SPARQL"
|
|
2358
|
+
],
|
|
2359
|
+
"operationId": "sparqlWorld",
|
|
2360
|
+
"summary": "Execute SPARQL query",
|
|
2361
|
+
"description": "Execute a SPARQL 1.1 query (SELECT, ASK, or UPDATE) against a world's RDF graph. SELECT and ASK require the data:read scope; SPARQL UPDATE (INSERT, DELETE, CLEAR, DROP, and the other update forms) requires data:write, and a key without it receives 403 before the update runs. An unparseable query returns 400 INVALID_ARGUMENT. SELECT results are limited by the server-configured maximum. Queries time out after the configured limit.",
|
|
2362
|
+
"x-mint": {
|
|
2363
|
+
"metadata": {
|
|
2364
|
+
"title": "Execute SPARQL query"
|
|
2365
|
+
}
|
|
2366
|
+
},
|
|
2367
|
+
"security": [
|
|
2368
|
+
{
|
|
2369
|
+
"bearerWorldsToken": []
|
|
2370
|
+
}
|
|
2371
|
+
],
|
|
2372
|
+
"parameters": [
|
|
2373
|
+
{
|
|
2374
|
+
"schema": {
|
|
2375
|
+
"type": "string",
|
|
2376
|
+
"pattern": "^w_[0-7][0-9a-hjkmnp-tv-z]{25}$",
|
|
2377
|
+
"description": "The world-api-minted world ID, a w_ prefix and a lowercase ULID."
|
|
2378
|
+
},
|
|
2379
|
+
"required": true,
|
|
2380
|
+
"description": "The world-api-minted world ID, a w_ prefix and a lowercase ULID.",
|
|
2381
|
+
"name": "worldId",
|
|
2382
|
+
"in": "path"
|
|
2383
|
+
}
|
|
2384
|
+
],
|
|
2385
|
+
"requestBody": {
|
|
2386
|
+
"required": true,
|
|
2387
|
+
"content": {
|
|
2388
|
+
"application/json": {
|
|
2389
|
+
"schema": {
|
|
2390
|
+
"$ref": "#/components/schemas/SparqlRequest"
|
|
2391
|
+
}
|
|
2392
|
+
}
|
|
2393
|
+
}
|
|
2394
|
+
},
|
|
2395
|
+
"responses": {
|
|
2396
|
+
"200": {
|
|
2397
|
+
"description": "SPARQL query result",
|
|
2398
|
+
"content": {
|
|
2399
|
+
"application/json": {
|
|
2400
|
+
"schema": {
|
|
2401
|
+
"nullable": true
|
|
2402
|
+
}
|
|
2403
|
+
}
|
|
2404
|
+
}
|
|
2405
|
+
},
|
|
2406
|
+
"400": {
|
|
2407
|
+
"description": "Bad request",
|
|
2408
|
+
"content": {
|
|
2409
|
+
"application/json": {
|
|
2410
|
+
"schema": {
|
|
2411
|
+
"type": "object",
|
|
2412
|
+
"properties": {
|
|
2413
|
+
"error": {
|
|
2414
|
+
"type": "object",
|
|
2415
|
+
"properties": {
|
|
2416
|
+
"code": {
|
|
2417
|
+
"type": "string"
|
|
2418
|
+
},
|
|
2419
|
+
"message": {
|
|
2420
|
+
"type": "string"
|
|
2421
|
+
}
|
|
2422
|
+
},
|
|
2423
|
+
"required": [
|
|
2424
|
+
"code",
|
|
2425
|
+
"message"
|
|
2426
|
+
]
|
|
2427
|
+
}
|
|
2428
|
+
},
|
|
2429
|
+
"required": [
|
|
2430
|
+
"error"
|
|
2431
|
+
]
|
|
2432
|
+
}
|
|
2433
|
+
}
|
|
2434
|
+
}
|
|
2435
|
+
},
|
|
2436
|
+
"429": {
|
|
2437
|
+
"description": "The namespace has used its daily database write budget (WRITE_BUDGET_EXCEEDED). Nothing was written; it resets at 00:00 UTC. Reads are unaffected. A 429 EMBEDDING_BUDGET_EXCEEDED means the daily embedding budget ran out during the write; nothing was written.",
|
|
2438
|
+
"content": {
|
|
2439
|
+
"application/json": {
|
|
2440
|
+
"schema": {
|
|
2441
|
+
"$ref": "#/components/schemas/ErrorResponse"
|
|
2442
|
+
}
|
|
2443
|
+
}
|
|
2444
|
+
}
|
|
2445
|
+
},
|
|
2446
|
+
"502": {
|
|
2447
|
+
"description": "The embedding service failed or returned vectors of the wrong length (EMBEDDING_FAILED; reason says which class). Nothing was written and the same request can be retried. Worlds that are not embedding-enabled (stale or no credential) are written keyword-only and never return this.",
|
|
2448
|
+
"content": {
|
|
2449
|
+
"application/json": {
|
|
2450
|
+
"schema": {
|
|
2451
|
+
"$ref": "#/components/schemas/EmbeddingFailureResponse"
|
|
2452
|
+
}
|
|
2453
|
+
}
|
|
2454
|
+
}
|
|
2455
|
+
}
|
|
2456
|
+
}
|
|
2457
|
+
}
|
|
2458
|
+
},
|
|
2459
|
+
"/api-keys": {
|
|
2460
|
+
"post": {
|
|
2461
|
+
"tags": [
|
|
2462
|
+
"APIKeys"
|
|
2463
|
+
],
|
|
2464
|
+
"operationId": "createApiKey",
|
|
2465
|
+
"summary": "Create API key",
|
|
2466
|
+
"description": "Create a new API key scoped to a namespace and optionally a single world. The token is returned once on creation and cannot be retrieved again.",
|
|
2467
|
+
"x-mint": {
|
|
2468
|
+
"metadata": {
|
|
2469
|
+
"title": "Create API key"
|
|
2470
|
+
}
|
|
2471
|
+
},
|
|
2472
|
+
"security": [
|
|
2473
|
+
{
|
|
2474
|
+
"bearerWorldsToken": []
|
|
2475
|
+
}
|
|
2476
|
+
],
|
|
2477
|
+
"requestBody": {
|
|
2478
|
+
"required": true,
|
|
2479
|
+
"content": {
|
|
2480
|
+
"application/json": {
|
|
2481
|
+
"schema": {
|
|
2482
|
+
"$ref": "#/components/schemas/ApiKeyCreateRequest"
|
|
2483
|
+
}
|
|
2484
|
+
}
|
|
2485
|
+
}
|
|
2486
|
+
},
|
|
2487
|
+
"responses": {
|
|
2488
|
+
"201": {
|
|
2489
|
+
"description": "Created API key",
|
|
2490
|
+
"content": {
|
|
2491
|
+
"application/json": {
|
|
2492
|
+
"schema": {
|
|
2493
|
+
"$ref": "#/components/schemas/ApiKeyCreateResponse"
|
|
2494
|
+
}
|
|
2495
|
+
}
|
|
2496
|
+
}
|
|
2497
|
+
},
|
|
2498
|
+
"400": {
|
|
2499
|
+
"description": "Bad request",
|
|
2500
|
+
"content": {
|
|
2501
|
+
"application/json": {
|
|
2502
|
+
"schema": {
|
|
2503
|
+
"type": "object",
|
|
2504
|
+
"properties": {
|
|
2505
|
+
"error": {
|
|
2506
|
+
"type": "object",
|
|
2507
|
+
"properties": {
|
|
2508
|
+
"code": {
|
|
2509
|
+
"type": "string"
|
|
2510
|
+
},
|
|
2511
|
+
"message": {
|
|
2512
|
+
"type": "string"
|
|
2513
|
+
}
|
|
2514
|
+
},
|
|
2515
|
+
"required": [
|
|
2516
|
+
"code",
|
|
2517
|
+
"message"
|
|
2518
|
+
]
|
|
2519
|
+
}
|
|
2520
|
+
},
|
|
2521
|
+
"required": [
|
|
2522
|
+
"error"
|
|
2523
|
+
]
|
|
2524
|
+
}
|
|
2525
|
+
}
|
|
2526
|
+
}
|
|
2527
|
+
},
|
|
2528
|
+
"403": {
|
|
2529
|
+
"description": "Forbidden",
|
|
2530
|
+
"content": {
|
|
2531
|
+
"application/json": {
|
|
2532
|
+
"schema": {
|
|
2533
|
+
"type": "object",
|
|
2534
|
+
"properties": {
|
|
2535
|
+
"error": {
|
|
2536
|
+
"type": "object",
|
|
2537
|
+
"properties": {
|
|
2538
|
+
"code": {
|
|
2539
|
+
"type": "string"
|
|
2540
|
+
},
|
|
2541
|
+
"message": {
|
|
2542
|
+
"type": "string"
|
|
2543
|
+
}
|
|
2544
|
+
},
|
|
2545
|
+
"required": [
|
|
2546
|
+
"code",
|
|
2547
|
+
"message"
|
|
2548
|
+
]
|
|
2549
|
+
}
|
|
2550
|
+
},
|
|
2551
|
+
"required": [
|
|
2552
|
+
"error"
|
|
2553
|
+
]
|
|
2554
|
+
}
|
|
2555
|
+
}
|
|
2556
|
+
}
|
|
2557
|
+
}
|
|
2558
|
+
}
|
|
2559
|
+
},
|
|
2560
|
+
"get": {
|
|
2561
|
+
"tags": [
|
|
2562
|
+
"APIKeys"
|
|
2563
|
+
],
|
|
2564
|
+
"operationId": "listApiKeys",
|
|
2565
|
+
"summary": "List API keys",
|
|
2566
|
+
"description": "List all active (non-revoked) API keys. Optionally filter by namespace. Admin-only.",
|
|
2567
|
+
"x-mint": {
|
|
2568
|
+
"metadata": {
|
|
2569
|
+
"title": "List API keys"
|
|
2570
|
+
}
|
|
2571
|
+
},
|
|
2572
|
+
"security": [
|
|
2573
|
+
{
|
|
2574
|
+
"bearerWorldsToken": []
|
|
2575
|
+
}
|
|
2576
|
+
],
|
|
2577
|
+
"parameters": [
|
|
2578
|
+
{
|
|
2579
|
+
"schema": {
|
|
2580
|
+
"type": "string",
|
|
2581
|
+
"description": "Filter API keys by namespace."
|
|
2582
|
+
},
|
|
2583
|
+
"required": false,
|
|
2584
|
+
"description": "Filter API keys by namespace.",
|
|
2585
|
+
"name": "namespace",
|
|
2586
|
+
"in": "query"
|
|
2587
|
+
}
|
|
2588
|
+
],
|
|
2589
|
+
"responses": {
|
|
2590
|
+
"200": {
|
|
2591
|
+
"description": "API keys list",
|
|
2592
|
+
"content": {
|
|
2593
|
+
"application/json": {
|
|
2594
|
+
"schema": {
|
|
2595
|
+
"type": "object",
|
|
2596
|
+
"properties": {
|
|
2597
|
+
"keys": {
|
|
2598
|
+
"type": "array",
|
|
2599
|
+
"items": {
|
|
2600
|
+
"$ref": "#/components/schemas/ApiKeyResource"
|
|
2601
|
+
}
|
|
2602
|
+
}
|
|
2603
|
+
},
|
|
2604
|
+
"required": [
|
|
2605
|
+
"keys"
|
|
2606
|
+
]
|
|
2607
|
+
}
|
|
2608
|
+
}
|
|
2609
|
+
}
|
|
2610
|
+
},
|
|
2611
|
+
"403": {
|
|
2612
|
+
"description": "Forbidden",
|
|
2613
|
+
"content": {
|
|
2614
|
+
"application/json": {
|
|
2615
|
+
"schema": {
|
|
2616
|
+
"type": "object",
|
|
2617
|
+
"properties": {
|
|
2618
|
+
"error": {
|
|
2619
|
+
"type": "object",
|
|
2620
|
+
"properties": {
|
|
2621
|
+
"code": {
|
|
2622
|
+
"type": "string"
|
|
2623
|
+
},
|
|
2624
|
+
"message": {
|
|
2625
|
+
"type": "string"
|
|
2626
|
+
}
|
|
2627
|
+
},
|
|
2628
|
+
"required": [
|
|
2629
|
+
"code",
|
|
2630
|
+
"message"
|
|
2631
|
+
]
|
|
2632
|
+
}
|
|
2633
|
+
},
|
|
2634
|
+
"required": [
|
|
2635
|
+
"error"
|
|
2636
|
+
]
|
|
2637
|
+
}
|
|
2638
|
+
}
|
|
2639
|
+
}
|
|
2640
|
+
}
|
|
2641
|
+
}
|
|
2642
|
+
}
|
|
2643
|
+
},
|
|
2644
|
+
"/api-keys/{keyId}": {
|
|
2645
|
+
"delete": {
|
|
2646
|
+
"tags": [
|
|
2647
|
+
"APIKeys"
|
|
2648
|
+
],
|
|
2649
|
+
"operationId": "deleteApiKey",
|
|
2650
|
+
"summary": "Revoke API key",
|
|
2651
|
+
"description": "Permanently revoke an API key. The key immediately loses all access. This action cannot be undone.",
|
|
2652
|
+
"x-mint": {
|
|
2653
|
+
"metadata": {
|
|
2654
|
+
"title": "Revoke API key"
|
|
2655
|
+
}
|
|
2656
|
+
},
|
|
2657
|
+
"parameters": [
|
|
2658
|
+
{
|
|
2659
|
+
"schema": {
|
|
2660
|
+
"type": "string",
|
|
2661
|
+
"description": "Unique identifier of the API key to revoke."
|
|
2662
|
+
},
|
|
2663
|
+
"required": true,
|
|
2664
|
+
"description": "Unique identifier of the API key to revoke.",
|
|
2665
|
+
"name": "keyId",
|
|
2666
|
+
"in": "path"
|
|
2667
|
+
}
|
|
2668
|
+
],
|
|
2669
|
+
"responses": {
|
|
2670
|
+
"204": {
|
|
2671
|
+
"description": "Revoked"
|
|
2672
|
+
},
|
|
2673
|
+
"403": {
|
|
2674
|
+
"description": "Forbidden",
|
|
2675
|
+
"content": {
|
|
2676
|
+
"application/json": {
|
|
2677
|
+
"schema": {
|
|
2678
|
+
"type": "object",
|
|
2679
|
+
"properties": {
|
|
2680
|
+
"error": {
|
|
2681
|
+
"type": "object",
|
|
2682
|
+
"properties": {
|
|
2683
|
+
"code": {
|
|
2684
|
+
"type": "string"
|
|
2685
|
+
},
|
|
2686
|
+
"message": {
|
|
2687
|
+
"type": "string"
|
|
2688
|
+
}
|
|
2689
|
+
},
|
|
2690
|
+
"required": [
|
|
2691
|
+
"code",
|
|
2692
|
+
"message"
|
|
2693
|
+
]
|
|
2694
|
+
}
|
|
2695
|
+
},
|
|
2696
|
+
"required": [
|
|
2697
|
+
"error"
|
|
2698
|
+
]
|
|
2699
|
+
}
|
|
2700
|
+
}
|
|
2701
|
+
}
|
|
2702
|
+
},
|
|
2703
|
+
"404": {
|
|
2704
|
+
"description": "Not found",
|
|
2705
|
+
"content": {
|
|
2706
|
+
"application/json": {
|
|
2707
|
+
"schema": {
|
|
2708
|
+
"type": "object",
|
|
2709
|
+
"properties": {
|
|
2710
|
+
"error": {
|
|
2711
|
+
"type": "object",
|
|
2712
|
+
"properties": {
|
|
2713
|
+
"code": {
|
|
2714
|
+
"type": "string"
|
|
2715
|
+
},
|
|
2716
|
+
"message": {
|
|
2717
|
+
"type": "string"
|
|
2718
|
+
}
|
|
2719
|
+
},
|
|
2720
|
+
"required": [
|
|
2721
|
+
"code",
|
|
2722
|
+
"message"
|
|
2723
|
+
]
|
|
2724
|
+
}
|
|
2725
|
+
},
|
|
2726
|
+
"required": [
|
|
2727
|
+
"error"
|
|
2728
|
+
]
|
|
2729
|
+
}
|
|
2730
|
+
}
|
|
2731
|
+
}
|
|
2732
|
+
}
|
|
2733
|
+
}
|
|
2734
|
+
}
|
|
2735
|
+
},
|
|
2736
|
+
"/worlds/{worldId}/reindex": {
|
|
2737
|
+
"post": {
|
|
2738
|
+
"tags": [
|
|
2739
|
+
"Reindex"
|
|
2740
|
+
],
|
|
2741
|
+
"operationId": "reindexWorld",
|
|
2742
|
+
"summary": "Reindex world vector & FTS indexes",
|
|
2743
|
+
"description": "Rebuild the vector and full-text search indexes for a world from its stored RDF quads. Required after changing the embedding model (the world is stale and search is keyword-only until it completes) and useful to repair search quality. The full-text index is always rebuilt from D1; if any vector could not be embedded, written or cleaned up, status is completed_with_vector_errors and vectorSync says what failed. Rerunning reindex repairs it. If the embedding service fails outright (an outage, or vectors of the wrong length) the request fails with 502 EMBEDDING_FAILED instead: nothing is recorded as ready, a windowed pass keeps its cursor so calling again retries the same window, and the keyword index is unaffected. Embedding spend is checked against the namespace's daily write budget first; an exhausted budget returns 429 EMBEDDING_BUDGET_EXCEEDED. Worlds with more text than EMBEDDING_REINDEX_MAX_CHUNKS are reindexed in windows across several calls: each call embeds only the next window, so no chunk is embedded twice and the world becomes ready when the last window completes.",
|
|
2744
|
+
"x-mint": {
|
|
2745
|
+
"metadata": {
|
|
2746
|
+
"title": "Reindex world vector & FTS indexes"
|
|
2747
|
+
}
|
|
2748
|
+
},
|
|
2749
|
+
"security": [
|
|
2750
|
+
{
|
|
2751
|
+
"bearerWorldsToken": []
|
|
2752
|
+
}
|
|
2753
|
+
],
|
|
2754
|
+
"parameters": [
|
|
2755
|
+
{
|
|
2756
|
+
"schema": {
|
|
2757
|
+
"type": "string",
|
|
2758
|
+
"pattern": "^w_[0-7][0-9a-hjkmnp-tv-z]{25}$",
|
|
2759
|
+
"description": "The world-api-minted world ID, a w_ prefix and a lowercase ULID."
|
|
2760
|
+
},
|
|
2761
|
+
"required": true,
|
|
2762
|
+
"description": "The world-api-minted world ID, a w_ prefix and a lowercase ULID.",
|
|
2763
|
+
"name": "worldId",
|
|
2764
|
+
"in": "path"
|
|
2765
|
+
}
|
|
2766
|
+
],
|
|
2767
|
+
"responses": {
|
|
2768
|
+
"200": {
|
|
2769
|
+
"description": "Reindex ran. status is completed, completed_with_vector_errors when the vector index could not be fully synced (see vectorSync; calling again retries the failed window), or in_progress when a large world is reindexed in windows: call again until completed (continuation.remainingChunksEstimate says how much is left).",
|
|
2770
|
+
"content": {
|
|
2771
|
+
"application/json": {
|
|
2772
|
+
"schema": {
|
|
2773
|
+
"type": "object",
|
|
2774
|
+
"properties": {
|
|
2775
|
+
"ok": {
|
|
2776
|
+
"type": "boolean",
|
|
2777
|
+
"enum": [
|
|
2778
|
+
true
|
|
2779
|
+
]
|
|
2780
|
+
},
|
|
2781
|
+
"status": {
|
|
2782
|
+
"type": "string",
|
|
2783
|
+
"enum": [
|
|
2784
|
+
"completed",
|
|
2785
|
+
"completed_with_vector_errors",
|
|
2786
|
+
"in_progress"
|
|
2787
|
+
]
|
|
2788
|
+
},
|
|
2789
|
+
"processedQuadCount": {
|
|
2790
|
+
"type": "integer",
|
|
2791
|
+
"minimum": 0
|
|
2792
|
+
},
|
|
2793
|
+
"chunkRowCount": {
|
|
2794
|
+
"type": "integer",
|
|
2795
|
+
"minimum": 0
|
|
2796
|
+
},
|
|
2797
|
+
"vectorSync": {
|
|
2798
|
+
"$ref": "#/components/schemas/VectorSyncReport"
|
|
2799
|
+
},
|
|
2800
|
+
"continuation": {
|
|
2801
|
+
"type": "object",
|
|
2802
|
+
"properties": {
|
|
2803
|
+
"remainingChunksEstimate": {
|
|
2804
|
+
"type": "integer",
|
|
2805
|
+
"minimum": 0
|
|
2806
|
+
}
|
|
2807
|
+
},
|
|
2808
|
+
"required": [
|
|
2809
|
+
"remainingChunksEstimate"
|
|
2810
|
+
]
|
|
2811
|
+
}
|
|
2812
|
+
},
|
|
2813
|
+
"required": [
|
|
2814
|
+
"ok",
|
|
2815
|
+
"status",
|
|
2816
|
+
"processedQuadCount",
|
|
2817
|
+
"chunkRowCount"
|
|
2818
|
+
]
|
|
2819
|
+
}
|
|
2820
|
+
}
|
|
2821
|
+
}
|
|
2822
|
+
},
|
|
2823
|
+
"404": {
|
|
2824
|
+
"description": "World database not found",
|
|
2825
|
+
"content": {
|
|
2826
|
+
"application/json": {
|
|
2827
|
+
"schema": {
|
|
2828
|
+
"type": "object",
|
|
2829
|
+
"properties": {
|
|
2830
|
+
"error": {
|
|
2831
|
+
"type": "object",
|
|
2832
|
+
"properties": {
|
|
2833
|
+
"code": {
|
|
2834
|
+
"type": "string"
|
|
2835
|
+
},
|
|
2836
|
+
"message": {
|
|
2837
|
+
"type": "string"
|
|
2838
|
+
}
|
|
2839
|
+
},
|
|
2840
|
+
"required": [
|
|
2841
|
+
"code",
|
|
2842
|
+
"message"
|
|
2843
|
+
]
|
|
2844
|
+
}
|
|
2845
|
+
},
|
|
2846
|
+
"required": [
|
|
2847
|
+
"error"
|
|
2848
|
+
]
|
|
2849
|
+
}
|
|
2850
|
+
}
|
|
2851
|
+
}
|
|
2852
|
+
},
|
|
2853
|
+
"429": {
|
|
2854
|
+
"description": "The namespace's daily embedding budget is exhausted (EMBEDDING_BUDGET_EXCEEDED), before or during the run. The world is not marked ready and a windowed pass keeps its cursor.",
|
|
2855
|
+
"content": {
|
|
2856
|
+
"application/json": {
|
|
2857
|
+
"schema": {
|
|
2858
|
+
"type": "object",
|
|
2859
|
+
"properties": {
|
|
2860
|
+
"error": {
|
|
2861
|
+
"type": "object",
|
|
2862
|
+
"properties": {
|
|
2863
|
+
"code": {
|
|
2864
|
+
"type": "string"
|
|
2865
|
+
},
|
|
2866
|
+
"message": {
|
|
2867
|
+
"type": "string"
|
|
2868
|
+
}
|
|
2869
|
+
},
|
|
2870
|
+
"required": [
|
|
2871
|
+
"code",
|
|
2872
|
+
"message"
|
|
2873
|
+
]
|
|
2874
|
+
}
|
|
2875
|
+
},
|
|
2876
|
+
"required": [
|
|
2877
|
+
"error"
|
|
2878
|
+
]
|
|
2879
|
+
}
|
|
2880
|
+
}
|
|
2881
|
+
}
|
|
2882
|
+
},
|
|
2883
|
+
"500": {
|
|
2884
|
+
"description": "Reindex failed",
|
|
2885
|
+
"content": {
|
|
2886
|
+
"application/json": {
|
|
2887
|
+
"schema": {
|
|
2888
|
+
"type": "object",
|
|
2889
|
+
"properties": {
|
|
2890
|
+
"error": {
|
|
2891
|
+
"type": "object",
|
|
2892
|
+
"properties": {
|
|
2893
|
+
"code": {
|
|
2894
|
+
"type": "string"
|
|
2895
|
+
},
|
|
2896
|
+
"message": {
|
|
2897
|
+
"type": "string"
|
|
2898
|
+
}
|
|
2899
|
+
},
|
|
2900
|
+
"required": [
|
|
2901
|
+
"code",
|
|
2902
|
+
"message"
|
|
2903
|
+
]
|
|
2904
|
+
}
|
|
2905
|
+
},
|
|
2906
|
+
"required": [
|
|
2907
|
+
"error"
|
|
2908
|
+
]
|
|
2909
|
+
}
|
|
2910
|
+
}
|
|
2911
|
+
}
|
|
2912
|
+
},
|
|
2913
|
+
"502": {
|
|
2914
|
+
"description": "The embedding service failed or returned vectors of the wrong length (EMBEDDING_FAILED; reason says which class). The world is never marked ready and a windowed pass keeps its cursor: call again to retry the same window. If the namespace budget runs out mid-request the response is 429 EMBEDDING_BUDGET_EXCEEDED instead.",
|
|
2915
|
+
"content": {
|
|
2916
|
+
"application/json": {
|
|
2917
|
+
"schema": {
|
|
2918
|
+
"$ref": "#/components/schemas/EmbeddingFailureResponse"
|
|
2919
|
+
}
|
|
2920
|
+
}
|
|
2921
|
+
}
|
|
2922
|
+
}
|
|
2923
|
+
}
|
|
2924
|
+
}
|
|
2925
|
+
},
|
|
2926
|
+
"/worlds/{worldId}/infer": {
|
|
2927
|
+
"post": {
|
|
2928
|
+
"tags": [
|
|
2929
|
+
"Worlds"
|
|
2930
|
+
],
|
|
2931
|
+
"operationId": "backfillWorldInference",
|
|
2932
|
+
"summary": "Back-fill inference for a world's existing data",
|
|
2933
|
+
"description": "Materializes OWL 2 RL inference for data a world already holds. Enabling inference on a world only reacts to later writes; call this once afterwards to cover what is stored. It reads the world's asserted quads, runs the reasoner once, clears the world's inferred quads and writes the closure. Asserted quads are never changed. It is idempotent and safe to repeat; a failure part way leaves some inferred quads, so call it again. The world must have inference enabled. A world larger than its maxAssertedQuads limit is refused before any write (422 INFERENCE_SIZE_GUARD).",
|
|
2934
|
+
"x-mint": {
|
|
2935
|
+
"metadata": {
|
|
2936
|
+
"title": "Back-fill inference for a world's existing data"
|
|
2937
|
+
}
|
|
2938
|
+
},
|
|
2939
|
+
"security": [
|
|
2940
|
+
{
|
|
2941
|
+
"bearerWorldsToken": []
|
|
2942
|
+
}
|
|
2943
|
+
],
|
|
2944
|
+
"parameters": [
|
|
2945
|
+
{
|
|
2946
|
+
"schema": {
|
|
2947
|
+
"type": "string",
|
|
2948
|
+
"pattern": "^w_[0-7][0-9a-hjkmnp-tv-z]{25}$",
|
|
2949
|
+
"description": "The world-api-minted world ID, a w_ prefix and a lowercase ULID."
|
|
2950
|
+
},
|
|
2951
|
+
"required": true,
|
|
2952
|
+
"description": "The world-api-minted world ID, a w_ prefix and a lowercase ULID.",
|
|
2953
|
+
"name": "worldId",
|
|
2954
|
+
"in": "path"
|
|
2955
|
+
}
|
|
2956
|
+
],
|
|
2957
|
+
"responses": {
|
|
2958
|
+
"200": {
|
|
2959
|
+
"description": "The back-fill ran.",
|
|
2960
|
+
"content": {
|
|
2961
|
+
"application/json": {
|
|
2962
|
+
"schema": {
|
|
2963
|
+
"type": "object",
|
|
2964
|
+
"properties": {
|
|
2965
|
+
"ok": {
|
|
2966
|
+
"type": "boolean",
|
|
2967
|
+
"enum": [
|
|
2968
|
+
true
|
|
2969
|
+
]
|
|
2970
|
+
},
|
|
2971
|
+
"assertedQuads": {
|
|
2972
|
+
"type": "integer",
|
|
2973
|
+
"minimum": 0,
|
|
2974
|
+
"description": "Asserted quads the reasoner read."
|
|
2975
|
+
},
|
|
2976
|
+
"derivedWritten": {
|
|
2977
|
+
"type": "integer",
|
|
2978
|
+
"minimum": 0,
|
|
2979
|
+
"description": "Inferred quads stored after the back-fill."
|
|
2980
|
+
},
|
|
2981
|
+
"derivedRemoved": {
|
|
2982
|
+
"type": "integer",
|
|
2983
|
+
"minimum": 0,
|
|
2984
|
+
"description": "Inferred quads cleared before writing the closure."
|
|
2985
|
+
},
|
|
2986
|
+
"inconsistencyCount": {
|
|
2987
|
+
"type": "integer",
|
|
2988
|
+
"minimum": 0,
|
|
2989
|
+
"description": "OWL 2 RL consistency rules the data violates. They do not block the back-fill."
|
|
2990
|
+
}
|
|
2991
|
+
},
|
|
2992
|
+
"required": [
|
|
2993
|
+
"ok",
|
|
2994
|
+
"assertedQuads",
|
|
2995
|
+
"derivedWritten",
|
|
2996
|
+
"derivedRemoved",
|
|
2997
|
+
"inconsistencyCount"
|
|
2998
|
+
]
|
|
2999
|
+
}
|
|
3000
|
+
}
|
|
3001
|
+
}
|
|
3002
|
+
},
|
|
3003
|
+
"404": {
|
|
3004
|
+
"description": "World database not found",
|
|
3005
|
+
"content": {
|
|
3006
|
+
"application/json": {
|
|
3007
|
+
"schema": {
|
|
3008
|
+
"$ref": "#/components/schemas/ErrorResponse"
|
|
3009
|
+
}
|
|
3010
|
+
}
|
|
3011
|
+
}
|
|
3012
|
+
},
|
|
3013
|
+
"409": {
|
|
3014
|
+
"description": "Inference is not enabled for this world (INFERENCE_NOT_ENABLED), or the database is missing the quads.derived column (INFERENCE_UNAVAILABLE).",
|
|
3015
|
+
"content": {
|
|
3016
|
+
"application/json": {
|
|
3017
|
+
"schema": {
|
|
3018
|
+
"$ref": "#/components/schemas/ErrorResponse"
|
|
3019
|
+
}
|
|
3020
|
+
}
|
|
3021
|
+
}
|
|
3022
|
+
},
|
|
3023
|
+
"422": {
|
|
3024
|
+
"description": "The world has more asserted quads than its maxAssertedQuads limit (INFERENCE_SIZE_GUARD). Nothing was written.",
|
|
3025
|
+
"content": {
|
|
3026
|
+
"application/json": {
|
|
3027
|
+
"schema": {
|
|
3028
|
+
"$ref": "#/components/schemas/ErrorResponse"
|
|
3029
|
+
}
|
|
3030
|
+
}
|
|
3031
|
+
}
|
|
3032
|
+
},
|
|
3033
|
+
"429": {
|
|
3034
|
+
"description": "The namespace has used its daily database write budget (WRITE_BUDGET_EXCEEDED). Nothing was written; it resets at 00:00 UTC.",
|
|
3035
|
+
"content": {
|
|
3036
|
+
"application/json": {
|
|
3037
|
+
"schema": {
|
|
3038
|
+
"$ref": "#/components/schemas/ErrorResponse"
|
|
3039
|
+
}
|
|
3040
|
+
}
|
|
3041
|
+
}
|
|
3042
|
+
},
|
|
3043
|
+
"500": {
|
|
3044
|
+
"description": "The back-fill failed",
|
|
3045
|
+
"content": {
|
|
3046
|
+
"application/json": {
|
|
3047
|
+
"schema": {
|
|
3048
|
+
"$ref": "#/components/schemas/ErrorResponse"
|
|
3049
|
+
}
|
|
3050
|
+
}
|
|
3051
|
+
}
|
|
3052
|
+
}
|
|
3053
|
+
}
|
|
3054
|
+
}
|
|
3055
|
+
},
|
|
3056
|
+
"/worlds/{worldId}/provenance": {
|
|
3057
|
+
"post": {
|
|
3058
|
+
"tags": [
|
|
3059
|
+
"Provenance"
|
|
3060
|
+
],
|
|
3061
|
+
"operationId": "queryWorldProvenance",
|
|
3062
|
+
"summary": "Read provenance",
|
|
3063
|
+
"description": "Returns when a subject's facts were written, by which API key, from what source, and which fact each one replaced. One row per event, newest first within a fact, so the first row of a fact is normally the write that made it current. If it is a remove, the fact was written again while provenance was off, or is now inferred. A fact with many events can fill the limit by itself; narrow by predicate to reach the others. Only facts the world holds now are returned, and earlier values are not kept: replacesFactId identifies the replaced fact but not what it said. Facts written before provenance was turned on, and inferred facts, come back without type, time or writer.",
|
|
3064
|
+
"x-mint": {
|
|
3065
|
+
"metadata": {
|
|
3066
|
+
"title": "Read provenance"
|
|
3067
|
+
}
|
|
3068
|
+
},
|
|
3069
|
+
"security": [
|
|
3070
|
+
{
|
|
3071
|
+
"bearerWorldsToken": []
|
|
3072
|
+
}
|
|
3073
|
+
],
|
|
3074
|
+
"parameters": [
|
|
3075
|
+
{
|
|
3076
|
+
"schema": {
|
|
3077
|
+
"type": "string",
|
|
3078
|
+
"pattern": "^w_[0-7][0-9a-hjkmnp-tv-z]{25}$",
|
|
3079
|
+
"description": "The world-api-minted world ID, a w_ prefix and a lowercase ULID."
|
|
3080
|
+
},
|
|
3081
|
+
"required": true,
|
|
3082
|
+
"description": "The world-api-minted world ID, a w_ prefix and a lowercase ULID.",
|
|
3083
|
+
"name": "worldId",
|
|
3084
|
+
"in": "path"
|
|
3085
|
+
}
|
|
3086
|
+
],
|
|
3087
|
+
"requestBody": {
|
|
3088
|
+
"required": true,
|
|
3089
|
+
"content": {
|
|
3090
|
+
"application/json": {
|
|
3091
|
+
"schema": {
|
|
3092
|
+
"$ref": "#/components/schemas/ProvenanceRequest"
|
|
3093
|
+
}
|
|
3094
|
+
}
|
|
3095
|
+
}
|
|
3096
|
+
},
|
|
3097
|
+
"responses": {
|
|
3098
|
+
"200": {
|
|
3099
|
+
"description": "Provenance records",
|
|
3100
|
+
"content": {
|
|
3101
|
+
"application/json": {
|
|
3102
|
+
"schema": {
|
|
3103
|
+
"$ref": "#/components/schemas/ProvenanceResponse"
|
|
3104
|
+
}
|
|
3105
|
+
}
|
|
3106
|
+
}
|
|
3107
|
+
},
|
|
3108
|
+
"400": {
|
|
3109
|
+
"description": "Bad request",
|
|
3110
|
+
"content": {
|
|
3111
|
+
"application/json": {
|
|
3112
|
+
"schema": {
|
|
3113
|
+
"$ref": "#/components/schemas/ErrorResponse"
|
|
3114
|
+
}
|
|
3115
|
+
}
|
|
3116
|
+
}
|
|
3117
|
+
},
|
|
3118
|
+
"404": {
|
|
3119
|
+
"description": "Not found",
|
|
3120
|
+
"content": {
|
|
3121
|
+
"application/json": {
|
|
3122
|
+
"schema": {
|
|
3123
|
+
"$ref": "#/components/schemas/ErrorResponse"
|
|
3124
|
+
}
|
|
3125
|
+
}
|
|
3126
|
+
}
|
|
3127
|
+
},
|
|
3128
|
+
"409": {
|
|
3129
|
+
"description": "Provenance is not turned on for this world (PROVENANCE_NOT_ENABLED).",
|
|
3130
|
+
"content": {
|
|
3131
|
+
"application/json": {
|
|
3132
|
+
"schema": {
|
|
3133
|
+
"$ref": "#/components/schemas/ErrorResponse"
|
|
3134
|
+
}
|
|
3135
|
+
}
|
|
3136
|
+
}
|
|
3137
|
+
}
|
|
3138
|
+
}
|
|
3139
|
+
}
|
|
3140
|
+
},
|
|
3141
|
+
"/admin/namespaces/{namespace}/write-budget": {
|
|
3142
|
+
"get": {
|
|
3143
|
+
"tags": [
|
|
3144
|
+
"Admin"
|
|
3145
|
+
],
|
|
3146
|
+
"operationId": "getNamespaceWriteBudget",
|
|
3147
|
+
"summary": "Get a namespace's daily write budget and today's usage",
|
|
3148
|
+
"description": "Admin-only. Returns the budget that applies to the namespace (its override, else the deployment default) and the D1 rows it has written today. The platform reads this to show usage against a plan.",
|
|
3149
|
+
"x-mint": {
|
|
3150
|
+
"metadata": {
|
|
3151
|
+
"title": "Get namespace write budget"
|
|
3152
|
+
}
|
|
3153
|
+
},
|
|
3154
|
+
"security": [
|
|
3155
|
+
{
|
|
3156
|
+
"bearerWorldsToken": []
|
|
3157
|
+
}
|
|
3158
|
+
],
|
|
3159
|
+
"parameters": [
|
|
3160
|
+
{
|
|
3161
|
+
"schema": {
|
|
3162
|
+
"type": "string",
|
|
3163
|
+
"minLength": 1,
|
|
3164
|
+
"maxLength": 256
|
|
3165
|
+
},
|
|
3166
|
+
"required": true,
|
|
3167
|
+
"name": "namespace",
|
|
3168
|
+
"in": "path"
|
|
3169
|
+
}
|
|
3170
|
+
],
|
|
3171
|
+
"responses": {
|
|
3172
|
+
"200": {
|
|
3173
|
+
"description": "The namespace's budget and usage",
|
|
3174
|
+
"content": {
|
|
3175
|
+
"application/json": {
|
|
3176
|
+
"schema": {
|
|
3177
|
+
"$ref": "#/components/schemas/NamespaceWriteBudget"
|
|
3178
|
+
}
|
|
3179
|
+
}
|
|
3180
|
+
}
|
|
3181
|
+
},
|
|
3182
|
+
"403": {
|
|
3183
|
+
"description": "Admin key required",
|
|
3184
|
+
"content": {
|
|
3185
|
+
"application/json": {
|
|
3186
|
+
"schema": {
|
|
3187
|
+
"$ref": "#/components/schemas/ErrorResponse"
|
|
3188
|
+
}
|
|
3189
|
+
}
|
|
3190
|
+
}
|
|
3191
|
+
}
|
|
3192
|
+
}
|
|
3193
|
+
},
|
|
3194
|
+
"put": {
|
|
3195
|
+
"tags": [
|
|
3196
|
+
"Admin"
|
|
3197
|
+
],
|
|
3198
|
+
"operationId": "setNamespaceWriteBudget",
|
|
3199
|
+
"summary": "Set a namespace's daily write budget",
|
|
3200
|
+
"description": "Admin-only. Sets how many D1 rows the namespace may write per UTC day, overriding the deployment default. Writes (SPARQL updates, import, inference back-fill) are refused with 429 WRITE_BUDGET_EXCEEDED once the namespace has used it; reads are never refused. Used by the platform to apply a customer's plan. Takes effect within about 30 seconds across the fleet.",
|
|
3201
|
+
"x-mint": {
|
|
3202
|
+
"metadata": {
|
|
3203
|
+
"title": "Set namespace write budget"
|
|
3204
|
+
}
|
|
3205
|
+
},
|
|
3206
|
+
"security": [
|
|
3207
|
+
{
|
|
3208
|
+
"bearerWorldsToken": []
|
|
3209
|
+
}
|
|
3210
|
+
],
|
|
3211
|
+
"parameters": [
|
|
3212
|
+
{
|
|
3213
|
+
"schema": {
|
|
3214
|
+
"type": "string",
|
|
3215
|
+
"minLength": 1,
|
|
3216
|
+
"maxLength": 256
|
|
3217
|
+
},
|
|
3218
|
+
"required": true,
|
|
3219
|
+
"name": "namespace",
|
|
3220
|
+
"in": "path"
|
|
3221
|
+
}
|
|
3222
|
+
],
|
|
3223
|
+
"requestBody": {
|
|
3224
|
+
"content": {
|
|
3225
|
+
"application/json": {
|
|
3226
|
+
"schema": {
|
|
3227
|
+
"$ref": "#/components/schemas/SetNamespaceWriteBudgetRequest"
|
|
3228
|
+
}
|
|
3229
|
+
}
|
|
3230
|
+
}
|
|
3231
|
+
},
|
|
3232
|
+
"responses": {
|
|
3233
|
+
"200": {
|
|
3234
|
+
"description": "The budget now in effect",
|
|
3235
|
+
"content": {
|
|
3236
|
+
"application/json": {
|
|
3237
|
+
"schema": {
|
|
3238
|
+
"$ref": "#/components/schemas/NamespaceWriteBudget"
|
|
3239
|
+
}
|
|
3240
|
+
}
|
|
3241
|
+
}
|
|
3242
|
+
},
|
|
3243
|
+
"403": {
|
|
3244
|
+
"description": "Admin key required",
|
|
3245
|
+
"content": {
|
|
3246
|
+
"application/json": {
|
|
3247
|
+
"schema": {
|
|
3248
|
+
"$ref": "#/components/schemas/ErrorResponse"
|
|
3249
|
+
}
|
|
3250
|
+
}
|
|
3251
|
+
}
|
|
3252
|
+
}
|
|
3253
|
+
}
|
|
3254
|
+
},
|
|
3255
|
+
"delete": {
|
|
3256
|
+
"tags": [
|
|
3257
|
+
"Admin"
|
|
3258
|
+
],
|
|
3259
|
+
"operationId": "clearNamespaceWriteBudget",
|
|
3260
|
+
"summary": "Clear a namespace's daily write budget override",
|
|
3261
|
+
"description": "Admin-only. Removes the namespace's override so it uses the deployment default again. Idempotent.",
|
|
3262
|
+
"x-mint": {
|
|
3263
|
+
"metadata": {
|
|
3264
|
+
"title": "Clear namespace write budget"
|
|
3265
|
+
}
|
|
3266
|
+
},
|
|
3267
|
+
"security": [
|
|
3268
|
+
{
|
|
3269
|
+
"bearerWorldsToken": []
|
|
3270
|
+
}
|
|
3271
|
+
],
|
|
3272
|
+
"parameters": [
|
|
3273
|
+
{
|
|
3274
|
+
"schema": {
|
|
3275
|
+
"type": "string",
|
|
3276
|
+
"minLength": 1,
|
|
3277
|
+
"maxLength": 256
|
|
3278
|
+
},
|
|
3279
|
+
"required": true,
|
|
3280
|
+
"name": "namespace",
|
|
3281
|
+
"in": "path"
|
|
3282
|
+
}
|
|
3283
|
+
],
|
|
3284
|
+
"responses": {
|
|
3285
|
+
"200": {
|
|
3286
|
+
"description": "The budget now in effect",
|
|
3287
|
+
"content": {
|
|
3288
|
+
"application/json": {
|
|
3289
|
+
"schema": {
|
|
3290
|
+
"$ref": "#/components/schemas/NamespaceWriteBudget"
|
|
3291
|
+
}
|
|
3292
|
+
}
|
|
3293
|
+
}
|
|
3294
|
+
},
|
|
3295
|
+
"403": {
|
|
3296
|
+
"description": "Admin key required",
|
|
3297
|
+
"content": {
|
|
3298
|
+
"application/json": {
|
|
3299
|
+
"schema": {
|
|
3300
|
+
"$ref": "#/components/schemas/ErrorResponse"
|
|
3301
|
+
}
|
|
3302
|
+
}
|
|
3303
|
+
}
|
|
3304
|
+
}
|
|
3305
|
+
}
|
|
3306
|
+
}
|
|
3307
|
+
},
|
|
3308
|
+
"/namespaces/{namespace}/embedding-providers": {
|
|
3309
|
+
"get": {
|
|
3310
|
+
"tags": [
|
|
3311
|
+
"Embeddings"
|
|
3312
|
+
],
|
|
3313
|
+
"operationId": "listEmbeddingProviders",
|
|
3314
|
+
"summary": "List embedding providers",
|
|
3315
|
+
"description": "Lists the namespace's embedding provider credentials, newest first, revoked ones included so their status stays readable. Metadata only: no key is ever returned. Requires the embeddings:admin scope.",
|
|
3316
|
+
"x-mint": {
|
|
3317
|
+
"metadata": {
|
|
3318
|
+
"title": "List embedding providers"
|
|
3319
|
+
}
|
|
3320
|
+
},
|
|
3321
|
+
"security": [
|
|
3322
|
+
{
|
|
3323
|
+
"bearerWorldsToken": []
|
|
3324
|
+
}
|
|
3325
|
+
],
|
|
3326
|
+
"parameters": [
|
|
3327
|
+
{
|
|
3328
|
+
"schema": {
|
|
3329
|
+
"type": "string"
|
|
3330
|
+
},
|
|
3331
|
+
"required": true,
|
|
3332
|
+
"name": "namespace",
|
|
3333
|
+
"in": "path"
|
|
3334
|
+
}
|
|
3335
|
+
],
|
|
3336
|
+
"responses": {
|
|
3337
|
+
"200": {
|
|
3338
|
+
"description": "Credential metadata, one entry per provider",
|
|
3339
|
+
"content": {
|
|
3340
|
+
"application/json": {
|
|
3341
|
+
"schema": {
|
|
3342
|
+
"$ref": "#/components/schemas/EmbeddingProviderList"
|
|
3343
|
+
}
|
|
3344
|
+
}
|
|
3345
|
+
}
|
|
3346
|
+
},
|
|
3347
|
+
"401": {
|
|
3348
|
+
"description": "Unauthorized",
|
|
3349
|
+
"content": {
|
|
3350
|
+
"application/json": {
|
|
3351
|
+
"schema": {
|
|
3352
|
+
"$ref": "#/components/schemas/ErrorResponse"
|
|
3353
|
+
}
|
|
3354
|
+
}
|
|
3355
|
+
}
|
|
3356
|
+
},
|
|
3357
|
+
"403": {
|
|
3358
|
+
"description": "Forbidden",
|
|
3359
|
+
"content": {
|
|
3360
|
+
"application/json": {
|
|
3361
|
+
"schema": {
|
|
3362
|
+
"$ref": "#/components/schemas/ErrorResponse"
|
|
3363
|
+
}
|
|
3364
|
+
}
|
|
3365
|
+
}
|
|
3366
|
+
}
|
|
3367
|
+
}
|
|
3368
|
+
}
|
|
3369
|
+
},
|
|
3370
|
+
"/namespaces/{namespace}/embedding-providers/{provider}": {
|
|
3371
|
+
"put": {
|
|
3372
|
+
"tags": [
|
|
3373
|
+
"Embeddings"
|
|
3374
|
+
],
|
|
3375
|
+
"operationId": "setEmbeddingProviderCredential",
|
|
3376
|
+
"summary": "Set embedding provider credential",
|
|
3377
|
+
"description": "Store or rotate the namespace's API key for one embedding provider (bring your own key). The key is encrypted at rest with a key held only as a Worker secret and is write-only: it is never returned or logged. Requires the embeddings:admin scope (or an admin key); world-scoped tokens are refused. Returns 503 EMBEDDINGS_NOT_CONFIGURED when the deployment has no key-encryption key.",
|
|
3378
|
+
"x-mint": {
|
|
3379
|
+
"metadata": {
|
|
3380
|
+
"title": "Set embedding provider credential"
|
|
3381
|
+
}
|
|
3382
|
+
},
|
|
3383
|
+
"security": [
|
|
3384
|
+
{
|
|
3385
|
+
"bearerWorldsToken": []
|
|
3386
|
+
}
|
|
3387
|
+
],
|
|
3388
|
+
"parameters": [
|
|
3389
|
+
{
|
|
3390
|
+
"schema": {
|
|
3391
|
+
"type": "string"
|
|
3392
|
+
},
|
|
3393
|
+
"required": true,
|
|
3394
|
+
"name": "namespace",
|
|
3395
|
+
"in": "path"
|
|
3396
|
+
},
|
|
3397
|
+
{
|
|
3398
|
+
"schema": {
|
|
3399
|
+
"type": "string",
|
|
3400
|
+
"enum": [
|
|
3401
|
+
"openai",
|
|
3402
|
+
"openrouter"
|
|
3403
|
+
],
|
|
3404
|
+
"description": "Embedding provider whose credential this addresses. A namespace holds at most one credential per provider."
|
|
3405
|
+
},
|
|
3406
|
+
"required": true,
|
|
3407
|
+
"description": "Embedding provider whose credential this addresses. A namespace holds at most one credential per provider.",
|
|
3408
|
+
"name": "provider",
|
|
3409
|
+
"in": "path"
|
|
3410
|
+
}
|
|
3411
|
+
],
|
|
3412
|
+
"requestBody": {
|
|
3413
|
+
"required": true,
|
|
3414
|
+
"content": {
|
|
3415
|
+
"application/json": {
|
|
3416
|
+
"schema": {
|
|
3417
|
+
"$ref": "#/components/schemas/EmbeddingCredentialRequest"
|
|
3418
|
+
}
|
|
3419
|
+
}
|
|
3420
|
+
}
|
|
3421
|
+
},
|
|
3422
|
+
"responses": {
|
|
3423
|
+
"200": {
|
|
3424
|
+
"description": "Credential stored; metadata only",
|
|
3425
|
+
"content": {
|
|
3426
|
+
"application/json": {
|
|
3427
|
+
"schema": {
|
|
3428
|
+
"$ref": "#/components/schemas/EmbeddingCredential"
|
|
3429
|
+
}
|
|
3430
|
+
}
|
|
3431
|
+
}
|
|
3432
|
+
},
|
|
3433
|
+
"400": {
|
|
3434
|
+
"description": "Bad request",
|
|
3435
|
+
"content": {
|
|
3436
|
+
"application/json": {
|
|
3437
|
+
"schema": {
|
|
3438
|
+
"$ref": "#/components/schemas/ErrorResponse"
|
|
3439
|
+
}
|
|
3440
|
+
}
|
|
3441
|
+
}
|
|
3442
|
+
},
|
|
3443
|
+
"401": {
|
|
3444
|
+
"description": "Unauthorized",
|
|
3445
|
+
"content": {
|
|
3446
|
+
"application/json": {
|
|
3447
|
+
"schema": {
|
|
3448
|
+
"$ref": "#/components/schemas/ErrorResponse"
|
|
3449
|
+
}
|
|
3450
|
+
}
|
|
3451
|
+
}
|
|
3452
|
+
},
|
|
3453
|
+
"403": {
|
|
3454
|
+
"description": "Forbidden",
|
|
3455
|
+
"content": {
|
|
3456
|
+
"application/json": {
|
|
3457
|
+
"schema": {
|
|
3458
|
+
"$ref": "#/components/schemas/ErrorResponse"
|
|
3459
|
+
}
|
|
3460
|
+
}
|
|
3461
|
+
}
|
|
3462
|
+
},
|
|
3463
|
+
"503": {
|
|
3464
|
+
"description": "Embeddings are not configured on this deployment",
|
|
3465
|
+
"content": {
|
|
3466
|
+
"application/json": {
|
|
3467
|
+
"schema": {
|
|
3468
|
+
"$ref": "#/components/schemas/ErrorResponse"
|
|
3469
|
+
}
|
|
3470
|
+
}
|
|
3471
|
+
}
|
|
3472
|
+
}
|
|
3473
|
+
}
|
|
3474
|
+
},
|
|
3475
|
+
"get": {
|
|
3476
|
+
"tags": [
|
|
3477
|
+
"Embeddings"
|
|
3478
|
+
],
|
|
3479
|
+
"operationId": "getEmbeddingProviderCredential",
|
|
3480
|
+
"summary": "Get embedding provider credential status",
|
|
3481
|
+
"description": "Returns the metadata of the namespace's credential for one provider (status, fingerprint, last four characters, timestamps). The key itself is never returned. Requires the embeddings:admin scope.",
|
|
3482
|
+
"x-mint": {
|
|
3483
|
+
"metadata": {
|
|
3484
|
+
"title": "Get embedding provider credential status"
|
|
3485
|
+
}
|
|
3486
|
+
},
|
|
3487
|
+
"security": [
|
|
3488
|
+
{
|
|
3489
|
+
"bearerWorldsToken": []
|
|
3490
|
+
}
|
|
3491
|
+
],
|
|
3492
|
+
"parameters": [
|
|
3493
|
+
{
|
|
3494
|
+
"schema": {
|
|
3495
|
+
"type": "string"
|
|
3496
|
+
},
|
|
3497
|
+
"required": true,
|
|
3498
|
+
"name": "namespace",
|
|
3499
|
+
"in": "path"
|
|
3500
|
+
},
|
|
3501
|
+
{
|
|
3502
|
+
"schema": {
|
|
3503
|
+
"type": "string",
|
|
3504
|
+
"enum": [
|
|
3505
|
+
"openai",
|
|
3506
|
+
"openrouter"
|
|
3507
|
+
],
|
|
3508
|
+
"description": "Embedding provider whose credential this addresses. A namespace holds at most one credential per provider."
|
|
3509
|
+
},
|
|
3510
|
+
"required": true,
|
|
3511
|
+
"description": "Embedding provider whose credential this addresses. A namespace holds at most one credential per provider.",
|
|
3512
|
+
"name": "provider",
|
|
3513
|
+
"in": "path"
|
|
3514
|
+
}
|
|
3515
|
+
],
|
|
3516
|
+
"responses": {
|
|
3517
|
+
"200": {
|
|
3518
|
+
"description": "Credential metadata",
|
|
3519
|
+
"content": {
|
|
3520
|
+
"application/json": {
|
|
3521
|
+
"schema": {
|
|
3522
|
+
"$ref": "#/components/schemas/EmbeddingCredential"
|
|
3523
|
+
}
|
|
3524
|
+
}
|
|
3525
|
+
}
|
|
3526
|
+
},
|
|
3527
|
+
"400": {
|
|
3528
|
+
"description": "Bad request",
|
|
3529
|
+
"content": {
|
|
3530
|
+
"application/json": {
|
|
3531
|
+
"schema": {
|
|
3532
|
+
"$ref": "#/components/schemas/ErrorResponse"
|
|
3533
|
+
}
|
|
3534
|
+
}
|
|
3535
|
+
}
|
|
3536
|
+
},
|
|
3537
|
+
"401": {
|
|
3538
|
+
"description": "Unauthorized",
|
|
3539
|
+
"content": {
|
|
3540
|
+
"application/json": {
|
|
3541
|
+
"schema": {
|
|
3542
|
+
"$ref": "#/components/schemas/ErrorResponse"
|
|
3543
|
+
}
|
|
3544
|
+
}
|
|
3545
|
+
}
|
|
3546
|
+
},
|
|
3547
|
+
"403": {
|
|
3548
|
+
"description": "Forbidden",
|
|
3549
|
+
"content": {
|
|
3550
|
+
"application/json": {
|
|
3551
|
+
"schema": {
|
|
3552
|
+
"$ref": "#/components/schemas/ErrorResponse"
|
|
3553
|
+
}
|
|
3554
|
+
}
|
|
3555
|
+
}
|
|
3556
|
+
},
|
|
3557
|
+
"404": {
|
|
3558
|
+
"description": "No credential",
|
|
3559
|
+
"content": {
|
|
3560
|
+
"application/json": {
|
|
3561
|
+
"schema": {
|
|
3562
|
+
"$ref": "#/components/schemas/ErrorResponse"
|
|
3563
|
+
}
|
|
3564
|
+
}
|
|
3565
|
+
}
|
|
3566
|
+
}
|
|
3567
|
+
}
|
|
3568
|
+
},
|
|
3569
|
+
"delete": {
|
|
3570
|
+
"tags": [
|
|
3571
|
+
"Embeddings"
|
|
3572
|
+
],
|
|
3573
|
+
"operationId": "deleteEmbeddingProviderCredential",
|
|
3574
|
+
"summary": "Revoke embedding provider credential",
|
|
3575
|
+
"description": "Revokes the namespace's credential for one provider: the ciphertext is erased and worlds on that provider's models fall back to keyword-only search (embeddingStatus no_credential). Every world on that provider's models is marked stale (worlds on another provider's models are untouched), so after a new key is set search stays keyword-only until each world is reindexed (vectors built before the revoke are never trusted again). Requires the embeddings:admin scope.",
|
|
3576
|
+
"x-mint": {
|
|
3577
|
+
"metadata": {
|
|
3578
|
+
"title": "Revoke embedding provider credential"
|
|
3579
|
+
}
|
|
3580
|
+
},
|
|
3581
|
+
"security": [
|
|
3582
|
+
{
|
|
3583
|
+
"bearerWorldsToken": []
|
|
3584
|
+
}
|
|
3585
|
+
],
|
|
3586
|
+
"parameters": [
|
|
3587
|
+
{
|
|
3588
|
+
"schema": {
|
|
3589
|
+
"type": "string"
|
|
3590
|
+
},
|
|
3591
|
+
"required": true,
|
|
3592
|
+
"name": "namespace",
|
|
3593
|
+
"in": "path"
|
|
3594
|
+
},
|
|
3595
|
+
{
|
|
3596
|
+
"schema": {
|
|
3597
|
+
"type": "string",
|
|
3598
|
+
"enum": [
|
|
3599
|
+
"openai",
|
|
3600
|
+
"openrouter"
|
|
3601
|
+
],
|
|
3602
|
+
"description": "Embedding provider whose credential this addresses. A namespace holds at most one credential per provider."
|
|
3603
|
+
},
|
|
3604
|
+
"required": true,
|
|
3605
|
+
"description": "Embedding provider whose credential this addresses. A namespace holds at most one credential per provider.",
|
|
3606
|
+
"name": "provider",
|
|
3607
|
+
"in": "path"
|
|
3608
|
+
}
|
|
3609
|
+
],
|
|
3610
|
+
"responses": {
|
|
3611
|
+
"204": {
|
|
3612
|
+
"description": "Revoked"
|
|
3613
|
+
},
|
|
3614
|
+
"400": {
|
|
3615
|
+
"description": "Bad request",
|
|
3616
|
+
"content": {
|
|
3617
|
+
"application/json": {
|
|
3618
|
+
"schema": {
|
|
3619
|
+
"$ref": "#/components/schemas/ErrorResponse"
|
|
3620
|
+
}
|
|
3621
|
+
}
|
|
3622
|
+
}
|
|
3623
|
+
},
|
|
3624
|
+
"401": {
|
|
3625
|
+
"description": "Unauthorized",
|
|
3626
|
+
"content": {
|
|
3627
|
+
"application/json": {
|
|
3628
|
+
"schema": {
|
|
3629
|
+
"$ref": "#/components/schemas/ErrorResponse"
|
|
3630
|
+
}
|
|
3631
|
+
}
|
|
3632
|
+
}
|
|
3633
|
+
},
|
|
3634
|
+
"403": {
|
|
3635
|
+
"description": "Forbidden",
|
|
3636
|
+
"content": {
|
|
3637
|
+
"application/json": {
|
|
3638
|
+
"schema": {
|
|
3639
|
+
"$ref": "#/components/schemas/ErrorResponse"
|
|
3640
|
+
}
|
|
3641
|
+
}
|
|
3642
|
+
}
|
|
3643
|
+
},
|
|
3644
|
+
"404": {
|
|
3645
|
+
"description": "No credential",
|
|
3646
|
+
"content": {
|
|
3647
|
+
"application/json": {
|
|
3648
|
+
"schema": {
|
|
3649
|
+
"$ref": "#/components/schemas/ErrorResponse"
|
|
3650
|
+
}
|
|
3651
|
+
}
|
|
3652
|
+
}
|
|
3653
|
+
}
|
|
3654
|
+
}
|
|
3655
|
+
}
|
|
3656
|
+
}
|
|
3657
|
+
}
|
|
3658
|
+
}
|