@x12i/memorix-client-api 0.18.0 → 0.19.0

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.
Files changed (108) hide show
  1. package/HANDOVER.md +13 -2
  2. package/dist/agent-directory.d.ts +25 -0
  3. package/dist/agent-directory.d.ts.map +1 -0
  4. package/dist/agent-directory.js +75 -0
  5. package/dist/agent-directory.js.map +1 -0
  6. package/dist/app.d.ts +31 -6
  7. package/dist/app.d.ts.map +1 -1
  8. package/dist/app.js +220 -33
  9. package/dist/app.js.map +1 -1
  10. package/dist/authix.d.ts +28 -2
  11. package/dist/authix.d.ts.map +1 -1
  12. package/dist/authix.js +55 -4
  13. package/dist/authix.js.map +1 -1
  14. package/dist/catalog.d.ts +33 -1
  15. package/dist/catalog.d.ts.map +1 -1
  16. package/dist/catalog.js +83 -4
  17. package/dist/catalog.js.map +1 -1
  18. package/dist/cli.js +11 -1
  19. package/dist/cli.js.map +1 -1
  20. package/dist/config.d.ts +9 -0
  21. package/dist/config.d.ts.map +1 -1
  22. package/dist/config.js +31 -0
  23. package/dist/config.js.map +1 -1
  24. package/dist/errors.d.ts +16 -2
  25. package/dist/errors.d.ts.map +1 -1
  26. package/dist/errors.js +16 -2
  27. package/dist/errors.js.map +1 -1
  28. package/dist/fetch.d.ts.map +1 -1
  29. package/dist/fetch.js +27 -3
  30. package/dist/fetch.js.map +1 -1
  31. package/dist/peers.d.ts +2 -2
  32. package/dist/peers.d.ts.map +1 -1
  33. package/dist/peers.js +4 -4
  34. package/dist/peers.js.map +1 -1
  35. package/dist/refs.d.ts +7 -1
  36. package/dist/refs.d.ts.map +1 -1
  37. package/dist/refs.js +36 -26
  38. package/dist/refs.js.map +1 -1
  39. package/dist/scope.d.ts +25 -2
  40. package/dist/scope.d.ts.map +1 -1
  41. package/dist/scope.js +71 -4
  42. package/dist/scope.js.map +1 -1
  43. package/dist/scoper-embedded.d.ts +29 -0
  44. package/dist/scoper-embedded.d.ts.map +1 -0
  45. package/dist/scoper-embedded.js +239 -0
  46. package/dist/scoper-embedded.js.map +1 -0
  47. package/dist/scoper.d.ts +19 -27
  48. package/dist/scoper.d.ts.map +1 -1
  49. package/dist/scoper.js +51 -254
  50. package/dist/scoper.js.map +1 -1
  51. package/dist/upstream.d.ts +6 -1
  52. package/dist/upstream.d.ts.map +1 -1
  53. package/dist/upstream.js +22 -4
  54. package/dist/upstream.js.map +1 -1
  55. package/dist/v1/census.d.ts +59 -0
  56. package/dist/v1/census.d.ts.map +1 -0
  57. package/dist/v1/census.js +146 -0
  58. package/dist/v1/census.js.map +1 -0
  59. package/dist/v1/content.d.ts +48 -0
  60. package/dist/v1/content.d.ts.map +1 -0
  61. package/dist/v1/content.js +292 -0
  62. package/dist/v1/content.js.map +1 -0
  63. package/dist/v1/context.d.ts +50 -0
  64. package/dist/v1/context.d.ts.map +1 -0
  65. package/dist/v1/context.js +4 -0
  66. package/dist/v1/context.js.map +1 -0
  67. package/dist/v1/discovery.d.ts +24 -0
  68. package/dist/v1/discovery.d.ts.map +1 -0
  69. package/dist/v1/discovery.js +163 -0
  70. package/dist/v1/discovery.js.map +1 -0
  71. package/dist/v1/gaps.d.ts +18 -0
  72. package/dist/v1/gaps.d.ts.map +1 -0
  73. package/dist/v1/gaps.js +2 -0
  74. package/dist/v1/gaps.js.map +1 -0
  75. package/dist/v1/http.d.ts +18 -0
  76. package/dist/v1/http.d.ts.map +1 -0
  77. package/dist/v1/http.js +105 -0
  78. package/dist/v1/http.js.map +1 -0
  79. package/dist/v1/mapping.d.ts +155 -0
  80. package/dist/v1/mapping.d.ts.map +1 -0
  81. package/dist/v1/mapping.js +380 -0
  82. package/dist/v1/mapping.js.map +1 -0
  83. package/dist/v1/planning-store.d.ts +74 -0
  84. package/dist/v1/planning-store.d.ts.map +1 -0
  85. package/dist/v1/planning-store.js +192 -0
  86. package/dist/v1/planning-store.js.map +1 -0
  87. package/dist/v1/planning.d.ts +5 -0
  88. package/dist/v1/planning.d.ts.map +1 -0
  89. package/dist/v1/planning.js +297 -0
  90. package/dist/v1/planning.js.map +1 -0
  91. package/dist/v1/records.d.ts +18 -0
  92. package/dist/v1/records.d.ts.map +1 -0
  93. package/dist/v1/records.js +42 -0
  94. package/dist/v1/records.js.map +1 -0
  95. package/dist/v1/relationships.d.ts +72 -0
  96. package/dist/v1/relationships.d.ts.map +1 -0
  97. package/dist/v1/relationships.js +436 -0
  98. package/dist/v1/relationships.js.map +1 -0
  99. package/dist/v1/routes.d.ts +5 -0
  100. package/dist/v1/routes.d.ts.map +1 -0
  101. package/dist/v1/routes.js +16 -0
  102. package/dist/v1/routes.js.map +1 -0
  103. package/dist/v1/sources.d.ts +62 -0
  104. package/dist/v1/sources.d.ts.map +1 -0
  105. package/dist/v1/sources.js +218 -0
  106. package/dist/v1/sources.js.map +1 -0
  107. package/openapi/openapi.json +3587 -480
  108. package/package.json +74 -74
@@ -1,480 +1,3587 @@
1
- {
2
- "openapi": "3.0.3",
3
- "info": {
4
- "title": "Memorix client API",
5
- "version": "0.18.0",
6
- "description": "Read API for smart clients. Agents come from x-memorix-agent-ids. The org comes from x-memorix-org-id, or from an Authix bearer token when MEMORIX_AUTH=authix. x-memorix-caller names the calling app. Descriptors are the effective object-type fields for those agents. GET /api/v1/memorix/{path} forwards Memorix read routes. Agent functions are under /api/v1/agent-functions. Nexum subjects and canvas are under /api/v1/nexum. Scoper 3.0.0 is hosted at /api/v1/scoper. MCP is /api/v1/mcp/nexum, /api/v1/mcp/scoper, and /api/v1/mcp/mgc. Aligned with memorix-service 3.17.0 and memorix-skills 0.6.1."
7
- },
8
- "paths": {
9
- "/health": {
10
- "get": {
11
- "operationId": "health",
12
- "summary": "Liveness",
13
- "responses": { "200": { "description": "Process is up" } }
14
- }
15
- },
16
- "/api/v1/catalog": {
17
- "get": {
18
- "operationId": "catalog",
19
- "summary": "Object types, content types, and field descriptors for the agent ids",
20
- "description": "Each content type has derived true or false. derived true is a processing result stored on the subject. Source content is false. Metadata derived on the content type wins; otherwise the platform result types are used. A field may include mixed and shapes. shapes name a grammar and resolvesTo (objectType, contentTypes, recordId). recordId is value, paired-<sourceProperty>, or a template containing {value}. When every value shape names one object type, refersTo is that object type. A content type may also carry presentation (label, order, tab always|whenPresent|hidden, values[] with value, label, order, origin) and origin (producer model|code|mixed, use always|conditional, record). Both are optional, display metadata only, and absent when the pack has not stamped them. An object type may include functions (id, question, page, composes, pageStory, reads, optional template and kind spine|threads). template is the story template id, the same string as data.template and as presentation.values[].value on content type story. A malformed function is dropped.",
21
- "parameters": [{ "$ref": "#/components/parameters/ScopeHeaders" }],
22
- "responses": { "200": { "description": "Catalog" } }
23
- }
24
- },
25
- "/api/v1/object-types/{objectType}": {
26
- "get": {
27
- "operationId": "objectType",
28
- "summary": "One object type and its content-type descriptors",
29
- "parameters": [
30
- { "$ref": "#/components/parameters/ScopeHeaders" },
31
- { "$ref": "#/components/parameters/ObjectType" }
32
- ],
33
- "responses": { "200": { "description": "Object type" }, "404": { "description": "Unknown object type" } }
34
- }
35
- },
36
- "/api/v1/object-types/{objectType}/content-types": {
37
- "get": {
38
- "operationId": "contentTypes",
39
- "summary": "Content types allowed on an object type, with descriptors and the leading content type",
40
- "parameters": [
41
- { "$ref": "#/components/parameters/ScopeHeaders" },
42
- { "$ref": "#/components/parameters/ObjectType" }
43
- ],
44
- "responses": { "200": { "description": "Content types" } }
45
- }
46
- },
47
- "/api/v1/object-types/{objectType}/content-types/{contentType}": {
48
- "get": {
49
- "operationId": "contentType",
50
- "summary": "Descriptors for one content type",
51
- "parameters": [
52
- { "$ref": "#/components/parameters/ScopeHeaders" },
53
- { "$ref": "#/components/parameters/ObjectType" },
54
- { "$ref": "#/components/parameters/ContentType" }
55
- ],
56
- "responses": { "200": { "description": "Content type" }, "404": { "description": "Unknown content type" } }
57
- }
58
- },
59
- "/api/v1/object-types/{objectType}/records": {
60
- "get": {
61
- "operationId": "listRecords",
62
- "summary": "Paginated subjects, driven by a leading content type",
63
- "description": "Filter, sort, and cursor apply to the leading content type. Sibling content types are attached on each row. leadingContentType defaults to the content type marked leading in metadata, or the first content type that is not relationships. contentTypes defaults to every content type on the object type except relationships. representation is json, markdown, or both (default both). pageInfo.nextCursor is the Memorix cursor. Fields with refersTo are record ids; json and rendered markdown replace them with the records they point at.",
64
- "parameters": [
65
- { "$ref": "#/components/parameters/ScopeHeaders" },
66
- { "$ref": "#/components/parameters/ObjectType" },
67
- { "name": "leadingContentType", "in": "query", "schema": { "type": "string" } },
68
- { "name": "contentTypes", "in": "query", "schema": { "type": "string" }, "description": "Comma-separated content type ids" },
69
- { "name": "representation", "in": "query", "schema": { "type": "string", "enum": ["json", "markdown", "both"] } },
70
- { "name": "filter", "in": "query", "schema": { "type": "string" }, "description": "JSON SafeFilter" },
71
- { "name": "sort", "in": "query", "schema": { "type": "string" }, "description": "JSON sort" },
72
- { "name": "limit", "in": "query", "schema": { "type": "integer", "minimum": 1, "maximum": 200, "default": 50 } },
73
- { "name": "cursor", "in": "query", "schema": { "type": "string" } }
74
- ],
75
- "responses": { "200": { "description": "Page of subjects" } }
76
- }
77
- },
78
- "/api/v1/records/{recordId}": {
79
- "get": {
80
- "operationId": "getRecord",
81
- "summary": "One subject with all stored content types, or a named subset",
82
- "description": "recordId may contain slashes; send them as extra path segments. Omit contentTypes to load every content type registered on the subject. representation is json, markdown, or both (default both). Each instance includes descriptor.fields, descriptorCoverage (complete, partial, none), and undeclaredPaths. Markdown stored with source ai or content is returned as stored. Otherwise it is rendered from .data with source rendered. Fields with refersTo are record ids; json and rendered markdown replace them with { recordId, objectType, contentType, data }. A data.<key> field is expanded at every key of that name. Unmatched ids stay strings. Prose is not parsed back into fields.",
83
- "parameters": [
84
- { "$ref": "#/components/parameters/ScopeHeaders" },
85
- { "name": "recordId", "in": "path", "required": true, "schema": { "type": "string" } },
86
- { "name": "contentTypes", "in": "query", "schema": { "type": "string" } },
87
- { "name": "representation", "in": "query", "schema": { "type": "string", "enum": ["json", "markdown", "both"] } },
88
- { "name": "objectType", "in": "query", "schema": { "type": "string" }, "description": "When set, must match the directory" }
89
- ],
90
- "responses": { "200": { "description": "Subject" }, "404": { "description": "Subject is not reserved" } }
91
- }
92
- },
93
- "/api/v1/processed-subjects": {
94
- "get": {
95
- "operationId": "processedSubjects",
96
- "summary": "Distinct subjects that have a derived content row on that same record",
97
- "description": "rule.id caller-or-preserved opens every catalog content type except relationships. A subject counts when a row on that record has datasource basis caller or preserved. Declared and backfill rows do not count. The process keeps the answer for the org and agent ids. checking stays true until every included collection is read with no nextCursor. A later read returns that answer. continue=true keeps those subjects and reads empty collections again. A new rule.id drops the kept answer. count is the number of distinct subjects, not the page size. pageInfo.nextCursor is omitted on the last page. A working/ record id is not a subject. An unregistered content type is skipped.",
98
- "parameters": [
99
- { "$ref": "#/components/parameters/ScopeHeaders" },
100
- { "name": "objectType", "in": "query", "schema": { "type": "string" }, "description": "Only subjects of this object type. Absent means every object type in the catalog." },
101
- { "name": "limit", "in": "query", "schema": { "type": "integer", "minimum": 1, "maximum": 200, "default": 50 } },
102
- { "name": "cursor", "in": "query", "schema": { "type": "string" } },
103
- { "name": "continue", "in": "query", "schema": { "type": "boolean" }, "description": "Keep the saved subjects and read collections again, including ones kept as empty." }
104
- ],
105
- "responses": {
106
- "200": { "description": "Kept subjects. saved is true once a pass has finished. checking is true while a pass is still reading." },
107
- "404": { "description": "Unknown object type" }
108
- }
109
- },
110
- "delete": {
111
- "operationId": "deleteProcessedSubjects",
112
- "summary": "Drop the kept processed-subject answer for this org and these agent ids",
113
- "parameters": [{ "$ref": "#/components/parameters/ScopeHeaders" }],
114
- "responses": { "200": { "description": "The kept answer is gone. The next GET reads again." } }
115
- }
116
- },
117
- "/api/v1/refs/resolve": {
118
- "post": {
119
- "operationId": "resolveRefs",
120
- "summary": "Resolve ref strings from the shapes declared on catalog fields",
121
- "description": "Body is { values: string[] }, at most 200. Each string is classified by the first shape grammar that matches the whole value. value loads that reserved record. paired-<sourceProperty> attaches to the sibling subject that publishes matchProperty, or looks up data.<matchProperty>. A template attaches to a subject in the batch that publishes sourceProperty, its plural Ids field, or displayName, title, or name. The template record is loaded when that object type is in the catalog. A lookup runs only when the batch resolved no record-id subjects, on the object types named by sibling value shapes, or across the catalog when the template shape has none. Strings that do not resolve are returned in unresolved. getRecord of a non-reserved id stays 404.",
122
- "parameters": [{ "$ref": "#/components/parameters/ScopeHeaders" }],
123
- "requestBody": {
124
- "required": true,
125
- "content": {
126
- "application/json": {
127
- "schema": {
128
- "type": "object",
129
- "required": ["values"],
130
- "properties": {
131
- "values": { "type": "array", "maxItems": 200, "items": { "type": "string" } }
132
- }
133
- }
134
- }
135
- }
136
- },
137
- "responses": {
138
- "200": { "description": "subjects in first-seen order, plus unresolved strings in input order" },
139
- "400": { "description": "values is not an array of strings, or it exceeds 200" }
140
- }
141
- }
142
- },
143
- "/api/v1/records/{recordId}/content-types": {
144
- "get": {
145
- "operationId": "recordContentTypes",
146
- "summary": "Content types stored on one record, joined with descriptors",
147
- "parameters": [
148
- { "$ref": "#/components/parameters/ScopeHeaders" },
149
- { "name": "recordId", "in": "path", "required": true, "schema": { "type": "string" } }
150
- ],
151
- "responses": { "200": { "description": "Stored content types" }, "404": { "description": "Subject is not reserved" } }
152
- }
153
- },
154
- "/api/v1/memorix/{path}": {
155
- "get": {
156
- "operationId": "memorixGet",
157
- "summary": "Forward a Memorix GET under /api",
158
- "description": "path is the remainder of the Memorix path, including extra segments (data/content, memory/sources, pipelines/runs/{runId}, analytics/indexes, metadata/effective, connectors, jobs/v1/work, hooks/v1/subscriptions, data-journey/journeys, relationships/query). Query strings are forwarded. Relationship links and restricted-store break-glass content are refused. data/content: when the content type has a discriminator in the catalog, recordId plus discriminatorValue (or a filter eq clause on the discriminator path) returns that instance in the single-record shape, read from a recordId list on that content type; no match is 404 READ_NOT_FOUND naming the stored values. Without recordId, discriminatorValue is added to filter as an eq clause. recordId plus an eq filter on data.template returns the newest revision of that template, including when the content type has no discriminator. count=true is forwarded unchanged. metadata/effective and metadata/raw are forwarded unchanged, including objectTypes[].functions.",
159
- "parameters": [
160
- { "$ref": "#/components/parameters/ScopeHeaders" },
161
- { "name": "path", "in": "path", "required": true, "schema": { "type": "string" } }
162
- ],
163
- "responses": {
164
- "200": { "description": "Memorix response" },
165
- "403": { "description": "Path is not a fetch route" }
166
- }
167
- }
168
- },
169
- "/api/v1/data/story": {
170
- "get": {
171
- "operationId": "readStory",
172
- "summary": "AI-first story for one subject and template",
173
- "description": "variant defaults to auto. auto serves a usable story-ai row, otherwise the code story. ai and code read only that content type. A usable AI row is active, has data.input, and _metadata.aiExecution.status outside CODE_ONLY, SKIPPED, FAILED, and DEFERRED. 200 matches a content read (scope, addressing, record, currentRevision) and adds story (template, served ai|code, fallbackReason AI_MISSING|AI_UNUSABLE when auto served code, ai, code). ai.stale is true when ai.basedOnRevision is behind code.revision; a stale AI row is still served. ai or code is null when that content type is not declared. 404 STORY_NOT_FOUND includes the same story block. An unknown object type or a template that is not on story presentation.values is answered as GET data/content.",
174
- "parameters": [{ "$ref": "#/components/parameters/ScopeHeaders" }],
175
- "responses": {
176
- "200": { "description": "Served story" },
177
- "404": { "description": "STORY_NOT_FOUND, or the content read for an undeclared template" }
178
- }
179
- }
180
- },
181
- "/api/v1/data/stories": {
182
- "get": {
183
- "operationId": "readStories",
184
- "summary": "One AI-first story per template",
185
- "description": "One readStory result per value in story presentation.values, in that order. Each item is template, label, story, and record or null.",
186
- "parameters": [{ "$ref": "#/components/parameters/ScopeHeaders" }],
187
- "responses": { "200": { "description": "Stories for the subject" } }
188
- }
189
- },
190
- "/api/v1/data/compose": {
191
- "post": {
192
- "operationId": "compose",
193
- "summary": "Read compose of one subject",
194
- "parameters": [{ "$ref": "#/components/parameters/ScopeHeaders" }],
195
- "responses": { "200": { "description": "Composition" } }
196
- }
197
- },
198
- "/api/v1/data/compose/data": {
199
- "post": {
200
- "operationId": "composeData",
201
- "summary": "Read compose projected to content-type .data",
202
- "parameters": [{ "$ref": "#/components/parameters/ScopeHeaders" }],
203
- "responses": { "200": { "description": "Data projection" } }
204
- }
205
- },
206
- "/api/v1/data/compose/data/list": {
207
- "post": {
208
- "operationId": "composeDataList",
209
- "summary": "Read a page of subjects as content-type .data",
210
- "parameters": [{ "$ref": "#/components/parameters/ScopeHeaders" }],
211
- "responses": { "200": { "description": "Page" } }
212
- }
213
- },
214
- "/api/v1/data/lists": {
215
- "post": {
216
- "operationId": "runList",
217
- "summary": "Run a declared list or an abstract property page",
218
- "parameters": [{ "$ref": "#/components/parameters/ScopeHeaders" }],
219
- "responses": { "200": { "description": "List page" } }
220
- }
221
- },
222
- "/api/v1/data/items": {
223
- "post": {
224
- "operationId": "getItem",
225
- "summary": "Read one item view",
226
- "parameters": [{ "$ref": "#/components/parameters/ScopeHeaders" }],
227
- "responses": { "200": { "description": "Item" } }
228
- }
229
- },
230
- "/api/v1/nexum/status": {
231
- "get": {
232
- "operationId": "nexumStatus",
233
- "summary": "Nexum canvas health and the gateway MCP URL",
234
- "parameters": [{ "$ref": "#/components/parameters/ScopeHeaders" }],
235
- "responses": { "200": { "description": "Canvas status. mcpUrl points at this API." } }
236
- }
237
- },
238
- "/api/v1/nexum/snapshots": {
239
- "get": {
240
- "operationId": "nexumListSnapshots",
241
- "summary": "List content/snapshots subjects",
242
- "description": "Same read as nexum_list_snapshots. knowledgeGraphOnly keeps data.kind=knowledge-graph. limit is 1–200, default 50.",
243
- "parameters": [
244
- { "$ref": "#/components/parameters/ScopeHeaders" },
245
- { "name": "limit", "in": "query", "schema": { "type": "integer" } },
246
- { "name": "cursor", "in": "query", "schema": { "type": "string" } },
247
- { "name": "knowledgeGraphOnly", "in": "query", "schema": { "type": "boolean" } }
248
- ],
249
- "responses": { "200": { "description": "Snapshot page" } }
250
- }
251
- },
252
- "/api/v1/nexum/snapshots/{recordId}": {
253
- "get": {
254
- "operationId": "nexumGetSnapshot",
255
- "summary": "One content/snapshots subject",
256
- "description": "recordId may contain slashes as extra path segments. A suffix /connected is nexumGetConnectedContent.",
257
- "parameters": [
258
- { "$ref": "#/components/parameters/ScopeHeaders" },
259
- { "name": "recordId", "in": "path", "required": true, "schema": { "type": "string" } }
260
- ],
261
- "responses": { "200": { "description": "Snapshot" }, "404": { "description": "Snapshot is not stored" } }
262
- }
263
- },
264
- "/api/v1/nexum/entities": {
265
- "get": {
266
- "operationId": "nexumListEntities",
267
- "summary": "List or search Nexum canvas entities",
268
- "parameters": [
269
- { "$ref": "#/components/parameters/ScopeHeaders" },
270
- { "name": "graphId", "in": "query", "schema": { "type": "string" } },
271
- { "name": "q", "in": "query", "schema": { "type": "string" } },
272
- { "name": "limit", "in": "query", "schema": { "type": "string" } }
273
- ],
274
- "responses": {
275
- "200": { "description": "Canvas entities" },
276
- "502": { "description": "NEXUM_UPSTREAM_UNREACHABLE: the Memorix host cannot reach Nexum explore REST" }
277
- }
278
- }
279
- },
280
- "/api/v1/nexum/entities/{entityId}": {
281
- "get": {
282
- "operationId": "nexumGetEntity",
283
- "summary": "One Nexum canvas entity",
284
- "parameters": [
285
- { "$ref": "#/components/parameters/ScopeHeaders" },
286
- { "name": "entityId", "in": "path", "required": true, "schema": { "type": "string" } },
287
- { "name": "graphId", "in": "query", "schema": { "type": "string" } }
288
- ],
289
- "responses": {
290
- "200": { "description": "Canvas entity" },
291
- "502": { "description": "NEXUM_UPSTREAM_UNREACHABLE: the Memorix host cannot reach Nexum explore REST" }
292
- }
293
- }
294
- },
295
- "/api/v1/nexum/query": {
296
- "post": {
297
- "operationId": "nexumQuery",
298
- "summary": "Neighbor query on the Nexum canvas",
299
- "description": "Body is { nodeId, graphId?, depth? } or { seeds, depth? }. Same read as nexum_query.",
300
- "parameters": [{ "$ref": "#/components/parameters/ScopeHeaders" }],
301
- "responses": {
302
- "200": { "description": "Neighbors" },
303
- "502": { "description": "NEXUM_UPSTREAM_UNREACHABLE: the Memorix host cannot reach Nexum explore REST" }
304
- }
305
- }
306
- },
307
- "/api/v1/mcp": {
308
- "get": {
309
- "operationId": "listMcp",
310
- "summary": "MCP servers this API can call",
311
- "description": "memorix-nexum and memorix-scoper are always listed. memorix-mgc is listed when its URL is configured or discovered from Memorix connectors.",
312
- "parameters": [{ "$ref": "#/components/parameters/ScopeHeaders" }],
313
- "responses": { "200": { "description": "MCP servers" } }
314
- }
315
- },
316
- "/api/v1/mcp/nexum": {
317
- "get": {
318
- "operationId": "nexumMcpAdvertise",
319
- "summary": "Advertise memorix-nexum",
320
- "parameters": [{ "$ref": "#/components/parameters/ScopeHeaders" }],
321
- "responses": { "200": { "description": "Advertise document. mcpUrl is this API." } }
322
- },
323
- "post": {
324
- "operationId": "nexumMcpCall",
325
- "summary": "JSON-RPC for memorix-nexum",
326
- "description": "Methods: initialize, ping, tools/list, tools/call, notifications. Tools: nexum_list_snapshots, nexum_get_snapshot, nexum_get_connected_content, nexum_knowledge_status, nexum_list_entities, nexum_get_entity, nexum_query.",
327
- "parameters": [{ "$ref": "#/components/parameters/ScopeHeaders" }],
328
- "responses": { "200": { "description": "JSON-RPC result" } }
329
- }
330
- },
331
- "/api/v1/skills": {
332
- "get": {
333
- "operationId": "skillsInfo",
334
- "summary": "Which process answers agent functions",
335
- "description": "mode is embedded or external. source is this process or skill-api. baseUrl is present only when mode is external. The choice is fixed for the process lifetime.",
336
- "parameters": [{ "$ref": "#/components/parameters/ScopeHeaders" }],
337
- "responses": { "200": { "description": "Skills backend" } }
338
- }
339
- },
340
- "/api/v1/agent-functions/agents/{agentId}/functions": {
341
- "get": {
342
- "operationId": "listAgentFunctions",
343
- "summary": "List functions for one agent",
344
- "description": "agentId must be one of x-memorix-agent-ids. Each item has origin agent or database. Embedded mode reads the pack catalog. External mode proxies skill-api.",
345
- "parameters": [
346
- { "$ref": "#/components/parameters/ScopeHeaders" },
347
- { "name": "agentId", "in": "path", "required": true, "schema": { "type": "string" } }
348
- ],
349
- "responses": { "200": { "description": "Function catalog" }, "403": { "description": "FORBIDDEN" } }
350
- }
351
- },
352
- "/api/v1/agent-functions/agents/{agentId}/functions/{functionId}/run": {
353
- "post": {
354
- "operationId": "runAgentFunction",
355
- "summary": "Run one function for a stored subject",
356
- "description": "Body is objectType and recordId. Subject rows are read through @x12i/memorix-client when this process hosts the function. A storyInput result is written as content type story.",
357
- "parameters": [
358
- { "$ref": "#/components/parameters/ScopeHeaders" },
359
- { "name": "agentId", "in": "path", "required": true, "schema": { "type": "string" } },
360
- { "name": "functionId", "in": "path", "required": true, "schema": { "type": "string" } }
361
- ],
362
- "responses": {
363
- "200": { "description": "FunctionResult with structured and text" },
364
- "404": { "description": "NOT_FOUND" },
365
- "502": { "description": "MEMORIX_UNREACHABLE or MEMORIX_READ_FAILED" }
366
- }
367
- }
368
- },
369
- "/api/v1/agent-functions/agents/{agentId}/functions/{functionId}": {
370
- "put": {
371
- "operationId": "saveAgentFunction",
372
- "summary": "Save a Python function override",
373
- "description": "Body is source, and optional question, page, and objectTypes. source must define generate_text. Without ASSISTANT_MONGO_URI or MONGO_URI the embedded host returns 503 PERSISTENCE.",
374
- "parameters": [
375
- { "$ref": "#/components/parameters/ScopeHeaders" },
376
- { "name": "agentId", "in": "path", "required": true, "schema": { "type": "string" } },
377
- { "name": "functionId", "in": "path", "required": true, "schema": { "type": "string" } }
378
- ],
379
- "responses": { "200": { "description": "Saved override" }, "503": { "description": "PERSISTENCE" } }
380
- },
381
- "delete": {
382
- "operationId": "removeAgentFunction",
383
- "summary": "Delete a saved function override",
384
- "parameters": [
385
- { "$ref": "#/components/parameters/ScopeHeaders" },
386
- { "name": "agentId", "in": "path", "required": true, "schema": { "type": "string" } },
387
- { "name": "functionId", "in": "path", "required": true, "schema": { "type": "string" } }
388
- ],
389
- "responses": { "200": { "description": "origin agent or removed" }, "503": { "description": "PERSISTENCE" } }
390
- }
391
- },
392
- "/api/v1/scoper": {
393
- "get": {
394
- "operationId": "scoperInfo",
395
- "summary": "Hosted Scoper release",
396
- "description": "Reports @x12i/memorix-scoper 3.0.0, the SDK 2.2.0, whether saved functions are attached, mode embedded or external, and the aligned memorix-service 3.17.0, memorix-skills 0.6.1, memorix-client 3.17.0, and ai-dispatcher 3.2.0. Subject reads use @x12i/memorix-client.",
397
- "parameters": [{ "$ref": "#/components/parameters/ScopeHeaders" }],
398
- "responses": { "200": { "description": "Scoper host" } }
399
- }
400
- },
401
- "/api/v1/scoper/scope": {
402
- "post": {
403
- "operationId": "scoperScope",
404
- "summary": "Run a scope",
405
- "description": "Body is a ScopeRequest: profileId, question, and optional focus, budgets, options, hints. Org, agents, and caller come from the call headers. The same fields in the body are ignored. Saved query and scope functions run when SCOPER_FUNCTIONS_DIR is set; otherwise the reasoner answers.",
406
- "parameters": [{ "$ref": "#/components/parameters/ScopeHeaders" }],
407
- "responses": {
408
- "200": { "description": "Evidence bundle" },
409
- "400": { "description": "INVALID_REQUEST" }
410
- }
411
- }
412
- },
413
- "/api/v1/scoper/subject-data": {
414
- "post": {
415
- "operationId": "scoperSubjectData",
416
- "summary": "Read one subject's content through Scoper",
417
- "description": "Body is recordId, objectType, and contentType. Optional alsoContentTypes, sourceContentTypes, include, properties, exclude, and useMarkdown. Scope headers select the org and agents.",
418
- "parameters": [{ "$ref": "#/components/parameters/ScopeHeaders" }],
419
- "responses": {
420
- "200": { "description": "Subject data" },
421
- "400": { "description": "INVALID_REQUEST" },
422
- "404": { "description": "READ_NOT_FOUND" }
423
- }
424
- }
425
- },
426
- "/api/v1/mcp/scoper": {
427
- "get": {
428
- "operationId": "scoperMcpAdvertise",
429
- "summary": "Advertise memorix-scoper",
430
- "parameters": [{ "$ref": "#/components/parameters/ScopeHeaders" }],
431
- "responses": { "200": { "description": "Advertise document. mcpUrl is this API." } }
432
- },
433
- "post": {
434
- "operationId": "scoperMcpCall",
435
- "summary": "JSON-RPC for memorix-scoper",
436
- "description": "Methods: initialize, ping, tools/list, tools/call, notifications. Tools: catalog, subjects_list, subjects_query, subject_data, scope.",
437
- "parameters": [{ "$ref": "#/components/parameters/ScopeHeaders" }],
438
- "responses": { "200": { "description": "JSON-RPC result" } }
439
- }
440
- },
441
- "/api/v1/mcp/mgc": {
442
- "get": {
443
- "operationId": "mgcMcpAdvertise",
444
- "summary": "Advertise memorix-mgc",
445
- "parameters": [{ "$ref": "#/components/parameters/ScopeHeaders" }],
446
- "responses": { "200": { "description": "MGC advertise" }, "404": { "description": "MGC URL is not configured" } }
447
- },
448
- "post": {
449
- "operationId": "mgcMcpCall",
450
- "summary": "JSON-RPC for the MGC connector MCP",
451
- "description": "Forwards to the MGC source host /mcp. Stable fetch tools include mgc_list_connectors, mgc_describe_connector, and mgc_fetch.",
452
- "parameters": [{ "$ref": "#/components/parameters/ScopeHeaders" }],
453
- "responses": { "200": { "description": "JSON-RPC result" }, "404": { "description": "MGC URL is not configured" } }
454
- }
455
- }
456
- },
457
- "components": {
458
- "parameters": {
459
- "ScopeHeaders": {
460
- "name": "scope",
461
- "in": "header",
462
- "required": true,
463
- "description": "Send x-memorix-org-id, x-memorix-agent-ids (comma-separated), and x-memorix-caller on every /api/v1 call.",
464
- "schema": { "type": "string" }
465
- },
466
- "ObjectType": {
467
- "name": "objectType",
468
- "in": "path",
469
- "required": true,
470
- "schema": { "type": "string" }
471
- },
472
- "ContentType": {
473
- "name": "contentType",
474
- "in": "path",
475
- "required": true,
476
- "schema": { "type": "string" }
477
- }
478
- }
479
- }
480
- }
1
+ {
2
+ "openapi": "3.0.3",
3
+ "info": {
4
+ "title": "Memorix client API",
5
+ "version": "0.19.0",
6
+ "description": "Read API for smart clients and the visualizer contract (docs/visualizer-api.md, contract visualizer, revision 2026-10-24). Agents come from x-memorix-agent-ids; each must be deployed for the org, and * selects the org's deployed agents. The org comes from x-memorix-org-id, or from an Authix bearer token when MEMORIX_AUTH=authix. x-memorix-caller names the calling app. x-request-id is echoed and appears as error.requestId. Errors are { error: { code, message, requestId, retryable, details?, feature?, current? } }. Descriptors are the effective object-type fields for those agents. GET /api/v1/memorix/{path} forwards Memorix read routes. Agent functions are under /api/v1/agent-functions. Nexum subjects and canvas are under /api/v1/nexum. Scoper 3.0.0 is hosted at /api/v1/scoper. MCP is /api/v1/mcp/nexum, /api/v1/mcp/scoper, and /api/v1/mcp/mgc. Aligned with memorix-service 3.19.1 and memorix-skills 0.6.1.",
7
+ "x-contract": "visualizer",
8
+ "x-contract-revision": "2026-10-24"
9
+ },
10
+ "paths": {
11
+ "/health": {
12
+ "get": {
13
+ "operationId": "health",
14
+ "summary": "Liveness",
15
+ "responses": {
16
+ "200": {
17
+ "description": "Process is up"
18
+ }
19
+ }
20
+ }
21
+ },
22
+ "/api/v1/catalog": {
23
+ "get": {
24
+ "operationId": "catalog",
25
+ "summary": "Object types, content types, and field descriptors for the agent ids",
26
+ "description": "Each content type has derived true or false. derived true is a processing result stored on the subject. Source content is false. Metadata derived on the content type wins; otherwise the platform result types are used. A field may include mixed and shapes. shapes name a grammar and resolvesTo (objectType, contentTypes, recordId). recordId is value, paired-<sourceProperty>, or a template containing {value}. When every value shape names one object type, refersTo is that object type. A content type may also carry presentation (label, order, tab always|whenPresent|hidden, values[] with value, label, order, origin) and origin (producer model|code|mixed, use always|conditional, record). Both are optional, display metadata only, and absent when the pack has not stamped them. An object type may include functions (id, question, page, composes, pageStory, reads, optional template and kind spine|threads). template is the story template id, the same string as data.template and as presentation.values[].value on content type story. A malformed function is dropped.",
27
+ "parameters": [
28
+ {
29
+ "$ref": "#/components/parameters/ScopeHeaders"
30
+ }
31
+ ],
32
+ "responses": {
33
+ "200": {
34
+ "description": "Catalog"
35
+ }
36
+ }
37
+ }
38
+ },
39
+ "/api/v1/object-types/{objectType}": {
40
+ "get": {
41
+ "operationId": "objectType",
42
+ "summary": "One object type and its content-type descriptors",
43
+ "parameters": [
44
+ {
45
+ "$ref": "#/components/parameters/ScopeHeaders"
46
+ },
47
+ {
48
+ "$ref": "#/components/parameters/ObjectType"
49
+ }
50
+ ],
51
+ "responses": {
52
+ "200": {
53
+ "description": "Object type"
54
+ },
55
+ "404": {
56
+ "description": "Unknown object type"
57
+ }
58
+ }
59
+ }
60
+ },
61
+ "/api/v1/object-types/{objectType}/content-types": {
62
+ "get": {
63
+ "operationId": "contentTypes",
64
+ "summary": "Content types allowed on an object type, with descriptors and the leading content type",
65
+ "parameters": [
66
+ {
67
+ "$ref": "#/components/parameters/ScopeHeaders"
68
+ },
69
+ {
70
+ "$ref": "#/components/parameters/ObjectType"
71
+ }
72
+ ],
73
+ "responses": {
74
+ "200": {
75
+ "description": "Content types"
76
+ }
77
+ }
78
+ }
79
+ },
80
+ "/api/v1/object-types/{objectType}/content-types/{contentType}": {
81
+ "get": {
82
+ "operationId": "contentType",
83
+ "summary": "Descriptors for one content type",
84
+ "parameters": [
85
+ {
86
+ "$ref": "#/components/parameters/ScopeHeaders"
87
+ },
88
+ {
89
+ "$ref": "#/components/parameters/ObjectType"
90
+ },
91
+ {
92
+ "$ref": "#/components/parameters/ContentType"
93
+ }
94
+ ],
95
+ "responses": {
96
+ "200": {
97
+ "description": "Content type"
98
+ },
99
+ "404": {
100
+ "description": "Unknown content type"
101
+ }
102
+ }
103
+ }
104
+ },
105
+ "/api/v1/object-types/{objectType}/records": {
106
+ "get": {
107
+ "operationId": "listRecords",
108
+ "summary": "Paginated subjects, driven by a leading content type",
109
+ "description": "Pages by rows of the leading content type. Directory-only records are not listed (FR-14). total is the census directory count when a census for this agent set was read in the last 60 s.",
110
+ "parameters": [
111
+ {
112
+ "$ref": "#/components/parameters/ScopeHeaders"
113
+ },
114
+ {
115
+ "$ref": "#/components/parameters/ObjectType"
116
+ },
117
+ {
118
+ "name": "leadingContentType",
119
+ "in": "query",
120
+ "schema": {
121
+ "type": "string"
122
+ }
123
+ },
124
+ {
125
+ "name": "contentTypes",
126
+ "in": "query",
127
+ "schema": {
128
+ "type": "string"
129
+ },
130
+ "description": "Comma-separated content type ids"
131
+ },
132
+ {
133
+ "name": "representation",
134
+ "in": "query",
135
+ "schema": {
136
+ "type": "string",
137
+ "enum": [
138
+ "json",
139
+ "markdown",
140
+ "both"
141
+ ]
142
+ }
143
+ },
144
+ {
145
+ "name": "filter",
146
+ "in": "query",
147
+ "schema": {
148
+ "type": "string"
149
+ },
150
+ "description": "JSON SafeFilter"
151
+ },
152
+ {
153
+ "name": "sort",
154
+ "in": "query",
155
+ "schema": {
156
+ "type": "string"
157
+ },
158
+ "description": "JSON sort"
159
+ },
160
+ {
161
+ "name": "limit",
162
+ "in": "query",
163
+ "schema": {
164
+ "type": "integer",
165
+ "minimum": 1,
166
+ "maximum": 200,
167
+ "default": 50
168
+ }
169
+ },
170
+ {
171
+ "name": "cursor",
172
+ "in": "query",
173
+ "schema": {
174
+ "type": "string"
175
+ }
176
+ },
177
+ {
178
+ "name": "refs",
179
+ "in": "query",
180
+ "required": false,
181
+ "description": "expand (default) or status",
182
+ "schema": {
183
+ "type": "string"
184
+ }
185
+ }
186
+ ],
187
+ "responses": {
188
+ "200": {
189
+ "description": "OK",
190
+ "content": {
191
+ "application/json": {
192
+ "schema": {
193
+ "$ref": "#/components/schemas/RecordsPage"
194
+ }
195
+ }
196
+ }
197
+ }
198
+ }
199
+ }
200
+ },
201
+ "/api/v1/records/{recordId}": {
202
+ "get": {
203
+ "operationId": "getRecord",
204
+ "summary": "One subject with all stored content types, or a named subset",
205
+ "description": "Send the record id as one segment with / encoded as %2F. A literal trailing /content-types segment is the content-types view. status is stored or directory-only.",
206
+ "parameters": [
207
+ {
208
+ "$ref": "#/components/parameters/ScopeHeaders"
209
+ },
210
+ {
211
+ "name": "recordId",
212
+ "in": "path",
213
+ "required": true,
214
+ "schema": {
215
+ "type": "string"
216
+ }
217
+ },
218
+ {
219
+ "name": "contentTypes",
220
+ "in": "query",
221
+ "schema": {
222
+ "type": "string"
223
+ }
224
+ },
225
+ {
226
+ "name": "representation",
227
+ "in": "query",
228
+ "schema": {
229
+ "type": "string",
230
+ "enum": [
231
+ "json",
232
+ "markdown",
233
+ "both"
234
+ ]
235
+ }
236
+ },
237
+ {
238
+ "name": "objectType",
239
+ "in": "query",
240
+ "schema": {
241
+ "type": "string"
242
+ },
243
+ "description": "When set, must match the directory"
244
+ }
245
+ ],
246
+ "responses": {
247
+ "200": {
248
+ "description": "Subject"
249
+ },
250
+ "404": {
251
+ "description": "Subject is not reserved"
252
+ }
253
+ }
254
+ }
255
+ },
256
+ "/api/v1/processed-subjects": {
257
+ "get": {
258
+ "operationId": "processedSubjects",
259
+ "summary": "Distinct subjects that have a derived content row on that same record",
260
+ "description": "rule.id caller-or-preserved opens every catalog content type except relationships. A subject counts when a row on that record has datasource basis caller or preserved. Declared and backfill rows do not count. The process keeps the answer for the org and agent ids. checking stays true until every included collection is read with no nextCursor. A later read returns that answer. continue=true keeps those subjects and reads empty collections again. A new rule.id drops the kept answer. count is the number of distinct subjects, not the page size. pageInfo.nextCursor is omitted on the last page. A working/ record id is not a subject. An unregistered content type is skipped.",
261
+ "parameters": [
262
+ {
263
+ "$ref": "#/components/parameters/ScopeHeaders"
264
+ },
265
+ {
266
+ "name": "objectType",
267
+ "in": "query",
268
+ "schema": {
269
+ "type": "string"
270
+ },
271
+ "description": "Only subjects of this object type. Absent means every object type in the catalog."
272
+ },
273
+ {
274
+ "name": "limit",
275
+ "in": "query",
276
+ "schema": {
277
+ "type": "integer",
278
+ "minimum": 1,
279
+ "maximum": 200,
280
+ "default": 50
281
+ }
282
+ },
283
+ {
284
+ "name": "cursor",
285
+ "in": "query",
286
+ "schema": {
287
+ "type": "string"
288
+ }
289
+ },
290
+ {
291
+ "name": "continue",
292
+ "in": "query",
293
+ "schema": {
294
+ "type": "boolean"
295
+ },
296
+ "description": "Keep the saved subjects and read collections again, including ones kept as empty."
297
+ }
298
+ ],
299
+ "responses": {
300
+ "200": {
301
+ "description": "Kept subjects. saved is true once a pass has finished. checking is true while a pass is still reading."
302
+ },
303
+ "404": {
304
+ "description": "Unknown object type"
305
+ }
306
+ }
307
+ },
308
+ "delete": {
309
+ "operationId": "deleteProcessedSubjects",
310
+ "summary": "Drop the kept processed-subject answer for this org and these agent ids",
311
+ "parameters": [
312
+ {
313
+ "$ref": "#/components/parameters/ScopeHeaders"
314
+ }
315
+ ],
316
+ "responses": {
317
+ "200": {
318
+ "description": "The kept answer is gone. The next GET reads again."
319
+ }
320
+ }
321
+ }
322
+ },
323
+ "/api/v1/refs/resolve": {
324
+ "post": {
325
+ "operationId": "resolveRefs",
326
+ "summary": "Resolve ref strings from the shapes declared on catalog fields",
327
+ "description": "Body is { values: string[] }, at most 200. Each string is classified by the first shape grammar that matches the whole value. value loads that reserved record. paired-<sourceProperty> attaches to the sibling subject that publishes matchProperty, or looks up data.<matchProperty>. A template attaches to a subject in the batch that publishes sourceProperty, its plural Ids field, or displayName, title, or name. The template record is loaded when that object type is in the catalog. A lookup runs only when the batch resolved no record-id subjects, on the object types named by sibling value shapes, or across the catalog when the template shape has none. Strings that do not resolve are returned in unresolved. getRecord of a non-reserved id stays 404.",
328
+ "parameters": [
329
+ {
330
+ "$ref": "#/components/parameters/ScopeHeaders"
331
+ }
332
+ ],
333
+ "requestBody": {
334
+ "required": true,
335
+ "content": {
336
+ "application/json": {
337
+ "schema": {
338
+ "type": "object",
339
+ "required": [
340
+ "values"
341
+ ],
342
+ "properties": {
343
+ "values": {
344
+ "type": "array",
345
+ "maxItems": 200,
346
+ "items": {
347
+ "type": "string"
348
+ }
349
+ }
350
+ }
351
+ }
352
+ }
353
+ }
354
+ },
355
+ "responses": {
356
+ "200": {
357
+ "description": "subjects in first-seen order, plus unresolved strings in input order"
358
+ },
359
+ "400": {
360
+ "description": "values is not an array of strings, or it exceeds 200"
361
+ }
362
+ }
363
+ }
364
+ },
365
+ "/api/v1/records/{recordId}/content-types": {
366
+ "get": {
367
+ "operationId": "recordContentTypes",
368
+ "summary": "Content types stored on one record, joined with descriptors",
369
+ "parameters": [
370
+ {
371
+ "$ref": "#/components/parameters/ScopeHeaders"
372
+ },
373
+ {
374
+ "name": "recordId",
375
+ "in": "path",
376
+ "required": true,
377
+ "schema": {
378
+ "type": "string"
379
+ }
380
+ }
381
+ ],
382
+ "responses": {
383
+ "200": {
384
+ "description": "Stored content types"
385
+ },
386
+ "404": {
387
+ "description": "Subject is not reserved"
388
+ }
389
+ }
390
+ }
391
+ },
392
+ "/api/v1/memorix/{path}": {
393
+ "get": {
394
+ "operationId": "memorixGet",
395
+ "summary": "Forward a Memorix GET under /api",
396
+ "description": "path is the remainder of the Memorix path, including extra segments (data/content, memory/sources, pipelines/runs/{runId}, analytics/indexes, metadata/effective, connectors, jobs/v1/work, hooks/v1/subscriptions, data-journey/journeys, relationships/query). Query strings are forwarded. Relationship links and restricted-store break-glass content are refused. data/content: when the content type has a discriminator in the catalog, recordId plus discriminatorValue (or a filter eq clause on the discriminator path) returns that instance in the single-record shape, read from a recordId list on that content type; no match is 404 READ_NOT_FOUND naming the stored values. Without recordId, discriminatorValue is added to filter as an eq clause. recordId plus an eq filter on data.template returns the newest revision of that template, including when the content type has no discriminator. count=true is forwarded unchanged. metadata/effective and metadata/raw are forwarded unchanged, including objectTypes[].functions.",
397
+ "parameters": [
398
+ {
399
+ "$ref": "#/components/parameters/ScopeHeaders"
400
+ },
401
+ {
402
+ "name": "path",
403
+ "in": "path",
404
+ "required": true,
405
+ "schema": {
406
+ "type": "string"
407
+ }
408
+ }
409
+ ],
410
+ "responses": {
411
+ "200": {
412
+ "description": "Memorix response"
413
+ },
414
+ "403": {
415
+ "description": "Path is not a fetch route"
416
+ }
417
+ }
418
+ }
419
+ },
420
+ "/api/v1/data/story": {
421
+ "get": {
422
+ "operationId": "readStory",
423
+ "summary": "AI-first story for one subject and template",
424
+ "description": "variant defaults to auto. auto serves a usable story-ai row, otherwise the code story. ai and code read only that content type. A usable AI row is active, has data.input, and _metadata.aiExecution.status outside CODE_ONLY, SKIPPED, FAILED, and DEFERRED. 200 matches a content read (scope, addressing, record, currentRevision) and adds story (template, served ai|code, fallbackReason AI_MISSING|AI_UNUSABLE when auto served code, ai, code). ai.stale is true when ai.basedOnRevision is behind code.revision; a stale AI row is still served. ai or code is null when that content type is not declared. 404 STORY_NOT_FOUND includes the same story block. An unknown object type or a template that is not on story presentation.values is answered as GET data/content.",
425
+ "parameters": [
426
+ {
427
+ "$ref": "#/components/parameters/ScopeHeaders"
428
+ }
429
+ ],
430
+ "responses": {
431
+ "200": {
432
+ "description": "Served story"
433
+ },
434
+ "404": {
435
+ "description": "STORY_NOT_FOUND, or the content read for an undeclared template"
436
+ }
437
+ }
438
+ }
439
+ },
440
+ "/api/v1/data/stories": {
441
+ "get": {
442
+ "operationId": "readStories",
443
+ "summary": "One AI-first story per template",
444
+ "description": "One readStory result per value in story presentation.values, in that order. Each item is template, label, story, and record or null.",
445
+ "parameters": [
446
+ {
447
+ "$ref": "#/components/parameters/ScopeHeaders"
448
+ }
449
+ ],
450
+ "responses": {
451
+ "200": {
452
+ "description": "Stories for the subject"
453
+ }
454
+ }
455
+ }
456
+ },
457
+ "/api/v1/data/compose": {
458
+ "post": {
459
+ "operationId": "compose",
460
+ "summary": "Read compose of one subject",
461
+ "parameters": [
462
+ {
463
+ "$ref": "#/components/parameters/ScopeHeaders"
464
+ }
465
+ ],
466
+ "responses": {
467
+ "200": {
468
+ "description": "Composition"
469
+ }
470
+ }
471
+ }
472
+ },
473
+ "/api/v1/data/compose/data": {
474
+ "post": {
475
+ "operationId": "composeData",
476
+ "summary": "Read compose projected to content-type .data",
477
+ "parameters": [
478
+ {
479
+ "$ref": "#/components/parameters/ScopeHeaders"
480
+ }
481
+ ],
482
+ "responses": {
483
+ "200": {
484
+ "description": "Data projection"
485
+ }
486
+ }
487
+ }
488
+ },
489
+ "/api/v1/data/compose/data/list": {
490
+ "post": {
491
+ "operationId": "composeDataList",
492
+ "summary": "Read a page of subjects as content-type .data",
493
+ "parameters": [
494
+ {
495
+ "$ref": "#/components/parameters/ScopeHeaders"
496
+ }
497
+ ],
498
+ "responses": {
499
+ "200": {
500
+ "description": "Page"
501
+ }
502
+ }
503
+ }
504
+ },
505
+ "/api/v1/data/lists": {
506
+ "post": {
507
+ "operationId": "runList",
508
+ "summary": "Run a declared list or an abstract property page",
509
+ "parameters": [
510
+ {
511
+ "$ref": "#/components/parameters/ScopeHeaders"
512
+ }
513
+ ],
514
+ "responses": {
515
+ "200": {
516
+ "description": "List page"
517
+ }
518
+ }
519
+ }
520
+ },
521
+ "/api/v1/data/items": {
522
+ "post": {
523
+ "operationId": "getItem",
524
+ "summary": "Read one item view",
525
+ "parameters": [
526
+ {
527
+ "$ref": "#/components/parameters/ScopeHeaders"
528
+ }
529
+ ],
530
+ "responses": {
531
+ "200": {
532
+ "description": "Item"
533
+ }
534
+ }
535
+ }
536
+ },
537
+ "/api/v1/nexum/status": {
538
+ "get": {
539
+ "operationId": "nexumStatus",
540
+ "summary": "Nexum canvas health and the gateway MCP URL",
541
+ "parameters": [
542
+ {
543
+ "$ref": "#/components/parameters/ScopeHeaders"
544
+ }
545
+ ],
546
+ "responses": {
547
+ "200": {
548
+ "description": "Canvas status. mcpUrl points at this API."
549
+ }
550
+ }
551
+ }
552
+ },
553
+ "/api/v1/nexum/snapshots": {
554
+ "get": {
555
+ "operationId": "nexumListSnapshots",
556
+ "summary": "List content/snapshots subjects",
557
+ "description": "Same read as nexum_list_snapshots. knowledgeGraphOnly keeps data.kind=knowledge-graph. limit is 1–200, default 50.",
558
+ "parameters": [
559
+ {
560
+ "$ref": "#/components/parameters/ScopeHeaders"
561
+ },
562
+ {
563
+ "name": "limit",
564
+ "in": "query",
565
+ "schema": {
566
+ "type": "integer"
567
+ }
568
+ },
569
+ {
570
+ "name": "cursor",
571
+ "in": "query",
572
+ "schema": {
573
+ "type": "string"
574
+ }
575
+ },
576
+ {
577
+ "name": "knowledgeGraphOnly",
578
+ "in": "query",
579
+ "schema": {
580
+ "type": "boolean"
581
+ }
582
+ }
583
+ ],
584
+ "responses": {
585
+ "200": {
586
+ "description": "Snapshot page"
587
+ }
588
+ }
589
+ }
590
+ },
591
+ "/api/v1/nexum/snapshots/{recordId}": {
592
+ "get": {
593
+ "operationId": "nexumGetSnapshot",
594
+ "summary": "One content/snapshots subject",
595
+ "description": "recordId may contain slashes as extra path segments. A suffix /connected is nexumGetConnectedContent.",
596
+ "parameters": [
597
+ {
598
+ "$ref": "#/components/parameters/ScopeHeaders"
599
+ },
600
+ {
601
+ "name": "recordId",
602
+ "in": "path",
603
+ "required": true,
604
+ "schema": {
605
+ "type": "string"
606
+ }
607
+ }
608
+ ],
609
+ "responses": {
610
+ "200": {
611
+ "description": "Snapshot"
612
+ },
613
+ "404": {
614
+ "description": "Snapshot is not stored"
615
+ }
616
+ }
617
+ }
618
+ },
619
+ "/api/v1/nexum/entities": {
620
+ "get": {
621
+ "operationId": "nexumListEntities",
622
+ "summary": "List or search Nexum canvas entities",
623
+ "parameters": [
624
+ {
625
+ "$ref": "#/components/parameters/ScopeHeaders"
626
+ },
627
+ {
628
+ "name": "graphId",
629
+ "in": "query",
630
+ "schema": {
631
+ "type": "string"
632
+ }
633
+ },
634
+ {
635
+ "name": "q",
636
+ "in": "query",
637
+ "schema": {
638
+ "type": "string"
639
+ }
640
+ },
641
+ {
642
+ "name": "limit",
643
+ "in": "query",
644
+ "schema": {
645
+ "type": "string"
646
+ }
647
+ }
648
+ ],
649
+ "responses": {
650
+ "200": {
651
+ "description": "Canvas entities"
652
+ },
653
+ "502": {
654
+ "description": "NEXUM_UPSTREAM_UNREACHABLE: the Memorix host cannot reach Nexum explore REST"
655
+ }
656
+ }
657
+ }
658
+ },
659
+ "/api/v1/nexum/entities/{entityId}": {
660
+ "get": {
661
+ "operationId": "nexumGetEntity",
662
+ "summary": "One Nexum canvas entity",
663
+ "parameters": [
664
+ {
665
+ "$ref": "#/components/parameters/ScopeHeaders"
666
+ },
667
+ {
668
+ "name": "entityId",
669
+ "in": "path",
670
+ "required": true,
671
+ "schema": {
672
+ "type": "string"
673
+ }
674
+ },
675
+ {
676
+ "name": "graphId",
677
+ "in": "query",
678
+ "schema": {
679
+ "type": "string"
680
+ }
681
+ }
682
+ ],
683
+ "responses": {
684
+ "200": {
685
+ "description": "Canvas entity"
686
+ },
687
+ "502": {
688
+ "description": "NEXUM_UPSTREAM_UNREACHABLE: the Memorix host cannot reach Nexum explore REST"
689
+ }
690
+ }
691
+ }
692
+ },
693
+ "/api/v1/nexum/query": {
694
+ "post": {
695
+ "operationId": "nexumQuery",
696
+ "summary": "Neighbor query on the Nexum canvas",
697
+ "description": "Body is { nodeId, graphId?, depth? } or { seeds, depth? }. Same read as nexum_query.",
698
+ "parameters": [
699
+ {
700
+ "$ref": "#/components/parameters/ScopeHeaders"
701
+ }
702
+ ],
703
+ "responses": {
704
+ "200": {
705
+ "description": "Neighbors"
706
+ },
707
+ "502": {
708
+ "description": "NEXUM_UPSTREAM_UNREACHABLE: the Memorix host cannot reach Nexum explore REST"
709
+ }
710
+ }
711
+ }
712
+ },
713
+ "/api/v1/mcp": {
714
+ "get": {
715
+ "operationId": "listMcp",
716
+ "summary": "MCP servers this API can call",
717
+ "description": "memorix-nexum and memorix-scoper are always listed. memorix-mgc is listed when its URL is configured or discovered from Memorix connectors.",
718
+ "parameters": [
719
+ {
720
+ "$ref": "#/components/parameters/ScopeHeaders"
721
+ }
722
+ ],
723
+ "responses": {
724
+ "200": {
725
+ "description": "MCP servers"
726
+ }
727
+ }
728
+ }
729
+ },
730
+ "/api/v1/mcp/nexum": {
731
+ "get": {
732
+ "operationId": "nexumMcpAdvertise",
733
+ "summary": "Advertise memorix-nexum",
734
+ "parameters": [
735
+ {
736
+ "$ref": "#/components/parameters/ScopeHeaders"
737
+ }
738
+ ],
739
+ "responses": {
740
+ "200": {
741
+ "description": "Advertise document. mcpUrl is this API."
742
+ }
743
+ }
744
+ },
745
+ "post": {
746
+ "operationId": "nexumMcpCall",
747
+ "summary": "JSON-RPC for memorix-nexum",
748
+ "description": "Methods: initialize, ping, tools/list, tools/call, notifications. Tools: nexum_list_snapshots, nexum_get_snapshot, nexum_get_connected_content, nexum_knowledge_status, nexum_list_entities, nexum_get_entity, nexum_query.",
749
+ "parameters": [
750
+ {
751
+ "$ref": "#/components/parameters/ScopeHeaders"
752
+ }
753
+ ],
754
+ "responses": {
755
+ "200": {
756
+ "description": "JSON-RPC result"
757
+ }
758
+ }
759
+ }
760
+ },
761
+ "/api/v1/skills": {
762
+ "get": {
763
+ "operationId": "skillsInfo",
764
+ "summary": "Which process answers agent functions",
765
+ "description": "mode is embedded or external. source is this process or skill-api. baseUrl is present only when mode is external. The choice is fixed for the process lifetime.",
766
+ "parameters": [
767
+ {
768
+ "$ref": "#/components/parameters/ScopeHeaders"
769
+ }
770
+ ],
771
+ "responses": {
772
+ "200": {
773
+ "description": "Skills backend"
774
+ }
775
+ }
776
+ }
777
+ },
778
+ "/api/v1/agent-functions/agents/{agentId}/functions": {
779
+ "get": {
780
+ "operationId": "listAgentFunctions",
781
+ "summary": "List functions for one agent",
782
+ "description": "agentId must be one of x-memorix-agent-ids. Each item has origin agent or database. Embedded mode reads the pack catalog. External mode proxies skill-api.",
783
+ "parameters": [
784
+ {
785
+ "$ref": "#/components/parameters/ScopeHeaders"
786
+ },
787
+ {
788
+ "name": "agentId",
789
+ "in": "path",
790
+ "required": true,
791
+ "schema": {
792
+ "type": "string"
793
+ }
794
+ }
795
+ ],
796
+ "responses": {
797
+ "200": {
798
+ "description": "Function catalog"
799
+ },
800
+ "403": {
801
+ "description": "FORBIDDEN"
802
+ }
803
+ }
804
+ }
805
+ },
806
+ "/api/v1/agent-functions/agents/{agentId}/functions/{functionId}/run": {
807
+ "post": {
808
+ "operationId": "runAgentFunction",
809
+ "summary": "Run one function for a stored subject",
810
+ "description": "Body is objectType and recordId. Subject rows are read through @x12i/memorix-client when this process hosts the function. A storyInput result is written as content type story.",
811
+ "parameters": [
812
+ {
813
+ "$ref": "#/components/parameters/ScopeHeaders"
814
+ },
815
+ {
816
+ "name": "agentId",
817
+ "in": "path",
818
+ "required": true,
819
+ "schema": {
820
+ "type": "string"
821
+ }
822
+ },
823
+ {
824
+ "name": "functionId",
825
+ "in": "path",
826
+ "required": true,
827
+ "schema": {
828
+ "type": "string"
829
+ }
830
+ }
831
+ ],
832
+ "responses": {
833
+ "200": {
834
+ "description": "FunctionResult with structured and text"
835
+ },
836
+ "404": {
837
+ "description": "NOT_FOUND"
838
+ },
839
+ "502": {
840
+ "description": "MEMORIX_UNREACHABLE or MEMORIX_READ_FAILED"
841
+ }
842
+ }
843
+ }
844
+ },
845
+ "/api/v1/agent-functions/agents/{agentId}/functions/{functionId}": {
846
+ "put": {
847
+ "operationId": "saveAgentFunction",
848
+ "summary": "Save a Python function override",
849
+ "description": "Body is source, and optional question, page, and objectTypes. source must define generate_text. Without ASSISTANT_MONGO_URI or MONGO_URI the embedded host returns 503 PERSISTENCE.",
850
+ "parameters": [
851
+ {
852
+ "$ref": "#/components/parameters/ScopeHeaders"
853
+ },
854
+ {
855
+ "name": "agentId",
856
+ "in": "path",
857
+ "required": true,
858
+ "schema": {
859
+ "type": "string"
860
+ }
861
+ },
862
+ {
863
+ "name": "functionId",
864
+ "in": "path",
865
+ "required": true,
866
+ "schema": {
867
+ "type": "string"
868
+ }
869
+ }
870
+ ],
871
+ "responses": {
872
+ "200": {
873
+ "description": "Saved override"
874
+ },
875
+ "503": {
876
+ "description": "PERSISTENCE"
877
+ }
878
+ }
879
+ },
880
+ "delete": {
881
+ "operationId": "removeAgentFunction",
882
+ "summary": "Delete a saved function override",
883
+ "parameters": [
884
+ {
885
+ "$ref": "#/components/parameters/ScopeHeaders"
886
+ },
887
+ {
888
+ "name": "agentId",
889
+ "in": "path",
890
+ "required": true,
891
+ "schema": {
892
+ "type": "string"
893
+ }
894
+ },
895
+ {
896
+ "name": "functionId",
897
+ "in": "path",
898
+ "required": true,
899
+ "schema": {
900
+ "type": "string"
901
+ }
902
+ }
903
+ ],
904
+ "responses": {
905
+ "200": {
906
+ "description": "origin agent or removed"
907
+ },
908
+ "503": {
909
+ "description": "PERSISTENCE"
910
+ }
911
+ }
912
+ }
913
+ },
914
+ "/api/v1/scoper": {
915
+ "get": {
916
+ "operationId": "scoperInfo",
917
+ "summary": "Hosted Scoper release",
918
+ "description": "Reports @x12i/memorix-scoper 3.0.0, the SDK 2.2.0, whether saved functions are attached, mode embedded or external, and the aligned memorix-service 3.17.0, memorix-skills 0.6.1, memorix-client 3.17.0, and ai-dispatcher 3.2.0. Subject reads use @x12i/memorix-client.",
919
+ "parameters": [
920
+ {
921
+ "$ref": "#/components/parameters/ScopeHeaders"
922
+ }
923
+ ],
924
+ "responses": {
925
+ "200": {
926
+ "description": "Scoper host"
927
+ }
928
+ }
929
+ }
930
+ },
931
+ "/api/v1/scoper/scope": {
932
+ "post": {
933
+ "operationId": "scoperScope",
934
+ "summary": "Run a scope",
935
+ "description": "Body is a ScopeRequest: profileId, question, and optional focus, budgets, options, hints. Org, agents, and caller come from the call headers. The same fields in the body are ignored. Saved query and scope functions run when SCOPER_FUNCTIONS_DIR is set; otherwise the reasoner answers.",
936
+ "parameters": [
937
+ {
938
+ "$ref": "#/components/parameters/ScopeHeaders"
939
+ }
940
+ ],
941
+ "responses": {
942
+ "200": {
943
+ "description": "Evidence bundle"
944
+ },
945
+ "400": {
946
+ "description": "INVALID_REQUEST"
947
+ }
948
+ }
949
+ }
950
+ },
951
+ "/api/v1/scoper/subject-data": {
952
+ "post": {
953
+ "operationId": "scoperSubjectData",
954
+ "summary": "Read one subject's content through Scoper",
955
+ "description": "Body is recordId, objectType, and contentType. Optional alsoContentTypes, sourceContentTypes, include, properties, exclude, and useMarkdown. Scope headers select the org and agents.",
956
+ "parameters": [
957
+ {
958
+ "$ref": "#/components/parameters/ScopeHeaders"
959
+ }
960
+ ],
961
+ "responses": {
962
+ "200": {
963
+ "description": "Subject data"
964
+ },
965
+ "400": {
966
+ "description": "INVALID_REQUEST"
967
+ },
968
+ "404": {
969
+ "description": "READ_NOT_FOUND"
970
+ }
971
+ }
972
+ }
973
+ },
974
+ "/api/v1/mcp/scoper": {
975
+ "get": {
976
+ "operationId": "scoperMcpAdvertise",
977
+ "summary": "Advertise memorix-scoper",
978
+ "parameters": [
979
+ {
980
+ "$ref": "#/components/parameters/ScopeHeaders"
981
+ }
982
+ ],
983
+ "responses": {
984
+ "200": {
985
+ "description": "Advertise document. mcpUrl is this API."
986
+ }
987
+ }
988
+ },
989
+ "post": {
990
+ "operationId": "scoperMcpCall",
991
+ "summary": "JSON-RPC for memorix-scoper",
992
+ "description": "Methods: initialize, ping, tools/list, tools/call, notifications. Tools: catalog, subjects_list, subjects_query, subject_data, scope.",
993
+ "parameters": [
994
+ {
995
+ "$ref": "#/components/parameters/ScopeHeaders"
996
+ }
997
+ ],
998
+ "responses": {
999
+ "200": {
1000
+ "description": "JSON-RPC result"
1001
+ }
1002
+ }
1003
+ }
1004
+ },
1005
+ "/api/v1/mcp/mgc": {
1006
+ "get": {
1007
+ "operationId": "mgcMcpAdvertise",
1008
+ "summary": "Advertise memorix-mgc",
1009
+ "parameters": [
1010
+ {
1011
+ "$ref": "#/components/parameters/ScopeHeaders"
1012
+ }
1013
+ ],
1014
+ "responses": {
1015
+ "200": {
1016
+ "description": "MGC advertise"
1017
+ },
1018
+ "404": {
1019
+ "description": "MGC URL is not configured"
1020
+ }
1021
+ }
1022
+ },
1023
+ "post": {
1024
+ "operationId": "mgcMcpCall",
1025
+ "summary": "JSON-RPC for the MGC connector MCP",
1026
+ "description": "Forwards to the MGC source host /mcp. Stable fetch tools include mgc_list_connectors, mgc_describe_connector, and mgc_fetch.",
1027
+ "parameters": [
1028
+ {
1029
+ "$ref": "#/components/parameters/ScopeHeaders"
1030
+ }
1031
+ ],
1032
+ "responses": {
1033
+ "200": {
1034
+ "description": "JSON-RPC result"
1035
+ },
1036
+ "404": {
1037
+ "description": "MGC URL is not configured"
1038
+ }
1039
+ }
1040
+ }
1041
+ },
1042
+ "/ready": {
1043
+ "get": {
1044
+ "operationId": "ready",
1045
+ "summary": "200 when this process can reach Memorix, 503 otherwise. No token",
1046
+ "responses": {
1047
+ "200": {
1048
+ "description": "OK",
1049
+ "content": {
1050
+ "application/json": {
1051
+ "schema": {
1052
+ "type": "object",
1053
+ "additionalProperties": true
1054
+ }
1055
+ }
1056
+ }
1057
+ },
1058
+ "503": {
1059
+ "description": "Memorix down",
1060
+ "content": {
1061
+ "application/json": {
1062
+ "schema": {
1063
+ "type": "object",
1064
+ "additionalProperties": true
1065
+ }
1066
+ }
1067
+ }
1068
+ }
1069
+ }
1070
+ }
1071
+ },
1072
+ "/api/v1/capabilities": {
1073
+ "get": {
1074
+ "operationId": "capabilities",
1075
+ "summary": "Contract id, revision, feature flags, and limits. Takes the token and caller, not an org or agents",
1076
+ "responses": {
1077
+ "200": {
1078
+ "description": "OK",
1079
+ "content": {
1080
+ "application/json": {
1081
+ "schema": {
1082
+ "$ref": "#/components/schemas/Capabilities"
1083
+ }
1084
+ }
1085
+ }
1086
+ },
1087
+ "401": {
1088
+ "description": "UNAUTHORIZED",
1089
+ "content": {
1090
+ "application/json": {
1091
+ "schema": {
1092
+ "$ref": "#/components/schemas/Error"
1093
+ }
1094
+ }
1095
+ }
1096
+ }
1097
+ }
1098
+ }
1099
+ },
1100
+ "/api/v1/organizations": {
1101
+ "get": {
1102
+ "operationId": "organizations",
1103
+ "summary": "Orgs on the verified token",
1104
+ "responses": {
1105
+ "200": {
1106
+ "description": "OK",
1107
+ "content": {
1108
+ "application/json": {
1109
+ "schema": {
1110
+ "type": "object",
1111
+ "additionalProperties": true
1112
+ }
1113
+ }
1114
+ }
1115
+ },
1116
+ "401": {
1117
+ "description": "UNAUTHORIZED",
1118
+ "content": {
1119
+ "application/json": {
1120
+ "schema": {
1121
+ "$ref": "#/components/schemas/Error"
1122
+ }
1123
+ }
1124
+ }
1125
+ }
1126
+ }
1127
+ }
1128
+ },
1129
+ "/api/v1/organization": {
1130
+ "get": {
1131
+ "operationId": "organization",
1132
+ "summary": "The selected org and its capabilities",
1133
+ "responses": {
1134
+ "200": {
1135
+ "description": "OK",
1136
+ "content": {
1137
+ "application/json": {
1138
+ "schema": {
1139
+ "type": "object",
1140
+ "additionalProperties": true
1141
+ }
1142
+ }
1143
+ }
1144
+ },
1145
+ "400": {
1146
+ "description": "SCOPE_INVALID, AGENT_UNKNOWN, VALIDATION",
1147
+ "content": {
1148
+ "application/json": {
1149
+ "schema": {
1150
+ "$ref": "#/components/schemas/Error"
1151
+ }
1152
+ }
1153
+ }
1154
+ },
1155
+ "401": {
1156
+ "description": "UNAUTHORIZED",
1157
+ "content": {
1158
+ "application/json": {
1159
+ "schema": {
1160
+ "$ref": "#/components/schemas/Error"
1161
+ }
1162
+ }
1163
+ }
1164
+ },
1165
+ "403": {
1166
+ "description": "SCOPE_FORBIDDEN, AGENT_NOT_DEPLOYED",
1167
+ "content": {
1168
+ "application/json": {
1169
+ "schema": {
1170
+ "$ref": "#/components/schemas/Error"
1171
+ }
1172
+ }
1173
+ }
1174
+ },
1175
+ "503": {
1176
+ "description": "UPSTREAM_UNAVAILABLE",
1177
+ "content": {
1178
+ "application/json": {
1179
+ "schema": {
1180
+ "$ref": "#/components/schemas/Error"
1181
+ }
1182
+ }
1183
+ }
1184
+ },
1185
+ "504": {
1186
+ "description": "UPSTREAM_TIMEOUT",
1187
+ "content": {
1188
+ "application/json": {
1189
+ "schema": {
1190
+ "$ref": "#/components/schemas/Error"
1191
+ }
1192
+ }
1193
+ }
1194
+ }
1195
+ }
1196
+ }
1197
+ },
1198
+ "/api/v1/agents": {
1199
+ "get": {
1200
+ "operationId": "agents",
1201
+ "summary": "Agents deployed for the org, or installed on the platform",
1202
+ "parameters": [
1203
+ {
1204
+ "name": "deployment",
1205
+ "in": "query",
1206
+ "required": false,
1207
+ "description": "org (default) or platform",
1208
+ "schema": {
1209
+ "type": "string",
1210
+ "enum": [
1211
+ "org",
1212
+ "platform"
1213
+ ]
1214
+ }
1215
+ }
1216
+ ],
1217
+ "responses": {
1218
+ "200": {
1219
+ "description": "OK",
1220
+ "content": {
1221
+ "application/json": {
1222
+ "schema": {
1223
+ "type": "object",
1224
+ "additionalProperties": true
1225
+ }
1226
+ }
1227
+ }
1228
+ },
1229
+ "400": {
1230
+ "description": "SCOPE_INVALID, AGENT_UNKNOWN, VALIDATION",
1231
+ "content": {
1232
+ "application/json": {
1233
+ "schema": {
1234
+ "$ref": "#/components/schemas/Error"
1235
+ }
1236
+ }
1237
+ }
1238
+ },
1239
+ "401": {
1240
+ "description": "UNAUTHORIZED",
1241
+ "content": {
1242
+ "application/json": {
1243
+ "schema": {
1244
+ "$ref": "#/components/schemas/Error"
1245
+ }
1246
+ }
1247
+ }
1248
+ },
1249
+ "403": {
1250
+ "description": "SCOPE_FORBIDDEN, AGENT_NOT_DEPLOYED",
1251
+ "content": {
1252
+ "application/json": {
1253
+ "schema": {
1254
+ "$ref": "#/components/schemas/Error"
1255
+ }
1256
+ }
1257
+ }
1258
+ },
1259
+ "501": {
1260
+ "description": "CAPABILITY_UNAVAILABLE orgAgents",
1261
+ "content": {
1262
+ "application/json": {
1263
+ "schema": {
1264
+ "$ref": "#/components/schemas/Error"
1265
+ }
1266
+ }
1267
+ }
1268
+ },
1269
+ "503": {
1270
+ "description": "UPSTREAM_UNAVAILABLE",
1271
+ "content": {
1272
+ "application/json": {
1273
+ "schema": {
1274
+ "$ref": "#/components/schemas/Error"
1275
+ }
1276
+ }
1277
+ }
1278
+ },
1279
+ "504": {
1280
+ "description": "UPSTREAM_TIMEOUT",
1281
+ "content": {
1282
+ "application/json": {
1283
+ "schema": {
1284
+ "$ref": "#/components/schemas/Error"
1285
+ }
1286
+ }
1287
+ }
1288
+ }
1289
+ }
1290
+ }
1291
+ },
1292
+ "/api/v1/mapping": {
1293
+ "get": {
1294
+ "operationId": "mapping",
1295
+ "summary": "Declared structure and observed counts for the org and agents",
1296
+ "parameters": [
1297
+ {
1298
+ "$ref": "#/components/parameters/ScopeHeaders"
1299
+ },
1300
+ {
1301
+ "name": "include",
1302
+ "in": "query",
1303
+ "required": false,
1304
+ "description": "Comma-separated subset of counts, relationships, functions, sources. Default all",
1305
+ "schema": {
1306
+ "type": "string"
1307
+ }
1308
+ },
1309
+ {
1310
+ "name": "onlyPresent",
1311
+ "in": "query",
1312
+ "required": false,
1313
+ "description": "true drops exact-zero object types and content types",
1314
+ "schema": {
1315
+ "type": "boolean"
1316
+ }
1317
+ },
1318
+ {
1319
+ "name": "refresh",
1320
+ "in": "query",
1321
+ "required": false,
1322
+ "description": "true reads the census again",
1323
+ "schema": {
1324
+ "type": "boolean"
1325
+ }
1326
+ },
1327
+ {
1328
+ "name": "If-None-Match",
1329
+ "in": "header",
1330
+ "required": false,
1331
+ "description": "ETag from a previous response. A match is 304",
1332
+ "schema": {
1333
+ "type": "string"
1334
+ }
1335
+ }
1336
+ ],
1337
+ "responses": {
1338
+ "200": {
1339
+ "description": "OK",
1340
+ "content": {
1341
+ "application/json": {
1342
+ "schema": {
1343
+ "$ref": "#/components/schemas/Mapping"
1344
+ }
1345
+ }
1346
+ }
1347
+ },
1348
+ "304": {
1349
+ "description": "Not modified; empty body"
1350
+ },
1351
+ "400": {
1352
+ "description": "SCOPE_INVALID, AGENT_UNKNOWN, VALIDATION",
1353
+ "content": {
1354
+ "application/json": {
1355
+ "schema": {
1356
+ "$ref": "#/components/schemas/Error"
1357
+ }
1358
+ }
1359
+ }
1360
+ },
1361
+ "401": {
1362
+ "description": "UNAUTHORIZED",
1363
+ "content": {
1364
+ "application/json": {
1365
+ "schema": {
1366
+ "$ref": "#/components/schemas/Error"
1367
+ }
1368
+ }
1369
+ }
1370
+ },
1371
+ "403": {
1372
+ "description": "SCOPE_FORBIDDEN, AGENT_NOT_DEPLOYED",
1373
+ "content": {
1374
+ "application/json": {
1375
+ "schema": {
1376
+ "$ref": "#/components/schemas/Error"
1377
+ }
1378
+ }
1379
+ }
1380
+ },
1381
+ "503": {
1382
+ "description": "UPSTREAM_UNAVAILABLE",
1383
+ "content": {
1384
+ "application/json": {
1385
+ "schema": {
1386
+ "$ref": "#/components/schemas/Error"
1387
+ }
1388
+ }
1389
+ }
1390
+ },
1391
+ "504": {
1392
+ "description": "UPSTREAM_TIMEOUT",
1393
+ "content": {
1394
+ "application/json": {
1395
+ "schema": {
1396
+ "$ref": "#/components/schemas/Error"
1397
+ }
1398
+ }
1399
+ }
1400
+ }
1401
+ }
1402
+ }
1403
+ },
1404
+ "/api/v1/census": {
1405
+ "get": {
1406
+ "operationId": "census",
1407
+ "summary": "Counts for every declared pair, plus relationship totals and pairs",
1408
+ "parameters": [
1409
+ {
1410
+ "$ref": "#/components/parameters/ScopeHeaders"
1411
+ },
1412
+ {
1413
+ "name": "refresh",
1414
+ "in": "query",
1415
+ "required": false,
1416
+ "description": "true reads the census again",
1417
+ "schema": {
1418
+ "type": "boolean"
1419
+ }
1420
+ },
1421
+ {
1422
+ "name": "If-None-Match",
1423
+ "in": "header",
1424
+ "required": false,
1425
+ "description": "ETag from a previous response. A match is 304",
1426
+ "schema": {
1427
+ "type": "string"
1428
+ }
1429
+ }
1430
+ ],
1431
+ "responses": {
1432
+ "200": {
1433
+ "description": "OK",
1434
+ "content": {
1435
+ "application/json": {
1436
+ "schema": {
1437
+ "type": "object",
1438
+ "additionalProperties": true
1439
+ }
1440
+ }
1441
+ }
1442
+ },
1443
+ "304": {
1444
+ "description": "Not modified; empty body"
1445
+ },
1446
+ "400": {
1447
+ "description": "SCOPE_INVALID, AGENT_UNKNOWN, VALIDATION",
1448
+ "content": {
1449
+ "application/json": {
1450
+ "schema": {
1451
+ "$ref": "#/components/schemas/Error"
1452
+ }
1453
+ }
1454
+ }
1455
+ },
1456
+ "401": {
1457
+ "description": "UNAUTHORIZED",
1458
+ "content": {
1459
+ "application/json": {
1460
+ "schema": {
1461
+ "$ref": "#/components/schemas/Error"
1462
+ }
1463
+ }
1464
+ }
1465
+ },
1466
+ "403": {
1467
+ "description": "SCOPE_FORBIDDEN, AGENT_NOT_DEPLOYED",
1468
+ "content": {
1469
+ "application/json": {
1470
+ "schema": {
1471
+ "$ref": "#/components/schemas/Error"
1472
+ }
1473
+ }
1474
+ }
1475
+ },
1476
+ "501": {
1477
+ "description": "CAPABILITY_UNAVAILABLE census",
1478
+ "content": {
1479
+ "application/json": {
1480
+ "schema": {
1481
+ "$ref": "#/components/schemas/Error"
1482
+ }
1483
+ }
1484
+ }
1485
+ },
1486
+ "503": {
1487
+ "description": "UPSTREAM_UNAVAILABLE",
1488
+ "content": {
1489
+ "application/json": {
1490
+ "schema": {
1491
+ "$ref": "#/components/schemas/Error"
1492
+ }
1493
+ }
1494
+ }
1495
+ },
1496
+ "504": {
1497
+ "description": "UPSTREAM_TIMEOUT",
1498
+ "content": {
1499
+ "application/json": {
1500
+ "schema": {
1501
+ "$ref": "#/components/schemas/Error"
1502
+ }
1503
+ }
1504
+ }
1505
+ }
1506
+ }
1507
+ }
1508
+ },
1509
+ "/api/v1/object-types/{objectType}/definitions": {
1510
+ "get": {
1511
+ "operationId": "objectTypeDefinitions",
1512
+ "summary": "Effective body, or both conflict bodies, with the resolution",
1513
+ "parameters": [
1514
+ {
1515
+ "$ref": "#/components/parameters/ScopeHeaders"
1516
+ },
1517
+ {
1518
+ "$ref": "#/components/parameters/ObjectType"
1519
+ }
1520
+ ],
1521
+ "responses": {
1522
+ "200": {
1523
+ "description": "OK",
1524
+ "content": {
1525
+ "application/json": {
1526
+ "schema": {
1527
+ "type": "object",
1528
+ "additionalProperties": true
1529
+ }
1530
+ }
1531
+ }
1532
+ },
1533
+ "400": {
1534
+ "description": "SCOPE_INVALID, AGENT_UNKNOWN, VALIDATION",
1535
+ "content": {
1536
+ "application/json": {
1537
+ "schema": {
1538
+ "$ref": "#/components/schemas/Error"
1539
+ }
1540
+ }
1541
+ }
1542
+ },
1543
+ "401": {
1544
+ "description": "UNAUTHORIZED",
1545
+ "content": {
1546
+ "application/json": {
1547
+ "schema": {
1548
+ "$ref": "#/components/schemas/Error"
1549
+ }
1550
+ }
1551
+ }
1552
+ },
1553
+ "403": {
1554
+ "description": "SCOPE_FORBIDDEN, AGENT_NOT_DEPLOYED",
1555
+ "content": {
1556
+ "application/json": {
1557
+ "schema": {
1558
+ "$ref": "#/components/schemas/Error"
1559
+ }
1560
+ }
1561
+ }
1562
+ },
1563
+ "404": {
1564
+ "description": "READ_NOT_FOUND",
1565
+ "content": {
1566
+ "application/json": {
1567
+ "schema": {
1568
+ "$ref": "#/components/schemas/Error"
1569
+ }
1570
+ }
1571
+ }
1572
+ },
1573
+ "503": {
1574
+ "description": "UPSTREAM_UNAVAILABLE",
1575
+ "content": {
1576
+ "application/json": {
1577
+ "schema": {
1578
+ "$ref": "#/components/schemas/Error"
1579
+ }
1580
+ }
1581
+ }
1582
+ },
1583
+ "504": {
1584
+ "description": "UPSTREAM_TIMEOUT",
1585
+ "content": {
1586
+ "application/json": {
1587
+ "schema": {
1588
+ "$ref": "#/components/schemas/Error"
1589
+ }
1590
+ }
1591
+ }
1592
+ }
1593
+ }
1594
+ }
1595
+ },
1596
+ "/api/v1/content": {
1597
+ "get": {
1598
+ "operationId": "content",
1599
+ "summary": "Rows of one object type and content type. With recordId, every current head of that record",
1600
+ "parameters": [
1601
+ {
1602
+ "$ref": "#/components/parameters/ScopeHeaders"
1603
+ },
1604
+ {
1605
+ "name": "objectType",
1606
+ "in": "query",
1607
+ "required": true,
1608
+ "description": "Object type",
1609
+ "schema": {
1610
+ "type": "string"
1611
+ }
1612
+ },
1613
+ {
1614
+ "name": "contentType",
1615
+ "in": "query",
1616
+ "required": true,
1617
+ "description": "Content type",
1618
+ "schema": {
1619
+ "type": "string"
1620
+ }
1621
+ },
1622
+ {
1623
+ "name": "recordId",
1624
+ "in": "query",
1625
+ "required": false,
1626
+ "description": "One record: every current head, ordered by discriminator value",
1627
+ "schema": {
1628
+ "type": "string"
1629
+ }
1630
+ },
1631
+ {
1632
+ "name": "discriminatorValue",
1633
+ "in": "query",
1634
+ "required": false,
1635
+ "description": "Keep the instance with this discriminator value",
1636
+ "schema": {
1637
+ "type": "string"
1638
+ }
1639
+ },
1640
+ {
1641
+ "name": "includeDeleted",
1642
+ "in": "query",
1643
+ "required": false,
1644
+ "description": "Include logically deleted heads",
1645
+ "schema": {
1646
+ "type": "boolean"
1647
+ }
1648
+ },
1649
+ {
1650
+ "name": "filter",
1651
+ "in": "query",
1652
+ "required": false,
1653
+ "description": "JSON array of { field, op, value }",
1654
+ "schema": {
1655
+ "type": "string"
1656
+ }
1657
+ },
1658
+ {
1659
+ "name": "sort",
1660
+ "in": "query",
1661
+ "required": false,
1662
+ "description": "JSON array of { field, direction }. Default recordId ascending, then the stored row key",
1663
+ "schema": {
1664
+ "type": "string"
1665
+ }
1666
+ },
1667
+ {
1668
+ "name": "limit",
1669
+ "in": "query",
1670
+ "required": false,
1671
+ "description": "1-200, default 50",
1672
+ "schema": {
1673
+ "type": "integer"
1674
+ }
1675
+ },
1676
+ {
1677
+ "name": "cursor",
1678
+ "in": "query",
1679
+ "required": false,
1680
+ "description": "pageInfo.nextCursor",
1681
+ "schema": {
1682
+ "type": "string"
1683
+ }
1684
+ },
1685
+ {
1686
+ "name": "refs",
1687
+ "in": "query",
1688
+ "required": false,
1689
+ "description": "status (default) or expand",
1690
+ "schema": {
1691
+ "type": "string"
1692
+ }
1693
+ },
1694
+ {
1695
+ "name": "include",
1696
+ "in": "query",
1697
+ "required": false,
1698
+ "description": "history",
1699
+ "schema": {
1700
+ "type": "string"
1701
+ }
1702
+ },
1703
+ {
1704
+ "name": "count",
1705
+ "in": "query",
1706
+ "required": false,
1707
+ "description": "true returns { count, countStatus } and no rows",
1708
+ "schema": {
1709
+ "type": "boolean"
1710
+ }
1711
+ }
1712
+ ],
1713
+ "responses": {
1714
+ "200": {
1715
+ "description": "OK",
1716
+ "content": {
1717
+ "application/json": {
1718
+ "schema": {
1719
+ "$ref": "#/components/schemas/ContentPage"
1720
+ }
1721
+ }
1722
+ }
1723
+ },
1724
+ "400": {
1725
+ "description": "SCOPE_INVALID, AGENT_UNKNOWN, VALIDATION",
1726
+ "content": {
1727
+ "application/json": {
1728
+ "schema": {
1729
+ "$ref": "#/components/schemas/Error"
1730
+ }
1731
+ }
1732
+ }
1733
+ },
1734
+ "401": {
1735
+ "description": "UNAUTHORIZED",
1736
+ "content": {
1737
+ "application/json": {
1738
+ "schema": {
1739
+ "$ref": "#/components/schemas/Error"
1740
+ }
1741
+ }
1742
+ }
1743
+ },
1744
+ "403": {
1745
+ "description": "SCOPE_FORBIDDEN, AGENT_NOT_DEPLOYED",
1746
+ "content": {
1747
+ "application/json": {
1748
+ "schema": {
1749
+ "$ref": "#/components/schemas/Error"
1750
+ }
1751
+ }
1752
+ }
1753
+ },
1754
+ "404": {
1755
+ "description": "READ_NOT_FOUND",
1756
+ "content": {
1757
+ "application/json": {
1758
+ "schema": {
1759
+ "$ref": "#/components/schemas/Error"
1760
+ }
1761
+ }
1762
+ }
1763
+ },
1764
+ "409": {
1765
+ "description": "METADATA_CONFLICT",
1766
+ "content": {
1767
+ "application/json": {
1768
+ "schema": {
1769
+ "$ref": "#/components/schemas/Error"
1770
+ }
1771
+ }
1772
+ }
1773
+ },
1774
+ "503": {
1775
+ "description": "UPSTREAM_UNAVAILABLE",
1776
+ "content": {
1777
+ "application/json": {
1778
+ "schema": {
1779
+ "$ref": "#/components/schemas/Error"
1780
+ }
1781
+ }
1782
+ }
1783
+ },
1784
+ "504": {
1785
+ "description": "UPSTREAM_TIMEOUT",
1786
+ "content": {
1787
+ "application/json": {
1788
+ "schema": {
1789
+ "$ref": "#/components/schemas/Error"
1790
+ }
1791
+ }
1792
+ }
1793
+ }
1794
+ }
1795
+ }
1796
+ },
1797
+ "/api/v1/content/{objectType}/{contentType}/{recordId}": {
1798
+ "get": {
1799
+ "operationId": "contentHead",
1800
+ "summary": "One current head. The record id is one segment with / as %2F",
1801
+ "parameters": [
1802
+ {
1803
+ "$ref": "#/components/parameters/ScopeHeaders"
1804
+ },
1805
+ {
1806
+ "name": "objectType",
1807
+ "in": "path",
1808
+ "required": true,
1809
+ "schema": {
1810
+ "type": "string"
1811
+ }
1812
+ },
1813
+ {
1814
+ "name": "contentType",
1815
+ "in": "path",
1816
+ "required": true,
1817
+ "schema": {
1818
+ "type": "string"
1819
+ }
1820
+ },
1821
+ {
1822
+ "name": "recordId",
1823
+ "in": "path",
1824
+ "required": true,
1825
+ "schema": {
1826
+ "type": "string"
1827
+ }
1828
+ },
1829
+ {
1830
+ "name": "discriminatorValue",
1831
+ "in": "query",
1832
+ "required": false,
1833
+ "description": "Required when the content type has a discriminator",
1834
+ "schema": {
1835
+ "type": "string"
1836
+ }
1837
+ },
1838
+ {
1839
+ "name": "includeDeleted",
1840
+ "in": "query",
1841
+ "required": false,
1842
+ "description": "",
1843
+ "schema": {
1844
+ "type": "boolean"
1845
+ }
1846
+ },
1847
+ {
1848
+ "name": "refs",
1849
+ "in": "query",
1850
+ "required": false,
1851
+ "description": "status (default) or expand",
1852
+ "schema": {
1853
+ "type": "string"
1854
+ }
1855
+ },
1856
+ {
1857
+ "name": "include",
1858
+ "in": "query",
1859
+ "required": false,
1860
+ "description": "history",
1861
+ "schema": {
1862
+ "type": "string"
1863
+ }
1864
+ }
1865
+ ],
1866
+ "responses": {
1867
+ "200": {
1868
+ "description": "OK",
1869
+ "content": {
1870
+ "application/json": {
1871
+ "schema": {
1872
+ "type": "object",
1873
+ "properties": {
1874
+ "scope": {
1875
+ "$ref": "#/components/schemas/Scope"
1876
+ },
1877
+ "row": {
1878
+ "$ref": "#/components/schemas/ContentRow"
1879
+ }
1880
+ }
1881
+ }
1882
+ }
1883
+ }
1884
+ },
1885
+ "400": {
1886
+ "description": "SCOPE_INVALID, AGENT_UNKNOWN, VALIDATION",
1887
+ "content": {
1888
+ "application/json": {
1889
+ "schema": {
1890
+ "$ref": "#/components/schemas/Error"
1891
+ }
1892
+ }
1893
+ }
1894
+ },
1895
+ "401": {
1896
+ "description": "UNAUTHORIZED",
1897
+ "content": {
1898
+ "application/json": {
1899
+ "schema": {
1900
+ "$ref": "#/components/schemas/Error"
1901
+ }
1902
+ }
1903
+ }
1904
+ },
1905
+ "403": {
1906
+ "description": "SCOPE_FORBIDDEN, AGENT_NOT_DEPLOYED",
1907
+ "content": {
1908
+ "application/json": {
1909
+ "schema": {
1910
+ "$ref": "#/components/schemas/Error"
1911
+ }
1912
+ }
1913
+ }
1914
+ },
1915
+ "404": {
1916
+ "description": "READ_NOT_FOUND with details.storedValues",
1917
+ "content": {
1918
+ "application/json": {
1919
+ "schema": {
1920
+ "$ref": "#/components/schemas/Error"
1921
+ }
1922
+ }
1923
+ }
1924
+ },
1925
+ "409": {
1926
+ "description": "METADATA_CONFLICT",
1927
+ "content": {
1928
+ "application/json": {
1929
+ "schema": {
1930
+ "$ref": "#/components/schemas/Error"
1931
+ }
1932
+ }
1933
+ }
1934
+ },
1935
+ "503": {
1936
+ "description": "UPSTREAM_UNAVAILABLE",
1937
+ "content": {
1938
+ "application/json": {
1939
+ "schema": {
1940
+ "$ref": "#/components/schemas/Error"
1941
+ }
1942
+ }
1943
+ }
1944
+ },
1945
+ "504": {
1946
+ "description": "UPSTREAM_TIMEOUT",
1947
+ "content": {
1948
+ "application/json": {
1949
+ "schema": {
1950
+ "$ref": "#/components/schemas/Error"
1951
+ }
1952
+ }
1953
+ }
1954
+ }
1955
+ }
1956
+ }
1957
+ },
1958
+ "/api/v1/relationships/definitions": {
1959
+ "get": {
1960
+ "operationId": "relationshipDefinitions",
1961
+ "summary": "Definitions with concrete pairs, cardinality, compilation, and link counts",
1962
+ "parameters": [
1963
+ {
1964
+ "$ref": "#/components/parameters/ScopeHeaders"
1965
+ }
1966
+ ],
1967
+ "responses": {
1968
+ "200": {
1969
+ "description": "OK",
1970
+ "content": {
1971
+ "application/json": {
1972
+ "schema": {
1973
+ "type": "object",
1974
+ "additionalProperties": true
1975
+ }
1976
+ }
1977
+ }
1978
+ },
1979
+ "400": {
1980
+ "description": "SCOPE_INVALID, AGENT_UNKNOWN, VALIDATION",
1981
+ "content": {
1982
+ "application/json": {
1983
+ "schema": {
1984
+ "$ref": "#/components/schemas/Error"
1985
+ }
1986
+ }
1987
+ }
1988
+ },
1989
+ "401": {
1990
+ "description": "UNAUTHORIZED",
1991
+ "content": {
1992
+ "application/json": {
1993
+ "schema": {
1994
+ "$ref": "#/components/schemas/Error"
1995
+ }
1996
+ }
1997
+ }
1998
+ },
1999
+ "403": {
2000
+ "description": "SCOPE_FORBIDDEN, AGENT_NOT_DEPLOYED",
2001
+ "content": {
2002
+ "application/json": {
2003
+ "schema": {
2004
+ "$ref": "#/components/schemas/Error"
2005
+ }
2006
+ }
2007
+ }
2008
+ },
2009
+ "503": {
2010
+ "description": "UPSTREAM_UNAVAILABLE",
2011
+ "content": {
2012
+ "application/json": {
2013
+ "schema": {
2014
+ "$ref": "#/components/schemas/Error"
2015
+ }
2016
+ }
2017
+ }
2018
+ },
2019
+ "504": {
2020
+ "description": "UPSTREAM_TIMEOUT",
2021
+ "content": {
2022
+ "application/json": {
2023
+ "schema": {
2024
+ "$ref": "#/components/schemas/Error"
2025
+ }
2026
+ }
2027
+ }
2028
+ }
2029
+ }
2030
+ }
2031
+ },
2032
+ "/api/v1/relationships": {
2033
+ "get": {
2034
+ "operationId": "relationships",
2035
+ "summary": "Stored links of one record, or counts per definition",
2036
+ "parameters": [
2037
+ {
2038
+ "$ref": "#/components/parameters/ScopeHeaders"
2039
+ },
2040
+ {
2041
+ "name": "recordId",
2042
+ "in": "query",
2043
+ "required": false,
2044
+ "description": "Required unless countOnly=true",
2045
+ "schema": {
2046
+ "type": "string"
2047
+ }
2048
+ },
2049
+ {
2050
+ "name": "direction",
2051
+ "in": "query",
2052
+ "required": false,
2053
+ "description": "forward, inverse, or both (default)",
2054
+ "schema": {
2055
+ "type": "string"
2056
+ }
2057
+ },
2058
+ {
2059
+ "name": "definitionId",
2060
+ "in": "query",
2061
+ "required": false,
2062
+ "description": "One or several, comma-separated",
2063
+ "schema": {
2064
+ "type": "string"
2065
+ }
2066
+ },
2067
+ {
2068
+ "name": "objectType",
2069
+ "in": "query",
2070
+ "required": false,
2071
+ "description": "Keep links whose other end is this object type",
2072
+ "schema": {
2073
+ "type": "string"
2074
+ }
2075
+ },
2076
+ {
2077
+ "name": "countOnly",
2078
+ "in": "query",
2079
+ "required": false,
2080
+ "description": "true returns counts and no links; requires definitionId",
2081
+ "schema": {
2082
+ "type": "boolean"
2083
+ }
2084
+ },
2085
+ {
2086
+ "name": "groupBy",
2087
+ "in": "query",
2088
+ "required": false,
2089
+ "description": "objectType adds pair counts",
2090
+ "schema": {
2091
+ "type": "string"
2092
+ }
2093
+ },
2094
+ {
2095
+ "name": "limit",
2096
+ "in": "query",
2097
+ "required": false,
2098
+ "description": "1-200, default 50",
2099
+ "schema": {
2100
+ "type": "integer"
2101
+ }
2102
+ },
2103
+ {
2104
+ "name": "cursor",
2105
+ "in": "query",
2106
+ "required": false,
2107
+ "description": "pageInfo.nextCursor",
2108
+ "schema": {
2109
+ "type": "string"
2110
+ }
2111
+ }
2112
+ ],
2113
+ "responses": {
2114
+ "200": {
2115
+ "description": "OK",
2116
+ "content": {
2117
+ "application/json": {
2118
+ "schema": {
2119
+ "type": "object",
2120
+ "additionalProperties": true
2121
+ }
2122
+ }
2123
+ }
2124
+ },
2125
+ "400": {
2126
+ "description": "SCOPE_INVALID, AGENT_UNKNOWN, VALIDATION",
2127
+ "content": {
2128
+ "application/json": {
2129
+ "schema": {
2130
+ "$ref": "#/components/schemas/Error"
2131
+ }
2132
+ }
2133
+ }
2134
+ },
2135
+ "401": {
2136
+ "description": "UNAUTHORIZED",
2137
+ "content": {
2138
+ "application/json": {
2139
+ "schema": {
2140
+ "$ref": "#/components/schemas/Error"
2141
+ }
2142
+ }
2143
+ }
2144
+ },
2145
+ "403": {
2146
+ "description": "SCOPE_FORBIDDEN, AGENT_NOT_DEPLOYED",
2147
+ "content": {
2148
+ "application/json": {
2149
+ "schema": {
2150
+ "$ref": "#/components/schemas/Error"
2151
+ }
2152
+ }
2153
+ }
2154
+ },
2155
+ "503": {
2156
+ "description": "UPSTREAM_UNAVAILABLE",
2157
+ "content": {
2158
+ "application/json": {
2159
+ "schema": {
2160
+ "$ref": "#/components/schemas/Error"
2161
+ }
2162
+ }
2163
+ }
2164
+ },
2165
+ "504": {
2166
+ "description": "UPSTREAM_TIMEOUT",
2167
+ "content": {
2168
+ "application/json": {
2169
+ "schema": {
2170
+ "$ref": "#/components/schemas/Error"
2171
+ }
2172
+ }
2173
+ }
2174
+ }
2175
+ }
2176
+ }
2177
+ },
2178
+ "/api/v1/sources": {
2179
+ "get": {
2180
+ "operationId": "sources",
2181
+ "summary": "Source catalog joined to the source census",
2182
+ "parameters": [
2183
+ {
2184
+ "$ref": "#/components/parameters/ScopeHeaders"
2185
+ }
2186
+ ],
2187
+ "responses": {
2188
+ "200": {
2189
+ "description": "OK",
2190
+ "content": {
2191
+ "application/json": {
2192
+ "schema": {
2193
+ "$ref": "#/components/schemas/SourcesDocument"
2194
+ }
2195
+ }
2196
+ }
2197
+ },
2198
+ "400": {
2199
+ "description": "SCOPE_INVALID, AGENT_UNKNOWN, VALIDATION",
2200
+ "content": {
2201
+ "application/json": {
2202
+ "schema": {
2203
+ "$ref": "#/components/schemas/Error"
2204
+ }
2205
+ }
2206
+ }
2207
+ },
2208
+ "401": {
2209
+ "description": "UNAUTHORIZED",
2210
+ "content": {
2211
+ "application/json": {
2212
+ "schema": {
2213
+ "$ref": "#/components/schemas/Error"
2214
+ }
2215
+ }
2216
+ }
2217
+ },
2218
+ "403": {
2219
+ "description": "SCOPE_FORBIDDEN, AGENT_NOT_DEPLOYED",
2220
+ "content": {
2221
+ "application/json": {
2222
+ "schema": {
2223
+ "$ref": "#/components/schemas/Error"
2224
+ }
2225
+ }
2226
+ }
2227
+ },
2228
+ "503": {
2229
+ "description": "UPSTREAM_UNAVAILABLE",
2230
+ "content": {
2231
+ "application/json": {
2232
+ "schema": {
2233
+ "$ref": "#/components/schemas/Error"
2234
+ }
2235
+ }
2236
+ }
2237
+ },
2238
+ "504": {
2239
+ "description": "UPSTREAM_TIMEOUT",
2240
+ "content": {
2241
+ "application/json": {
2242
+ "schema": {
2243
+ "$ref": "#/components/schemas/Error"
2244
+ }
2245
+ }
2246
+ }
2247
+ }
2248
+ }
2249
+ }
2250
+ },
2251
+ "/api/v1/sources/{sourceId}": {
2252
+ "get": {
2253
+ "operationId": "source",
2254
+ "summary": "One source with recent runs",
2255
+ "parameters": [
2256
+ {
2257
+ "$ref": "#/components/parameters/ScopeHeaders"
2258
+ },
2259
+ {
2260
+ "name": "sourceId",
2261
+ "in": "path",
2262
+ "required": true,
2263
+ "schema": {
2264
+ "type": "string"
2265
+ }
2266
+ }
2267
+ ],
2268
+ "responses": {
2269
+ "200": {
2270
+ "description": "OK",
2271
+ "content": {
2272
+ "application/json": {
2273
+ "schema": {
2274
+ "type": "object",
2275
+ "additionalProperties": true
2276
+ }
2277
+ }
2278
+ }
2279
+ },
2280
+ "400": {
2281
+ "description": "SCOPE_INVALID, AGENT_UNKNOWN, VALIDATION",
2282
+ "content": {
2283
+ "application/json": {
2284
+ "schema": {
2285
+ "$ref": "#/components/schemas/Error"
2286
+ }
2287
+ }
2288
+ }
2289
+ },
2290
+ "401": {
2291
+ "description": "UNAUTHORIZED",
2292
+ "content": {
2293
+ "application/json": {
2294
+ "schema": {
2295
+ "$ref": "#/components/schemas/Error"
2296
+ }
2297
+ }
2298
+ }
2299
+ },
2300
+ "403": {
2301
+ "description": "SCOPE_FORBIDDEN, AGENT_NOT_DEPLOYED",
2302
+ "content": {
2303
+ "application/json": {
2304
+ "schema": {
2305
+ "$ref": "#/components/schemas/Error"
2306
+ }
2307
+ }
2308
+ }
2309
+ },
2310
+ "404": {
2311
+ "description": "READ_NOT_FOUND",
2312
+ "content": {
2313
+ "application/json": {
2314
+ "schema": {
2315
+ "$ref": "#/components/schemas/Error"
2316
+ }
2317
+ }
2318
+ }
2319
+ },
2320
+ "503": {
2321
+ "description": "UPSTREAM_UNAVAILABLE",
2322
+ "content": {
2323
+ "application/json": {
2324
+ "schema": {
2325
+ "$ref": "#/components/schemas/Error"
2326
+ }
2327
+ }
2328
+ }
2329
+ },
2330
+ "504": {
2331
+ "description": "UPSTREAM_TIMEOUT",
2332
+ "content": {
2333
+ "application/json": {
2334
+ "schema": {
2335
+ "$ref": "#/components/schemas/Error"
2336
+ }
2337
+ }
2338
+ }
2339
+ }
2340
+ }
2341
+ }
2342
+ },
2343
+ "/api/v1/planning/items": {
2344
+ "get": {
2345
+ "operationId": "planningList",
2346
+ "summary": "Planning items of the org. Agent header optional; it only changes targetState",
2347
+ "parameters": [
2348
+ {
2349
+ "name": "stage",
2350
+ "in": "query",
2351
+ "required": false,
2352
+ "description": "",
2353
+ "schema": {
2354
+ "type": "string"
2355
+ }
2356
+ },
2357
+ {
2358
+ "name": "priority",
2359
+ "in": "query",
2360
+ "required": false,
2361
+ "description": "",
2362
+ "schema": {
2363
+ "type": "string"
2364
+ }
2365
+ },
2366
+ {
2367
+ "name": "assignee",
2368
+ "in": "query",
2369
+ "required": false,
2370
+ "description": "Assignee id or unassigned",
2371
+ "schema": {
2372
+ "type": "string"
2373
+ }
2374
+ },
2375
+ {
2376
+ "name": "objectType",
2377
+ "in": "query",
2378
+ "required": false,
2379
+ "description": "",
2380
+ "schema": {
2381
+ "type": "string"
2382
+ }
2383
+ },
2384
+ {
2385
+ "name": "contentType",
2386
+ "in": "query",
2387
+ "required": false,
2388
+ "description": "",
2389
+ "schema": {
2390
+ "type": "string"
2391
+ }
2392
+ },
2393
+ {
2394
+ "name": "definitionId",
2395
+ "in": "query",
2396
+ "required": false,
2397
+ "description": "",
2398
+ "schema": {
2399
+ "type": "string"
2400
+ }
2401
+ },
2402
+ {
2403
+ "name": "archived",
2404
+ "in": "query",
2405
+ "required": false,
2406
+ "description": "Default false",
2407
+ "schema": {
2408
+ "type": "boolean"
2409
+ }
2410
+ },
2411
+ {
2412
+ "name": "limit",
2413
+ "in": "query",
2414
+ "required": false,
2415
+ "description": "",
2416
+ "schema": {
2417
+ "type": "integer"
2418
+ }
2419
+ },
2420
+ {
2421
+ "name": "cursor",
2422
+ "in": "query",
2423
+ "required": false,
2424
+ "description": "",
2425
+ "schema": {
2426
+ "type": "string"
2427
+ }
2428
+ }
2429
+ ],
2430
+ "responses": {
2431
+ "200": {
2432
+ "description": "OK",
2433
+ "content": {
2434
+ "application/json": {
2435
+ "schema": {
2436
+ "$ref": "#/components/schemas/PlanningList"
2437
+ }
2438
+ }
2439
+ }
2440
+ },
2441
+ "400": {
2442
+ "description": "SCOPE_INVALID, AGENT_UNKNOWN, VALIDATION",
2443
+ "content": {
2444
+ "application/json": {
2445
+ "schema": {
2446
+ "$ref": "#/components/schemas/Error"
2447
+ }
2448
+ }
2449
+ }
2450
+ },
2451
+ "401": {
2452
+ "description": "UNAUTHORIZED",
2453
+ "content": {
2454
+ "application/json": {
2455
+ "schema": {
2456
+ "$ref": "#/components/schemas/Error"
2457
+ }
2458
+ }
2459
+ }
2460
+ },
2461
+ "403": {
2462
+ "description": "SCOPE_FORBIDDEN, AGENT_NOT_DEPLOYED",
2463
+ "content": {
2464
+ "application/json": {
2465
+ "schema": {
2466
+ "$ref": "#/components/schemas/Error"
2467
+ }
2468
+ }
2469
+ }
2470
+ },
2471
+ "501": {
2472
+ "description": "CAPABILITY_UNAVAILABLE planning",
2473
+ "content": {
2474
+ "application/json": {
2475
+ "schema": {
2476
+ "$ref": "#/components/schemas/Error"
2477
+ }
2478
+ }
2479
+ }
2480
+ },
2481
+ "503": {
2482
+ "description": "UPSTREAM_UNAVAILABLE",
2483
+ "content": {
2484
+ "application/json": {
2485
+ "schema": {
2486
+ "$ref": "#/components/schemas/Error"
2487
+ }
2488
+ }
2489
+ }
2490
+ },
2491
+ "504": {
2492
+ "description": "UPSTREAM_TIMEOUT",
2493
+ "content": {
2494
+ "application/json": {
2495
+ "schema": {
2496
+ "$ref": "#/components/schemas/Error"
2497
+ }
2498
+ }
2499
+ }
2500
+ }
2501
+ }
2502
+ },
2503
+ "post": {
2504
+ "operationId": "planningCreate",
2505
+ "summary": "Create. A repeat clientKey returns the existing item with 200. Needs token feature memorix-planning-write",
2506
+ "requestBody": {
2507
+ "required": true,
2508
+ "content": {
2509
+ "application/json": {
2510
+ "schema": {
2511
+ "type": "object",
2512
+ "additionalProperties": true
2513
+ }
2514
+ }
2515
+ }
2516
+ },
2517
+ "responses": {
2518
+ "200": {
2519
+ "description": "Existing item for clientKey",
2520
+ "content": {
2521
+ "application/json": {
2522
+ "schema": {
2523
+ "$ref": "#/components/schemas/PlanningItemResponse"
2524
+ }
2525
+ }
2526
+ }
2527
+ },
2528
+ "201": {
2529
+ "description": "Created",
2530
+ "content": {
2531
+ "application/json": {
2532
+ "schema": {
2533
+ "$ref": "#/components/schemas/PlanningItemResponse"
2534
+ }
2535
+ }
2536
+ }
2537
+ },
2538
+ "403": {
2539
+ "description": "PLANNING_FORBIDDEN",
2540
+ "content": {
2541
+ "application/json": {
2542
+ "schema": {
2543
+ "$ref": "#/components/schemas/Error"
2544
+ }
2545
+ }
2546
+ }
2547
+ },
2548
+ "501": {
2549
+ "description": "CAPABILITY_UNAVAILABLE planning",
2550
+ "content": {
2551
+ "application/json": {
2552
+ "schema": {
2553
+ "$ref": "#/components/schemas/Error"
2554
+ }
2555
+ }
2556
+ }
2557
+ }
2558
+ }
2559
+ }
2560
+ },
2561
+ "/api/v1/planning/items/{itemId}": {
2562
+ "get": {
2563
+ "operationId": "planningGet",
2564
+ "summary": "One item. ETag is the quoted revision",
2565
+ "parameters": [
2566
+ {
2567
+ "name": "itemId",
2568
+ "in": "path",
2569
+ "required": true,
2570
+ "schema": {
2571
+ "type": "string"
2572
+ }
2573
+ },
2574
+ {
2575
+ "name": "If-None-Match",
2576
+ "in": "header",
2577
+ "required": false,
2578
+ "description": "ETag from a previous response. A match is 304",
2579
+ "schema": {
2580
+ "type": "string"
2581
+ }
2582
+ }
2583
+ ],
2584
+ "responses": {
2585
+ "200": {
2586
+ "description": "OK",
2587
+ "content": {
2588
+ "application/json": {
2589
+ "schema": {
2590
+ "$ref": "#/components/schemas/PlanningItemResponse"
2591
+ }
2592
+ }
2593
+ }
2594
+ },
2595
+ "304": {
2596
+ "description": "Not modified; empty body"
2597
+ },
2598
+ "404": {
2599
+ "description": "READ_NOT_FOUND",
2600
+ "content": {
2601
+ "application/json": {
2602
+ "schema": {
2603
+ "$ref": "#/components/schemas/Error"
2604
+ }
2605
+ }
2606
+ }
2607
+ }
2608
+ }
2609
+ },
2610
+ "patch": {
2611
+ "operationId": "planningUpdate",
2612
+ "summary": "Edit title, outcome, category, priority, assigneeId, or stage. If-Match required",
2613
+ "parameters": [
2614
+ {
2615
+ "name": "itemId",
2616
+ "in": "path",
2617
+ "required": true,
2618
+ "schema": {
2619
+ "type": "string"
2620
+ }
2621
+ },
2622
+ {
2623
+ "name": "If-Match",
2624
+ "in": "header",
2625
+ "required": false,
2626
+ "description": "Quoted item revision, for example \"3\"",
2627
+ "schema": {
2628
+ "type": "string"
2629
+ }
2630
+ }
2631
+ ],
2632
+ "requestBody": {
2633
+ "required": true,
2634
+ "content": {
2635
+ "application/json": {
2636
+ "schema": {
2637
+ "type": "object",
2638
+ "additionalProperties": true
2639
+ }
2640
+ }
2641
+ }
2642
+ },
2643
+ "responses": {
2644
+ "200": {
2645
+ "description": "OK",
2646
+ "content": {
2647
+ "application/json": {
2648
+ "schema": {
2649
+ "$ref": "#/components/schemas/PlanningItemResponse"
2650
+ }
2651
+ }
2652
+ }
2653
+ },
2654
+ "400": {
2655
+ "description": "VALIDATION, ASSIGNEE_UNKNOWN",
2656
+ "content": {
2657
+ "application/json": {
2658
+ "schema": {
2659
+ "$ref": "#/components/schemas/Error"
2660
+ }
2661
+ }
2662
+ }
2663
+ },
2664
+ "403": {
2665
+ "description": "PLANNING_FORBIDDEN",
2666
+ "content": {
2667
+ "application/json": {
2668
+ "schema": {
2669
+ "$ref": "#/components/schemas/Error"
2670
+ }
2671
+ }
2672
+ }
2673
+ },
2674
+ "409": {
2675
+ "description": "PLANNING_CONFLICT; error.current is the current item",
2676
+ "content": {
2677
+ "application/json": {
2678
+ "schema": {
2679
+ "$ref": "#/components/schemas/Error"
2680
+ }
2681
+ }
2682
+ }
2683
+ }
2684
+ }
2685
+ }
2686
+ },
2687
+ "/api/v1/planning/items/{itemId}/stage": {
2688
+ "post": {
2689
+ "operationId": "planningStage",
2690
+ "summary": "Move stage. If-Match required",
2691
+ "parameters": [
2692
+ {
2693
+ "name": "itemId",
2694
+ "in": "path",
2695
+ "required": true,
2696
+ "schema": {
2697
+ "type": "string"
2698
+ }
2699
+ },
2700
+ {
2701
+ "name": "If-Match",
2702
+ "in": "header",
2703
+ "required": false,
2704
+ "description": "Quoted item revision, for example \"3\"",
2705
+ "schema": {
2706
+ "type": "string"
2707
+ }
2708
+ }
2709
+ ],
2710
+ "requestBody": {
2711
+ "required": true,
2712
+ "content": {
2713
+ "application/json": {
2714
+ "schema": {
2715
+ "type": "object",
2716
+ "properties": {
2717
+ "stage": {
2718
+ "type": "string"
2719
+ }
2720
+ }
2721
+ }
2722
+ }
2723
+ }
2724
+ },
2725
+ "responses": {
2726
+ "200": {
2727
+ "description": "OK",
2728
+ "content": {
2729
+ "application/json": {
2730
+ "schema": {
2731
+ "$ref": "#/components/schemas/PlanningItemResponse"
2732
+ }
2733
+ }
2734
+ }
2735
+ },
2736
+ "409": {
2737
+ "description": "PLANNING_CONFLICT",
2738
+ "content": {
2739
+ "application/json": {
2740
+ "schema": {
2741
+ "$ref": "#/components/schemas/Error"
2742
+ }
2743
+ }
2744
+ }
2745
+ }
2746
+ }
2747
+ }
2748
+ },
2749
+ "/api/v1/planning/items/{itemId}/archive": {
2750
+ "post": {
2751
+ "operationId": "planningArchive",
2752
+ "summary": "archived true. If-Match optional, checked when sent",
2753
+ "parameters": [
2754
+ {
2755
+ "name": "itemId",
2756
+ "in": "path",
2757
+ "required": true,
2758
+ "schema": {
2759
+ "type": "string"
2760
+ }
2761
+ },
2762
+ {
2763
+ "name": "If-Match",
2764
+ "in": "header",
2765
+ "required": false,
2766
+ "description": "Quoted item revision, for example \"3\"",
2767
+ "schema": {
2768
+ "type": "string"
2769
+ }
2770
+ }
2771
+ ],
2772
+ "responses": {
2773
+ "200": {
2774
+ "description": "OK",
2775
+ "content": {
2776
+ "application/json": {
2777
+ "schema": {
2778
+ "$ref": "#/components/schemas/PlanningItemResponse"
2779
+ }
2780
+ }
2781
+ }
2782
+ },
2783
+ "409": {
2784
+ "description": "PLANNING_CONFLICT",
2785
+ "content": {
2786
+ "application/json": {
2787
+ "schema": {
2788
+ "$ref": "#/components/schemas/Error"
2789
+ }
2790
+ }
2791
+ }
2792
+ }
2793
+ }
2794
+ }
2795
+ },
2796
+ "/api/v1/planning/items/{itemId}/reopen": {
2797
+ "post": {
2798
+ "operationId": "planningReopen",
2799
+ "summary": "archived false, stage investigate. If-Match optional, checked when sent",
2800
+ "parameters": [
2801
+ {
2802
+ "name": "itemId",
2803
+ "in": "path",
2804
+ "required": true,
2805
+ "schema": {
2806
+ "type": "string"
2807
+ }
2808
+ },
2809
+ {
2810
+ "name": "If-Match",
2811
+ "in": "header",
2812
+ "required": false,
2813
+ "description": "Quoted item revision, for example \"3\"",
2814
+ "schema": {
2815
+ "type": "string"
2816
+ }
2817
+ }
2818
+ ],
2819
+ "responses": {
2820
+ "200": {
2821
+ "description": "OK",
2822
+ "content": {
2823
+ "application/json": {
2824
+ "schema": {
2825
+ "$ref": "#/components/schemas/PlanningItemResponse"
2826
+ }
2827
+ }
2828
+ }
2829
+ },
2830
+ "409": {
2831
+ "description": "PLANNING_CONFLICT",
2832
+ "content": {
2833
+ "application/json": {
2834
+ "schema": {
2835
+ "$ref": "#/components/schemas/Error"
2836
+ }
2837
+ }
2838
+ }
2839
+ }
2840
+ }
2841
+ }
2842
+ },
2843
+ "/api/v1/planning/assignees": {
2844
+ "get": {
2845
+ "operationId": "planningAssignees",
2846
+ "summary": "Assignee options; unassigned (id null) is always present",
2847
+ "responses": {
2848
+ "200": {
2849
+ "description": "OK",
2850
+ "content": {
2851
+ "application/json": {
2852
+ "schema": {
2853
+ "type": "object",
2854
+ "additionalProperties": true
2855
+ }
2856
+ }
2857
+ }
2858
+ }
2859
+ }
2860
+ }
2861
+ }
2862
+ },
2863
+ "components": {
2864
+ "parameters": {
2865
+ "ScopeHeaders": {
2866
+ "name": "scope",
2867
+ "in": "header",
2868
+ "required": true,
2869
+ "description": "Send x-memorix-org-id, x-memorix-agent-ids (comma-separated), and x-memorix-caller on every /api/v1 call.",
2870
+ "schema": {
2871
+ "type": "string"
2872
+ }
2873
+ },
2874
+ "ObjectType": {
2875
+ "name": "objectType",
2876
+ "in": "path",
2877
+ "required": true,
2878
+ "schema": {
2879
+ "type": "string"
2880
+ }
2881
+ },
2882
+ "ContentType": {
2883
+ "name": "contentType",
2884
+ "in": "path",
2885
+ "required": true,
2886
+ "schema": {
2887
+ "type": "string"
2888
+ }
2889
+ }
2890
+ },
2891
+ "schemas": {
2892
+ "Error": {
2893
+ "type": "object",
2894
+ "required": [
2895
+ "error"
2896
+ ],
2897
+ "properties": {
2898
+ "error": {
2899
+ "type": "object",
2900
+ "required": [
2901
+ "code",
2902
+ "message",
2903
+ "retryable"
2904
+ ],
2905
+ "properties": {
2906
+ "code": {
2907
+ "type": "string"
2908
+ },
2909
+ "message": {
2910
+ "type": "string"
2911
+ },
2912
+ "requestId": {
2913
+ "type": "string"
2914
+ },
2915
+ "retryable": {
2916
+ "type": "boolean"
2917
+ },
2918
+ "feature": {
2919
+ "type": "string",
2920
+ "description": "Capability flag that is off, on 501 CAPABILITY_UNAVAILABLE"
2921
+ },
2922
+ "details": {
2923
+ "type": "object",
2924
+ "additionalProperties": true
2925
+ },
2926
+ "current": {
2927
+ "$ref": "#/components/schemas/PlanningItem",
2928
+ "description": "Current item on 409 PLANNING_CONFLICT"
2929
+ }
2930
+ }
2931
+ }
2932
+ }
2933
+ },
2934
+ "Scope": {
2935
+ "type": "object",
2936
+ "properties": {
2937
+ "orgId": {
2938
+ "type": "string"
2939
+ },
2940
+ "caller": {
2941
+ "type": "string"
2942
+ },
2943
+ "requestedAgentIds": {
2944
+ "type": "array",
2945
+ "items": {
2946
+ "type": "string"
2947
+ }
2948
+ },
2949
+ "agentSelection": {
2950
+ "type": "string",
2951
+ "enum": [
2952
+ "explicit",
2953
+ "wildcard",
2954
+ "implicit"
2955
+ ]
2956
+ },
2957
+ "agentIds": {
2958
+ "type": "array",
2959
+ "items": {
2960
+ "type": "string"
2961
+ }
2962
+ },
2963
+ "deployedAgentIds": {
2964
+ "type": "array",
2965
+ "items": {
2966
+ "type": "string"
2967
+ }
2968
+ },
2969
+ "unresolvedAgentIds": {
2970
+ "type": "array",
2971
+ "items": {
2972
+ "type": "string"
2973
+ }
2974
+ }
2975
+ }
2976
+ },
2977
+ "PageInfo": {
2978
+ "type": "object",
2979
+ "required": [
2980
+ "complete"
2981
+ ],
2982
+ "properties": {
2983
+ "complete": {
2984
+ "type": "boolean"
2985
+ },
2986
+ "nextCursor": {
2987
+ "type": "string"
2988
+ },
2989
+ "limit": {
2990
+ "type": "integer"
2991
+ }
2992
+ }
2993
+ },
2994
+ "Count": {
2995
+ "type": "object",
2996
+ "required": [
2997
+ "status",
2998
+ "value"
2999
+ ],
3000
+ "properties": {
3001
+ "status": {
3002
+ "type": "string",
3003
+ "enum": [
3004
+ "exact",
3005
+ "estimated",
3006
+ "unavailable"
3007
+ ]
3008
+ },
3009
+ "value": {
3010
+ "type": "integer",
3011
+ "nullable": true
3012
+ },
3013
+ "reason": {
3014
+ "type": "string"
3015
+ },
3016
+ "retryable": {
3017
+ "type": "boolean"
3018
+ },
3019
+ "deletedExcluded": {
3020
+ "type": "boolean"
3021
+ },
3022
+ "versionSemantics": {
3023
+ "type": "string",
3024
+ "enum": [
3025
+ "current-head",
3026
+ "directory",
3027
+ "stored-links"
3028
+ ]
3029
+ },
3030
+ "method": {
3031
+ "type": "string"
3032
+ },
3033
+ "observedAt": {
3034
+ "type": "string",
3035
+ "format": "date-time"
3036
+ },
3037
+ "aggregated": {
3038
+ "type": "boolean"
3039
+ }
3040
+ }
3041
+ },
3042
+ "Gap": {
3043
+ "type": "object",
3044
+ "required": [
3045
+ "code",
3046
+ "category",
3047
+ "orgId",
3048
+ "agentIds",
3049
+ "retryable"
3050
+ ],
3051
+ "properties": {
3052
+ "code": {
3053
+ "type": "string"
3054
+ },
3055
+ "category": {
3056
+ "type": "string",
3057
+ "enum": [
3058
+ "empty",
3059
+ "directory-only",
3060
+ "not-measured",
3061
+ "estimated",
3062
+ "inaccessible",
3063
+ "resolution-failure",
3064
+ "unavailable",
3065
+ "stale"
3066
+ ]
3067
+ },
3068
+ "section": {
3069
+ "type": "string",
3070
+ "enum": [
3071
+ "counts",
3072
+ "relationships",
3073
+ "functions",
3074
+ "sources"
3075
+ ]
3076
+ },
3077
+ "orgId": {
3078
+ "type": "string"
3079
+ },
3080
+ "agentIds": {
3081
+ "type": "array",
3082
+ "items": {
3083
+ "type": "string"
3084
+ }
3085
+ },
3086
+ "objectType": {
3087
+ "type": "string"
3088
+ },
3089
+ "contentType": {
3090
+ "type": "string"
3091
+ },
3092
+ "definitionId": {
3093
+ "type": "string"
3094
+ },
3095
+ "sourceId": {
3096
+ "type": "string"
3097
+ },
3098
+ "message": {
3099
+ "type": "string"
3100
+ },
3101
+ "observedAt": {
3102
+ "type": "string"
3103
+ },
3104
+ "retryable": {
3105
+ "type": "boolean"
3106
+ },
3107
+ "evidence": {
3108
+ "type": "object",
3109
+ "additionalProperties": true
3110
+ }
3111
+ }
3112
+ },
3113
+ "Capabilities": {
3114
+ "type": "object",
3115
+ "properties": {
3116
+ "service": {
3117
+ "type": "string"
3118
+ },
3119
+ "api": {
3120
+ "type": "string"
3121
+ },
3122
+ "contract": {
3123
+ "type": "string",
3124
+ "example": "visualizer"
3125
+ },
3126
+ "contractRevision": {
3127
+ "type": "string",
3128
+ "example": "2026-10-24"
3129
+ },
3130
+ "features": {
3131
+ "type": "object",
3132
+ "additionalProperties": {
3133
+ "type": "boolean"
3134
+ }
3135
+ },
3136
+ "limits": {
3137
+ "type": "object",
3138
+ "additionalProperties": {
3139
+ "type": "integer"
3140
+ }
3141
+ },
3142
+ "rateLimit": {
3143
+ "nullable": true,
3144
+ "type": "object"
3145
+ }
3146
+ }
3147
+ },
3148
+ "SourcesDocument": {
3149
+ "type": "object",
3150
+ "required": [
3151
+ "status",
3152
+ "census",
3153
+ "sources",
3154
+ "attribution",
3155
+ "gaps"
3156
+ ],
3157
+ "properties": {
3158
+ "status": {
3159
+ "type": "string",
3160
+ "enum": [
3161
+ "complete",
3162
+ "partial",
3163
+ "unavailable"
3164
+ ]
3165
+ },
3166
+ "census": {
3167
+ "type": "object",
3168
+ "properties": {
3169
+ "status": {
3170
+ "type": "string",
3171
+ "enum": [
3172
+ "live",
3173
+ "backfilling",
3174
+ "disabled",
3175
+ "error",
3176
+ "unavailable"
3177
+ ]
3178
+ },
3179
+ "observedAt": {
3180
+ "type": "string",
3181
+ "nullable": true
3182
+ },
3183
+ "censusId": {
3184
+ "type": "string",
3185
+ "nullable": true
3186
+ }
3187
+ }
3188
+ },
3189
+ "sources": {
3190
+ "type": "array",
3191
+ "items": {
3192
+ "type": "object",
3193
+ "additionalProperties": true
3194
+ }
3195
+ },
3196
+ "attribution": {
3197
+ "type": "object",
3198
+ "additionalProperties": true
3199
+ },
3200
+ "gaps": {
3201
+ "type": "array",
3202
+ "items": {
3203
+ "$ref": "#/components/schemas/Gap"
3204
+ }
3205
+ }
3206
+ }
3207
+ },
3208
+ "Mapping": {
3209
+ "type": "object",
3210
+ "required": [
3211
+ "scope",
3212
+ "status",
3213
+ "observations",
3214
+ "metadata",
3215
+ "objectTypes",
3216
+ "gaps"
3217
+ ],
3218
+ "properties": {
3219
+ "scope": {
3220
+ "$ref": "#/components/schemas/Scope"
3221
+ },
3222
+ "status": {
3223
+ "type": "string",
3224
+ "enum": [
3225
+ "complete",
3226
+ "partial",
3227
+ "unavailable"
3228
+ ]
3229
+ },
3230
+ "observations": {
3231
+ "type": "object",
3232
+ "additionalProperties": true
3233
+ },
3234
+ "metadata": {
3235
+ "type": "object",
3236
+ "additionalProperties": true
3237
+ },
3238
+ "agents": {
3239
+ "type": "array",
3240
+ "items": {
3241
+ "type": "object",
3242
+ "additionalProperties": true
3243
+ }
3244
+ },
3245
+ "objectTypes": {
3246
+ "type": "array",
3247
+ "items": {
3248
+ "type": "object",
3249
+ "additionalProperties": true
3250
+ }
3251
+ },
3252
+ "relationshipDefinitions": {
3253
+ "type": "array",
3254
+ "items": {
3255
+ "type": "object",
3256
+ "additionalProperties": true
3257
+ }
3258
+ },
3259
+ "sources": {
3260
+ "$ref": "#/components/schemas/SourcesDocument"
3261
+ },
3262
+ "coverage": {
3263
+ "type": "object",
3264
+ "additionalProperties": true
3265
+ },
3266
+ "gaps": {
3267
+ "type": "array",
3268
+ "items": {
3269
+ "$ref": "#/components/schemas/Gap"
3270
+ }
3271
+ }
3272
+ }
3273
+ },
3274
+ "ContentRow": {
3275
+ "type": "object",
3276
+ "required": [
3277
+ "format",
3278
+ "recordId",
3279
+ "contentType",
3280
+ "revision",
3281
+ "head",
3282
+ "data",
3283
+ "source",
3284
+ "timestamps",
3285
+ "state",
3286
+ "history",
3287
+ "redactedMetadata",
3288
+ "descriptorCoverage",
3289
+ "undeclaredPaths"
3290
+ ],
3291
+ "properties": {
3292
+ "format": {
3293
+ "type": "string"
3294
+ },
3295
+ "recordId": {
3296
+ "type": "string"
3297
+ },
3298
+ "objectType": {
3299
+ "type": "string"
3300
+ },
3301
+ "contentType": {
3302
+ "type": "string"
3303
+ },
3304
+ "dataCategory": {
3305
+ "type": "string"
3306
+ },
3307
+ "revision": {
3308
+ "type": "integer",
3309
+ "nullable": true
3310
+ },
3311
+ "head": {
3312
+ "type": "boolean"
3313
+ },
3314
+ "discriminatorValue": {
3315
+ "type": "string",
3316
+ "nullable": true
3317
+ },
3318
+ "data": {},
3319
+ "source": {
3320
+ "type": "object",
3321
+ "additionalProperties": true
3322
+ },
3323
+ "timestamps": {
3324
+ "type": "object",
3325
+ "additionalProperties": true
3326
+ },
3327
+ "state": {
3328
+ "type": "string",
3329
+ "enum": [
3330
+ "active",
3331
+ "deleted"
3332
+ ]
3333
+ },
3334
+ "deletion": {
3335
+ "type": "object",
3336
+ "nullable": true,
3337
+ "additionalProperties": true
3338
+ },
3339
+ "history": {
3340
+ "type": "object",
3341
+ "additionalProperties": true
3342
+ },
3343
+ "metadata": {
3344
+ "type": "object",
3345
+ "additionalProperties": true
3346
+ },
3347
+ "redactedMetadata": {
3348
+ "type": "array",
3349
+ "items": {
3350
+ "type": "string"
3351
+ }
3352
+ },
3353
+ "descriptorCoverage": {
3354
+ "type": "string",
3355
+ "enum": [
3356
+ "complete",
3357
+ "partial",
3358
+ "none"
3359
+ ]
3360
+ },
3361
+ "undeclaredPaths": {
3362
+ "type": "array",
3363
+ "items": {
3364
+ "type": "string"
3365
+ }
3366
+ }
3367
+ }
3368
+ },
3369
+ "ContentPage": {
3370
+ "type": "object",
3371
+ "required": [
3372
+ "rows",
3373
+ "pageInfo"
3374
+ ],
3375
+ "properties": {
3376
+ "scope": {
3377
+ "$ref": "#/components/schemas/Scope"
3378
+ },
3379
+ "objectType": {
3380
+ "type": "string"
3381
+ },
3382
+ "contentType": {
3383
+ "type": "string"
3384
+ },
3385
+ "addressing": {
3386
+ "type": "object",
3387
+ "additionalProperties": true
3388
+ },
3389
+ "pageInfo": {
3390
+ "$ref": "#/components/schemas/PageInfo"
3391
+ },
3392
+ "truncated": {
3393
+ "type": "boolean"
3394
+ },
3395
+ "rows": {
3396
+ "type": "array",
3397
+ "items": {
3398
+ "$ref": "#/components/schemas/ContentRow"
3399
+ }
3400
+ }
3401
+ }
3402
+ },
3403
+ "RecordsPage": {
3404
+ "type": "object",
3405
+ "required": [
3406
+ "records",
3407
+ "pageInfo"
3408
+ ],
3409
+ "properties": {
3410
+ "scope": {
3411
+ "$ref": "#/components/schemas/Scope"
3412
+ },
3413
+ "objectType": {
3414
+ "type": "string"
3415
+ },
3416
+ "leadingContentType": {
3417
+ "type": "string"
3418
+ },
3419
+ "total": {
3420
+ "type": "integer",
3421
+ "nullable": true
3422
+ },
3423
+ "totalStatus": {
3424
+ "type": "string",
3425
+ "enum": [
3426
+ "exact",
3427
+ "unavailable"
3428
+ ]
3429
+ },
3430
+ "pageInfo": {
3431
+ "$ref": "#/components/schemas/PageInfo"
3432
+ },
3433
+ "truncated": {
3434
+ "type": "boolean"
3435
+ },
3436
+ "records": {
3437
+ "type": "array",
3438
+ "items": {
3439
+ "type": "object",
3440
+ "additionalProperties": true
3441
+ }
3442
+ },
3443
+ "items": {
3444
+ "type": "array",
3445
+ "description": "0.18.0 shape, kept for existing callers",
3446
+ "items": {
3447
+ "type": "object",
3448
+ "additionalProperties": true
3449
+ }
3450
+ }
3451
+ }
3452
+ },
3453
+ "PlanningItem": {
3454
+ "type": "object",
3455
+ "properties": {
3456
+ "id": {
3457
+ "type": "string"
3458
+ },
3459
+ "orgId": {
3460
+ "type": "string"
3461
+ },
3462
+ "title": {
3463
+ "type": "string"
3464
+ },
3465
+ "outcome": {
3466
+ "type": "string"
3467
+ },
3468
+ "target": {
3469
+ "type": "object",
3470
+ "additionalProperties": true
3471
+ },
3472
+ "targetState": {
3473
+ "type": "string",
3474
+ "enum": [
3475
+ "in-catalog",
3476
+ "not-in-catalog",
3477
+ "unknown"
3478
+ ]
3479
+ },
3480
+ "category": {
3481
+ "type": "string",
3482
+ "enum": [
3483
+ "data-gap",
3484
+ "visibility-gap",
3485
+ "unused-structure",
3486
+ "proposed-change"
3487
+ ]
3488
+ },
3489
+ "priority": {
3490
+ "type": "string",
3491
+ "enum": [
3492
+ "low",
3493
+ "medium",
3494
+ "high"
3495
+ ]
3496
+ },
3497
+ "assigneeId": {
3498
+ "type": "string",
3499
+ "nullable": true
3500
+ },
3501
+ "assignee": {
3502
+ "type": "object",
3503
+ "additionalProperties": true
3504
+ },
3505
+ "stage": {
3506
+ "type": "string",
3507
+ "enum": [
3508
+ "investigate",
3509
+ "plan-next",
3510
+ "later",
3511
+ "done"
3512
+ ]
3513
+ },
3514
+ "archived": {
3515
+ "type": "boolean"
3516
+ },
3517
+ "revision": {
3518
+ "type": "integer"
3519
+ },
3520
+ "createdBy": {
3521
+ "type": "string"
3522
+ },
3523
+ "createdAt": {
3524
+ "type": "string"
3525
+ },
3526
+ "updatedBy": {
3527
+ "type": "string"
3528
+ },
3529
+ "updatedAt": {
3530
+ "type": "string"
3531
+ },
3532
+ "evidence": {},
3533
+ "clientKey": {
3534
+ "type": "string"
3535
+ }
3536
+ }
3537
+ },
3538
+ "PlanningItemResponse": {
3539
+ "type": "object",
3540
+ "required": [
3541
+ "item"
3542
+ ],
3543
+ "properties": {
3544
+ "scope": {
3545
+ "$ref": "#/components/schemas/Scope"
3546
+ },
3547
+ "item": {
3548
+ "$ref": "#/components/schemas/PlanningItem"
3549
+ },
3550
+ "gaps": {
3551
+ "type": "array",
3552
+ "items": {
3553
+ "$ref": "#/components/schemas/Gap"
3554
+ }
3555
+ }
3556
+ }
3557
+ },
3558
+ "PlanningList": {
3559
+ "type": "object",
3560
+ "required": [
3561
+ "items",
3562
+ "pageInfo"
3563
+ ],
3564
+ "properties": {
3565
+ "scope": {
3566
+ "$ref": "#/components/schemas/Scope"
3567
+ },
3568
+ "items": {
3569
+ "type": "array",
3570
+ "items": {
3571
+ "$ref": "#/components/schemas/PlanningItem"
3572
+ }
3573
+ },
3574
+ "pageInfo": {
3575
+ "$ref": "#/components/schemas/PageInfo"
3576
+ },
3577
+ "gaps": {
3578
+ "type": "array",
3579
+ "items": {
3580
+ "$ref": "#/components/schemas/Gap"
3581
+ }
3582
+ }
3583
+ }
3584
+ }
3585
+ }
3586
+ }
3587
+ }