@arke-institute/sdk 2.3.9 → 2.3.11

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/openapi/spec.json CHANGED
@@ -2205,6 +2205,374 @@
2205
2205
  "truncated"
2206
2206
  ]
2207
2207
  },
2208
+ "VersionMeta": {
2209
+ "type": "object",
2210
+ "nullable": true,
2211
+ "properties": {
2212
+ "cid": {
2213
+ "type": "string",
2214
+ "minLength": 1,
2215
+ "description": "Content Identifier (CID) - content-addressed hash",
2216
+ "example": "bafyreibug443cnd4endcwinwttw3c3dzmcl2ikht64xzn5qg56bix3usfy"
2217
+ },
2218
+ "ver": {
2219
+ "type": "integer",
2220
+ "minimum": 0,
2221
+ "exclusiveMinimum": true,
2222
+ "description": "Entity version number",
2223
+ "example": 1
2224
+ },
2225
+ "ts": {
2226
+ "type": "string",
2227
+ "format": "date-time",
2228
+ "description": "ISO 8601 datetime",
2229
+ "example": "2025-12-26T12:00:00.000Z"
2230
+ }
2231
+ },
2232
+ "required": [
2233
+ "cid",
2234
+ "ver",
2235
+ "ts"
2236
+ ],
2237
+ "description": "Metadata about the \"from\" version (null for version 1)"
2238
+ },
2239
+ "PropertyChange": {
2240
+ "type": "object",
2241
+ "properties": {
2242
+ "from": {
2243
+ "nullable": true,
2244
+ "description": "Previous value"
2245
+ },
2246
+ "to": {
2247
+ "nullable": true,
2248
+ "description": "New value"
2249
+ }
2250
+ }
2251
+ },
2252
+ "PropertiesChanges": {
2253
+ "type": "object",
2254
+ "properties": {
2255
+ "added": {
2256
+ "type": "object",
2257
+ "additionalProperties": {
2258
+ "nullable": true
2259
+ },
2260
+ "description": "Properties that were added",
2261
+ "example": {
2262
+ "email": "new@example.com"
2263
+ }
2264
+ },
2265
+ "removed": {
2266
+ "type": "object",
2267
+ "additionalProperties": {
2268
+ "nullable": true
2269
+ },
2270
+ "description": "Properties that were removed (includes old values)",
2271
+ "example": {
2272
+ "deprecated_field": "old value"
2273
+ }
2274
+ },
2275
+ "changed": {
2276
+ "type": "object",
2277
+ "additionalProperties": {
2278
+ "$ref": "#/components/schemas/PropertyChange"
2279
+ },
2280
+ "description": "Properties that changed",
2281
+ "example": {
2282
+ "name": {
2283
+ "from": "Old Name",
2284
+ "to": "New Name"
2285
+ }
2286
+ }
2287
+ }
2288
+ },
2289
+ "required": [
2290
+ "added",
2291
+ "removed",
2292
+ "changed"
2293
+ ]
2294
+ },
2295
+ "RelationshipChange": {
2296
+ "type": "object",
2297
+ "properties": {
2298
+ "predicate": {
2299
+ "type": "string",
2300
+ "minLength": 1
2301
+ },
2302
+ "peer": {
2303
+ "type": "string",
2304
+ "minLength": 1
2305
+ },
2306
+ "peer_type": {
2307
+ "type": "string"
2308
+ },
2309
+ "peer_label": {
2310
+ "type": "string"
2311
+ },
2312
+ "properties": {
2313
+ "$ref": "#/components/schemas/PropertyChange"
2314
+ }
2315
+ },
2316
+ "required": [
2317
+ "predicate",
2318
+ "peer",
2319
+ "properties"
2320
+ ]
2321
+ },
2322
+ "RelationshipsChanges": {
2323
+ "type": "object",
2324
+ "properties": {
2325
+ "added": {
2326
+ "type": "array",
2327
+ "items": {
2328
+ "type": "object",
2329
+ "properties": {
2330
+ "predicate": {
2331
+ "type": "string",
2332
+ "minLength": 1
2333
+ },
2334
+ "peer": {
2335
+ "type": "string",
2336
+ "minLength": 1
2337
+ },
2338
+ "peer_type": {
2339
+ "type": "string"
2340
+ },
2341
+ "peer_label": {
2342
+ "type": "string"
2343
+ },
2344
+ "properties": {
2345
+ "type": "object",
2346
+ "additionalProperties": {
2347
+ "nullable": true
2348
+ }
2349
+ }
2350
+ },
2351
+ "required": [
2352
+ "predicate",
2353
+ "peer"
2354
+ ],
2355
+ "description": "Entity relationship",
2356
+ "example": {
2357
+ "predicate": "crew",
2358
+ "peer": "01KDETYWYWM0MJVKM8DK3AEXPY",
2359
+ "peer_type": "collection"
2360
+ }
2361
+ },
2362
+ "description": "Relationships that were added"
2363
+ },
2364
+ "removed": {
2365
+ "type": "array",
2366
+ "items": {
2367
+ "type": "object",
2368
+ "properties": {
2369
+ "predicate": {
2370
+ "type": "string",
2371
+ "minLength": 1
2372
+ },
2373
+ "peer": {
2374
+ "type": "string",
2375
+ "minLength": 1
2376
+ },
2377
+ "peer_type": {
2378
+ "type": "string"
2379
+ },
2380
+ "peer_label": {
2381
+ "type": "string"
2382
+ },
2383
+ "properties": {
2384
+ "type": "object",
2385
+ "additionalProperties": {
2386
+ "nullable": true
2387
+ }
2388
+ }
2389
+ },
2390
+ "required": [
2391
+ "predicate",
2392
+ "peer"
2393
+ ],
2394
+ "description": "Entity relationship",
2395
+ "example": {
2396
+ "predicate": "crew",
2397
+ "peer": "01KDETYWYWM0MJVKM8DK3AEXPY",
2398
+ "peer_type": "collection"
2399
+ }
2400
+ },
2401
+ "description": "Relationships that were removed"
2402
+ },
2403
+ "changed": {
2404
+ "type": "array",
2405
+ "items": {
2406
+ "$ref": "#/components/schemas/RelationshipChange"
2407
+ },
2408
+ "description": "Relationships with changed properties"
2409
+ }
2410
+ },
2411
+ "required": [
2412
+ "added",
2413
+ "removed",
2414
+ "changed"
2415
+ ]
2416
+ },
2417
+ "SemanticChanges": {
2418
+ "type": "object",
2419
+ "properties": {
2420
+ "properties": {
2421
+ "$ref": "#/components/schemas/PropertiesChanges"
2422
+ },
2423
+ "relationships": {
2424
+ "$ref": "#/components/schemas/RelationshipsChanges"
2425
+ }
2426
+ },
2427
+ "required": [
2428
+ "properties",
2429
+ "relationships"
2430
+ ]
2431
+ },
2432
+ "SemanticDiffResponse": {
2433
+ "type": "object",
2434
+ "properties": {
2435
+ "entity_id": {
2436
+ "type": "string",
2437
+ "pattern": "^(?:II[0-9A-HJKMNP-TV-Z]{24}|[FC][0-9A-HJKMNP-TV-Z]{25}|[0-9A-HJKMNP-TV-Z]{26})$",
2438
+ "description": "Entity ID (ULID format)",
2439
+ "example": "01KDETYWYWM0MJVKM8DK3AEXPY"
2440
+ },
2441
+ "from": {
2442
+ "$ref": "#/components/schemas/VersionMeta"
2443
+ },
2444
+ "to": {
2445
+ "$ref": "#/components/schemas/VersionMeta"
2446
+ },
2447
+ "format": {
2448
+ "type": "string",
2449
+ "enum": [
2450
+ "semantic"
2451
+ ]
2452
+ },
2453
+ "changes": {
2454
+ "$ref": "#/components/schemas/SemanticChanges"
2455
+ }
2456
+ },
2457
+ "required": [
2458
+ "entity_id",
2459
+ "from",
2460
+ "to",
2461
+ "format",
2462
+ "changes"
2463
+ ]
2464
+ },
2465
+ "PatchOperation": {
2466
+ "anyOf": [
2467
+ {
2468
+ "type": "object",
2469
+ "properties": {
2470
+ "op": {
2471
+ "type": "string",
2472
+ "enum": [
2473
+ "add"
2474
+ ]
2475
+ },
2476
+ "path": {
2477
+ "type": "string"
2478
+ },
2479
+ "value": {
2480
+ "nullable": true
2481
+ }
2482
+ },
2483
+ "required": [
2484
+ "op",
2485
+ "path"
2486
+ ]
2487
+ },
2488
+ {
2489
+ "type": "object",
2490
+ "properties": {
2491
+ "op": {
2492
+ "type": "string",
2493
+ "enum": [
2494
+ "remove"
2495
+ ]
2496
+ },
2497
+ "path": {
2498
+ "type": "string"
2499
+ }
2500
+ },
2501
+ "required": [
2502
+ "op",
2503
+ "path"
2504
+ ]
2505
+ },
2506
+ {
2507
+ "type": "object",
2508
+ "properties": {
2509
+ "op": {
2510
+ "type": "string",
2511
+ "enum": [
2512
+ "replace"
2513
+ ]
2514
+ },
2515
+ "path": {
2516
+ "type": "string"
2517
+ },
2518
+ "value": {
2519
+ "nullable": true
2520
+ }
2521
+ },
2522
+ "required": [
2523
+ "op",
2524
+ "path"
2525
+ ]
2526
+ }
2527
+ ]
2528
+ },
2529
+ "PatchDiffResponse": {
2530
+ "type": "object",
2531
+ "properties": {
2532
+ "entity_id": {
2533
+ "type": "string",
2534
+ "pattern": "^(?:II[0-9A-HJKMNP-TV-Z]{24}|[FC][0-9A-HJKMNP-TV-Z]{25}|[0-9A-HJKMNP-TV-Z]{26})$",
2535
+ "description": "Entity ID (ULID format)",
2536
+ "example": "01KDETYWYWM0MJVKM8DK3AEXPY"
2537
+ },
2538
+ "from": {
2539
+ "$ref": "#/components/schemas/VersionMeta"
2540
+ },
2541
+ "to": {
2542
+ "$ref": "#/components/schemas/VersionMeta"
2543
+ },
2544
+ "format": {
2545
+ "type": "string",
2546
+ "enum": [
2547
+ "patch"
2548
+ ]
2549
+ },
2550
+ "patch": {
2551
+ "type": "array",
2552
+ "items": {
2553
+ "$ref": "#/components/schemas/PatchOperation"
2554
+ },
2555
+ "description": "RFC 6902 JSON Patch operations"
2556
+ }
2557
+ },
2558
+ "required": [
2559
+ "entity_id",
2560
+ "from",
2561
+ "to",
2562
+ "format",
2563
+ "patch"
2564
+ ]
2565
+ },
2566
+ "DiffResponse": {
2567
+ "anyOf": [
2568
+ {
2569
+ "$ref": "#/components/schemas/SemanticDiffResponse"
2570
+ },
2571
+ {
2572
+ "$ref": "#/components/schemas/PatchDiffResponse"
2573
+ }
2574
+ ]
2575
+ },
2208
2576
  "AddRelationshipResponse": {
2209
2577
  "type": "object",
2210
2578
  "properties": {
@@ -8322,6 +8690,133 @@
8322
8690
  }
8323
8691
  }
8324
8692
  },
8693
+ "/entities/{id}/diff": {
8694
+ "get": {
8695
+ "tags": [
8696
+ "Entities",
8697
+ "Versions"
8698
+ ],
8699
+ "summary": "Get diff between entity versions",
8700
+ "description": "Computes the difference between two versions of an entity.\n\nQuery parameters:\n- `from`: CID of the \"from\" version (defaults to prev of \"to\" version)\n- `to`: CID of the \"to\" version (defaults to current tip)\n- `format`: Output format - \"semantic\" (default) or \"patch\" (RFC 6902)\n\nModes:\n- No params: Compare current tip with its previous version\n- `to` only: Compare that version with its prev\n- `from` only: Compare from that version to current tip\n- Both: Compare any two versions\n\nFor version 1 entities (no previous version), \"from\" is null and all content appears as added.",
8701
+ "x-arke-action": "entity:view",
8702
+ "x-arke-auth": "optional",
8703
+ "x-arke-tier": "standard",
8704
+ "parameters": [
8705
+ {
8706
+ "schema": {
8707
+ "type": "string",
8708
+ "pattern": "^(?:II[0-9A-HJKMNP-TV-Z]{24}|[FC][0-9A-HJKMNP-TV-Z]{25}|[0-9A-HJKMNP-TV-Z]{26})$",
8709
+ "description": "Entity ID (ULID format)",
8710
+ "example": "01KDETYWYWM0MJVKM8DK3AEXPY"
8711
+ },
8712
+ "required": true,
8713
+ "description": "Entity ID (ULID)",
8714
+ "name": "id",
8715
+ "in": "path"
8716
+ },
8717
+ {
8718
+ "schema": {
8719
+ "type": "string",
8720
+ "minLength": 1,
8721
+ "description": "Content Identifier (CID) - content-addressed hash",
8722
+ "example": "bafyreibug443cnd4endcwinwttw3c3dzmcl2ikht64xzn5qg56bix3usfy"
8723
+ },
8724
+ "required": false,
8725
+ "description": "CID of the \"from\" version. Defaults to prev of \"to\" version.",
8726
+ "name": "from",
8727
+ "in": "query"
8728
+ },
8729
+ {
8730
+ "schema": {
8731
+ "type": "string",
8732
+ "minLength": 1,
8733
+ "description": "Content Identifier (CID) - content-addressed hash",
8734
+ "example": "bafyreibug443cnd4endcwinwttw3c3dzmcl2ikht64xzn5qg56bix3usfy"
8735
+ },
8736
+ "required": false,
8737
+ "description": "CID of the \"to\" version. Defaults to current tip.",
8738
+ "name": "to",
8739
+ "in": "query"
8740
+ },
8741
+ {
8742
+ "schema": {
8743
+ "type": "string",
8744
+ "enum": [
8745
+ "semantic",
8746
+ "patch"
8747
+ ],
8748
+ "default": "semantic"
8749
+ },
8750
+ "required": false,
8751
+ "description": "Output format: \"semantic\" (default) or \"patch\" (RFC 6902)",
8752
+ "name": "format",
8753
+ "in": "query"
8754
+ }
8755
+ ],
8756
+ "responses": {
8757
+ "200": {
8758
+ "description": "Diff computed",
8759
+ "content": {
8760
+ "application/json": {
8761
+ "schema": {
8762
+ "$ref": "#/components/schemas/DiffResponse"
8763
+ }
8764
+ }
8765
+ }
8766
+ },
8767
+ "400": {
8768
+ "description": "Bad Request - Invalid input",
8769
+ "content": {
8770
+ "application/json": {
8771
+ "schema": {
8772
+ "$ref": "#/components/schemas/ValidationErrorResponse"
8773
+ },
8774
+ "example": {
8775
+ "error": "Validation failed",
8776
+ "details": {
8777
+ "issues": [
8778
+ {
8779
+ "path": [
8780
+ "properties",
8781
+ "label"
8782
+ ],
8783
+ "message": "Required"
8784
+ }
8785
+ ]
8786
+ }
8787
+ }
8788
+ }
8789
+ }
8790
+ },
8791
+ "403": {
8792
+ "description": "Forbidden - Insufficient permissions",
8793
+ "content": {
8794
+ "application/json": {
8795
+ "schema": {
8796
+ "$ref": "#/components/schemas/ErrorResponse"
8797
+ },
8798
+ "example": {
8799
+ "error": "Forbidden: You do not have permission to perform this action"
8800
+ }
8801
+ }
8802
+ }
8803
+ },
8804
+ "404": {
8805
+ "description": "Not Found - Resource does not exist",
8806
+ "content": {
8807
+ "application/json": {
8808
+ "schema": {
8809
+ "$ref": "#/components/schemas/ErrorResponse"
8810
+ },
8811
+ "example": {
8812
+ "error": "Entity not found"
8813
+ }
8814
+ }
8815
+ }
8816
+ }
8817
+ }
8818
+ }
8819
+ },
8325
8820
  "/relationships": {
8326
8821
  "post": {
8327
8822
  "tags": [
@@ -11417,59 +11912,329 @@
11417
11912
  }
11418
11913
  }
11419
11914
  }
11420
- }
11421
- }
11422
- }
11423
- },
11424
- "/graph/reachable": {
11425
- "post": {
11426
- "tags": [
11427
- "Graph"
11428
- ],
11429
- "summary": "Find reachable entities",
11430
- "description": "Find all entities of a specific type reachable from source entities within N hops.",
11431
- "x-arke-action": "graph:query",
11432
- "x-arke-auth": "optional",
11433
- "x-arke-tier": "external",
11434
- "requestBody": {
11435
- "content": {
11436
- "application/json": {
11437
- "schema": {
11438
- "$ref": "#/components/schemas/PathsReachableRequest"
11439
- }
11440
- }
11441
- }
11442
- },
11443
- "responses": {
11444
- "200": {
11445
- "description": "Reachable entities found",
11915
+ }
11916
+ }
11917
+ }
11918
+ },
11919
+ "/graph/reachable": {
11920
+ "post": {
11921
+ "tags": [
11922
+ "Graph"
11923
+ ],
11924
+ "summary": "Find reachable entities",
11925
+ "description": "Find all entities of a specific type reachable from source entities within N hops.",
11926
+ "x-arke-action": "graph:query",
11927
+ "x-arke-auth": "optional",
11928
+ "x-arke-tier": "external",
11929
+ "requestBody": {
11930
+ "content": {
11931
+ "application/json": {
11932
+ "schema": {
11933
+ "$ref": "#/components/schemas/PathsReachableRequest"
11934
+ }
11935
+ }
11936
+ }
11937
+ },
11938
+ "responses": {
11939
+ "200": {
11940
+ "description": "Reachable entities found",
11941
+ "content": {
11942
+ "application/json": {
11943
+ "schema": {
11944
+ "$ref": "#/components/schemas/PathsReachableResponse"
11945
+ }
11946
+ }
11947
+ }
11948
+ },
11949
+ "400": {
11950
+ "description": "Bad Request - Invalid input",
11951
+ "content": {
11952
+ "application/json": {
11953
+ "schema": {
11954
+ "$ref": "#/components/schemas/ValidationErrorResponse"
11955
+ },
11956
+ "example": {
11957
+ "error": "Validation failed",
11958
+ "details": {
11959
+ "issues": [
11960
+ {
11961
+ "path": [
11962
+ "properties",
11963
+ "label"
11964
+ ],
11965
+ "message": "Required"
11966
+ }
11967
+ ]
11968
+ }
11969
+ }
11970
+ }
11971
+ }
11972
+ }
11973
+ }
11974
+ }
11975
+ },
11976
+ "/graph/entity/{id}": {
11977
+ "get": {
11978
+ "tags": [
11979
+ "Graph"
11980
+ ],
11981
+ "summary": "Get entity from graph",
11982
+ "description": "Get entity details with all relationships from the graph database.",
11983
+ "x-arke-action": "graph:query",
11984
+ "x-arke-auth": "optional",
11985
+ "x-arke-tier": "external",
11986
+ "parameters": [
11987
+ {
11988
+ "schema": {
11989
+ "type": "string",
11990
+ "pattern": "^(?:II[0-9A-HJKMNP-TV-Z]{24}|[FC][0-9A-HJKMNP-TV-Z]{25}|[0-9A-HJKMNP-TV-Z]{26})$",
11991
+ "description": "Entity ID (ULID format)",
11992
+ "example": "01KDETYWYWM0MJVKM8DK3AEXPY"
11993
+ },
11994
+ "required": true,
11995
+ "description": "Entity ID (ULID)",
11996
+ "name": "id",
11997
+ "in": "path"
11998
+ }
11999
+ ],
12000
+ "responses": {
12001
+ "200": {
12002
+ "description": "Entity found",
12003
+ "content": {
12004
+ "application/json": {
12005
+ "schema": {
12006
+ "$ref": "#/components/schemas/GraphEntityResponse"
12007
+ }
12008
+ }
12009
+ }
12010
+ },
12011
+ "404": {
12012
+ "description": "Not Found - Resource does not exist",
12013
+ "content": {
12014
+ "application/json": {
12015
+ "schema": {
12016
+ "$ref": "#/components/schemas/ErrorResponse"
12017
+ },
12018
+ "example": {
12019
+ "error": "Entity not found"
12020
+ }
12021
+ }
12022
+ }
12023
+ }
12024
+ }
12025
+ }
12026
+ },
12027
+ "/query": {
12028
+ "post": {
12029
+ "tags": [
12030
+ "Query"
12031
+ ],
12032
+ "summary": "Execute Argo query",
12033
+ "description": "Execute an Argo DSL query for path-based graph traversal.\n\n## Query Syntax\n\n```\n[SCOPE_PREFIX] ENTRY_POINT [ENTRY_FILTER] [-[RELATION]{DEPTH}-> TARGET_FILTER]...\n```\n\n## Scope Prefixes\n\nControl where semantic search looks for entry points. Default is discovery mode.\n\n| Prefix | Description | Example |\n|--------|-------------|---------|\n| (none) | **Discovery mode** (default) - find relevant collections, then search within each | `\"medical notes\"` |\n| `@:collections` | Search for collections themselves | `@:collections \"columbia archives\"` |\n| `@:collection(id)` | Search within a specific collection | `@:collection(01JCOLL123) \"meeting\"` |\n| `@:discover` | Explicit discovery mode | `@:discover \"research papers\"` |\n| `@:public` | Search public domain only | `@:public \"orphaned data\"` |\n\n**Note:** Graph traversal (hops) is always cross-collection regardless of scope.\n\n### Entry Points\n\n| Syntax | Description | Example |\n|--------|-------------|---------|\n| `\"text\"` | Semantic search | `\"george washington\"` |\n| `@id` | Exact entity ID | `@01KE4ZY69F9R40E88PK9S0TQRQ` |\n| `type:X` | All entities of type | `type:person` |\n| `type:X ~ \"text\"` | Semantic search within type | `type:person ~ \"physician\"` |\n\n### Edges (Hops)\n\n| Syntax | Direction |\n|--------|-----------|\n| `-[*]->` | Outgoing |\n| `<-[*]-` | Incoming |\n| `<-[*]->` | Both |\n| `-[*]{,4}->` | Variable depth (1-4) |\n\n### Examples\n\n```\n\"george washington\" # Discovery mode (default)\n@:collections \"columbia university\" # Find collections\n@:collection(01JCOLL123) \"faculty meeting\" # Within specific collection\n@:discover \"alice\" -[*]{,2}-> type:person # Discover, then traverse\n@01KE4ZY... -[*]{,2}-> type:person # From exact entity\n```\n",
12034
+ "x-arke-action": "query:execute",
12035
+ "x-arke-auth": "optional",
12036
+ "x-arke-tier": "external",
12037
+ "requestBody": {
12038
+ "content": {
12039
+ "application/json": {
12040
+ "schema": {
12041
+ "$ref": "#/components/schemas/QueryRequest"
12042
+ }
12043
+ }
12044
+ }
12045
+ },
12046
+ "responses": {
12047
+ "200": {
12048
+ "description": "Query executed successfully",
12049
+ "content": {
12050
+ "application/json": {
12051
+ "schema": {
12052
+ "$ref": "#/components/schemas/QueryResponse"
12053
+ }
12054
+ }
12055
+ }
12056
+ },
12057
+ "400": {
12058
+ "description": "Bad Request - Invalid input",
12059
+ "content": {
12060
+ "application/json": {
12061
+ "schema": {
12062
+ "$ref": "#/components/schemas/ValidationErrorResponse"
12063
+ },
12064
+ "example": {
12065
+ "error": "Validation failed",
12066
+ "details": {
12067
+ "issues": [
12068
+ {
12069
+ "path": [
12070
+ "properties",
12071
+ "label"
12072
+ ],
12073
+ "message": "Required"
12074
+ }
12075
+ ]
12076
+ }
12077
+ }
12078
+ }
12079
+ }
12080
+ }
12081
+ }
12082
+ }
12083
+ },
12084
+ "/search/similar/collections": {
12085
+ "post": {
12086
+ "tags": [
12087
+ "Search"
12088
+ ],
12089
+ "summary": "Find similar collections",
12090
+ "description": "Find collections that are semantically similar to a given collection.\n\nUses the collection's weighted centroid vector (combination of description and entity embeddings) to find related collections.",
12091
+ "x-arke-action": "search:similar",
12092
+ "x-arke-auth": "optional",
12093
+ "x-arke-tier": "external",
12094
+ "requestBody": {
12095
+ "content": {
12096
+ "application/json": {
12097
+ "schema": {
12098
+ "type": "object",
12099
+ "properties": {
12100
+ "pi": {
12101
+ "type": "string",
12102
+ "description": "Collection PI to find similar collections for"
12103
+ },
12104
+ "limit": {
12105
+ "type": "number",
12106
+ "minimum": 1,
12107
+ "maximum": 100,
12108
+ "default": 10,
12109
+ "description": "Maximum results to return"
12110
+ },
12111
+ "refresh": {
12112
+ "type": "boolean",
12113
+ "default": false,
12114
+ "description": "Force fresh query, bypassing cache"
12115
+ }
12116
+ },
12117
+ "required": [
12118
+ "pi"
12119
+ ]
12120
+ }
12121
+ }
12122
+ }
12123
+ },
12124
+ "responses": {
12125
+ "200": {
12126
+ "description": "Similar collections found",
12127
+ "content": {
12128
+ "application/json": {
12129
+ "schema": {
12130
+ "type": "object",
12131
+ "properties": {
12132
+ "results": {
12133
+ "type": "array",
12134
+ "items": {
12135
+ "type": "object",
12136
+ "properties": {
12137
+ "pi": {
12138
+ "type": "string"
12139
+ },
12140
+ "label": {
12141
+ "type": "string"
12142
+ },
12143
+ "score": {
12144
+ "type": "number"
12145
+ },
12146
+ "created_at": {
12147
+ "type": "string"
12148
+ },
12149
+ "updated_at": {
12150
+ "type": "string"
12151
+ }
12152
+ },
12153
+ "required": [
12154
+ "pi",
12155
+ "label",
12156
+ "score"
12157
+ ]
12158
+ }
12159
+ },
12160
+ "metadata": {
12161
+ "type": "object",
12162
+ "properties": {
12163
+ "source_pi": {
12164
+ "type": "string"
12165
+ },
12166
+ "result_count": {
12167
+ "type": "number"
12168
+ },
12169
+ "cached": {
12170
+ "type": "boolean"
12171
+ },
12172
+ "cached_at": {
12173
+ "type": "string"
12174
+ }
12175
+ },
12176
+ "required": [
12177
+ "source_pi",
12178
+ "result_count"
12179
+ ]
12180
+ }
12181
+ },
12182
+ "required": [
12183
+ "results",
12184
+ "metadata"
12185
+ ]
12186
+ }
12187
+ }
12188
+ }
12189
+ },
12190
+ "400": {
12191
+ "description": "Bad Request - Invalid input",
12192
+ "content": {
12193
+ "application/json": {
12194
+ "schema": {
12195
+ "$ref": "#/components/schemas/ValidationErrorResponse"
12196
+ },
12197
+ "example": {
12198
+ "error": "Validation failed",
12199
+ "details": {
12200
+ "issues": [
12201
+ {
12202
+ "path": [
12203
+ "properties",
12204
+ "label"
12205
+ ],
12206
+ "message": "Required"
12207
+ }
12208
+ ]
12209
+ }
12210
+ }
12211
+ }
12212
+ }
12213
+ },
12214
+ "404": {
12215
+ "description": "Not Found - Resource does not exist",
11446
12216
  "content": {
11447
12217
  "application/json": {
11448
12218
  "schema": {
11449
- "$ref": "#/components/schemas/PathsReachableResponse"
12219
+ "$ref": "#/components/schemas/ErrorResponse"
12220
+ },
12221
+ "example": {
12222
+ "error": "Entity not found"
11450
12223
  }
11451
12224
  }
11452
12225
  }
11453
12226
  },
11454
- "400": {
11455
- "description": "Bad Request - Invalid input",
12227
+ "503": {
12228
+ "description": "Service Unavailable - External service not available",
11456
12229
  "content": {
11457
12230
  "application/json": {
11458
12231
  "schema": {
11459
- "$ref": "#/components/schemas/ValidationErrorResponse"
12232
+ "$ref": "#/components/schemas/ErrorResponse"
11460
12233
  },
11461
12234
  "example": {
11462
- "error": "Validation failed",
12235
+ "error": "Service unavailable",
11463
12236
  "details": {
11464
- "issues": [
11465
- {
11466
- "path": [
11467
- "properties",
11468
- "label"
11469
- ],
11470
- "message": "Required"
11471
- }
11472
- ]
12237
+ "service": "pinecone"
11473
12238
  }
11474
12239
  }
11475
12240
  }
@@ -11478,37 +12243,169 @@
11478
12243
  }
11479
12244
  }
11480
12245
  },
11481
- "/graph/entity/{id}": {
11482
- "get": {
12246
+ "/search/similar/items": {
12247
+ "post": {
11483
12248
  "tags": [
11484
- "Graph"
12249
+ "Search"
11485
12250
  ],
11486
- "summary": "Get entity from graph",
11487
- "description": "Get entity details with all relationships from the graph database.",
11488
- "x-arke-action": "graph:query",
12251
+ "summary": "Find similar items across collections",
12252
+ "description": "Find entities that are semantically similar to a given entity, searching across multiple collections.\n\nThis performs a two-tier search:\n1. First finds collections similar to the entity's collection\n2. Then searches within each collection for similar items\n3. Aggregates and ranks results with diversity weighting",
12253
+ "x-arke-action": "search:similar",
11489
12254
  "x-arke-auth": "optional",
11490
12255
  "x-arke-tier": "external",
11491
- "parameters": [
11492
- {
11493
- "schema": {
11494
- "type": "string",
11495
- "pattern": "^(?:II[0-9A-HJKMNP-TV-Z]{24}|[FC][0-9A-HJKMNP-TV-Z]{25}|[0-9A-HJKMNP-TV-Z]{26})$",
11496
- "description": "Entity ID (ULID format)",
11497
- "example": "01KDETYWYWM0MJVKM8DK3AEXPY"
11498
- },
11499
- "required": true,
11500
- "description": "Entity ID (ULID)",
11501
- "name": "id",
11502
- "in": "path"
12256
+ "requestBody": {
12257
+ "content": {
12258
+ "application/json": {
12259
+ "schema": {
12260
+ "type": "object",
12261
+ "properties": {
12262
+ "pi": {
12263
+ "type": "string",
12264
+ "description": "Entity PI to find similar items for"
12265
+ },
12266
+ "collection_pi": {
12267
+ "type": "string",
12268
+ "description": "Entity's collection PI"
12269
+ },
12270
+ "limit": {
12271
+ "type": "number",
12272
+ "minimum": 1,
12273
+ "maximum": 100,
12274
+ "default": 20,
12275
+ "description": "Maximum results to return"
12276
+ },
12277
+ "tier1_limit": {
12278
+ "type": "number",
12279
+ "minimum": 1,
12280
+ "maximum": 50,
12281
+ "default": 10,
12282
+ "description": "Number of similar collections to search"
12283
+ },
12284
+ "tier2_limit": {
12285
+ "type": "number",
12286
+ "minimum": 1,
12287
+ "maximum": 20,
12288
+ "default": 5,
12289
+ "description": "Items to fetch per collection"
12290
+ },
12291
+ "include_same_collection": {
12292
+ "type": "boolean",
12293
+ "default": true,
12294
+ "description": "Include results from the same collection"
12295
+ },
12296
+ "refresh": {
12297
+ "type": "boolean",
12298
+ "default": false,
12299
+ "description": "Force fresh query, bypassing cache"
12300
+ }
12301
+ },
12302
+ "required": [
12303
+ "pi",
12304
+ "collection_pi"
12305
+ ]
12306
+ }
12307
+ }
11503
12308
  }
11504
- ],
12309
+ },
11505
12310
  "responses": {
11506
12311
  "200": {
11507
- "description": "Entity found",
12312
+ "description": "Similar items found",
11508
12313
  "content": {
11509
12314
  "application/json": {
11510
12315
  "schema": {
11511
- "$ref": "#/components/schemas/GraphEntityResponse"
12316
+ "type": "object",
12317
+ "properties": {
12318
+ "results": {
12319
+ "type": "array",
12320
+ "items": {
12321
+ "type": "object",
12322
+ "properties": {
12323
+ "pi": {
12324
+ "type": "string"
12325
+ },
12326
+ "type": {
12327
+ "type": "string"
12328
+ },
12329
+ "label": {
12330
+ "type": "string"
12331
+ },
12332
+ "collection_pi": {
12333
+ "type": "string",
12334
+ "nullable": true
12335
+ },
12336
+ "score": {
12337
+ "type": "number"
12338
+ },
12339
+ "created_at": {
12340
+ "type": "string"
12341
+ },
12342
+ "updated_at": {
12343
+ "type": "string"
12344
+ }
12345
+ },
12346
+ "required": [
12347
+ "pi",
12348
+ "type",
12349
+ "label",
12350
+ "collection_pi",
12351
+ "score"
12352
+ ]
12353
+ }
12354
+ },
12355
+ "metadata": {
12356
+ "type": "object",
12357
+ "properties": {
12358
+ "source_pi": {
12359
+ "type": "string"
12360
+ },
12361
+ "collections_searched": {
12362
+ "type": "number"
12363
+ },
12364
+ "result_count": {
12365
+ "type": "number"
12366
+ },
12367
+ "cached": {
12368
+ "type": "boolean"
12369
+ },
12370
+ "cached_at": {
12371
+ "type": "string"
12372
+ }
12373
+ },
12374
+ "required": [
12375
+ "source_pi",
12376
+ "collections_searched",
12377
+ "result_count"
12378
+ ]
12379
+ }
12380
+ },
12381
+ "required": [
12382
+ "results",
12383
+ "metadata"
12384
+ ]
12385
+ }
12386
+ }
12387
+ }
12388
+ },
12389
+ "400": {
12390
+ "description": "Bad Request - Invalid input",
12391
+ "content": {
12392
+ "application/json": {
12393
+ "schema": {
12394
+ "$ref": "#/components/schemas/ValidationErrorResponse"
12395
+ },
12396
+ "example": {
12397
+ "error": "Validation failed",
12398
+ "details": {
12399
+ "issues": [
12400
+ {
12401
+ "path": [
12402
+ "properties",
12403
+ "label"
12404
+ ],
12405
+ "message": "Required"
12406
+ }
12407
+ ]
12408
+ }
11512
12409
  }
11513
12410
  }
11514
12411
  }
@@ -11525,36 +12422,130 @@
11525
12422
  }
11526
12423
  }
11527
12424
  }
12425
+ },
12426
+ "503": {
12427
+ "description": "Service Unavailable - External service not available",
12428
+ "content": {
12429
+ "application/json": {
12430
+ "schema": {
12431
+ "$ref": "#/components/schemas/ErrorResponse"
12432
+ },
12433
+ "example": {
12434
+ "error": "Service unavailable",
12435
+ "details": {
12436
+ "service": "pinecone"
12437
+ }
12438
+ }
12439
+ }
12440
+ }
11528
12441
  }
11529
12442
  }
11530
12443
  }
11531
12444
  },
11532
- "/query": {
12445
+ "/search/collections": {
11533
12446
  "post": {
11534
12447
  "tags": [
11535
- "Query"
12448
+ "Search"
11536
12449
  ],
11537
- "summary": "Execute Argo query",
11538
- "description": "Execute an Argo DSL query for path-based graph traversal.\n\n## Query Syntax\n\n```\nENTRY_POINT [ENTRY_FILTER] [-[RELATION]{DEPTH}-> TARGET_FILTER]...\n```\n\n### Entry Points\n\n| Syntax | Description | Example |\n|--------|-------------|---------|\n| `\"text\"` | Semantic search | `\"george washington\"` |\n| `@id` | Exact entity ID | `@01KE4ZY69F9R40E88PK9S0TQRQ` |\n| `type:X` | All entities of type | `type:person` |\n| `type:X ~ \"text\"` | Semantic search within type | `type:person ~ \"physician\"` |\n\n### Edges (Hops)\n\n| Syntax | Direction |\n|--------|-----------|\n| `-[*]->` | Outgoing |\n| `<-[*]-` | Incoming |\n| `<-[*]->` | Both |\n| `-[*]{,4}->` | Variable depth (1-4) |\n\n### Examples\n\n```\n\"george washington\" # Simple semantic search\n\"albert einstein\" type:person # With type filter\n\"medical college\" -[*]{,4}-> type:file # Find files connected to concept\n@01KE4ZY... -[*]{,2}-> type:person # Find people near entity\n```\n",
11539
- "x-arke-action": "query:execute",
12450
+ "summary": "Search collections by text",
12451
+ "description": "Search for collections using semantic text search.\n\nUse this endpoint to discover collections about a topic. Results are ranked by semantic similarity to your query.",
12452
+ "x-arke-action": "search:query",
11540
12453
  "x-arke-auth": "optional",
11541
12454
  "x-arke-tier": "external",
11542
12455
  "requestBody": {
11543
12456
  "content": {
11544
12457
  "application/json": {
11545
12458
  "schema": {
11546
- "$ref": "#/components/schemas/QueryRequest"
12459
+ "type": "object",
12460
+ "properties": {
12461
+ "query": {
12462
+ "type": "string",
12463
+ "minLength": 1,
12464
+ "maxLength": 500,
12465
+ "description": "Search query text"
12466
+ },
12467
+ "limit": {
12468
+ "type": "number",
12469
+ "minimum": 1,
12470
+ "maximum": 100,
12471
+ "default": 10,
12472
+ "description": "Maximum results to return"
12473
+ },
12474
+ "types": {
12475
+ "type": "array",
12476
+ "items": {
12477
+ "type": "string"
12478
+ },
12479
+ "description": "Filter by collection types"
12480
+ }
12481
+ },
12482
+ "required": [
12483
+ "query"
12484
+ ]
11547
12485
  }
11548
12486
  }
11549
12487
  }
11550
12488
  },
11551
12489
  "responses": {
11552
12490
  "200": {
11553
- "description": "Query executed successfully",
12491
+ "description": "Search results",
11554
12492
  "content": {
11555
12493
  "application/json": {
11556
12494
  "schema": {
11557
- "$ref": "#/components/schemas/QueryResponse"
12495
+ "type": "object",
12496
+ "properties": {
12497
+ "results": {
12498
+ "type": "array",
12499
+ "items": {
12500
+ "type": "object",
12501
+ "properties": {
12502
+ "pi": {
12503
+ "type": "string"
12504
+ },
12505
+ "label": {
12506
+ "type": "string"
12507
+ },
12508
+ "type": {
12509
+ "type": "string"
12510
+ },
12511
+ "score": {
12512
+ "type": "number"
12513
+ },
12514
+ "created_at": {
12515
+ "type": "string"
12516
+ },
12517
+ "updated_at": {
12518
+ "type": "string"
12519
+ }
12520
+ },
12521
+ "required": [
12522
+ "pi",
12523
+ "label",
12524
+ "type",
12525
+ "score"
12526
+ ]
12527
+ }
12528
+ },
12529
+ "metadata": {
12530
+ "type": "object",
12531
+ "properties": {
12532
+ "query": {
12533
+ "type": "string"
12534
+ },
12535
+ "result_count": {
12536
+ "type": "number"
12537
+ }
12538
+ },
12539
+ "required": [
12540
+ "query",
12541
+ "result_count"
12542
+ ]
12543
+ }
12544
+ },
12545
+ "required": [
12546
+ "results",
12547
+ "metadata"
12548
+ ]
11558
12549
  }
11559
12550
  }
11560
12551
  }
@@ -11582,18 +12573,34 @@
11582
12573
  }
11583
12574
  }
11584
12575
  }
12576
+ },
12577
+ "503": {
12578
+ "description": "Service Unavailable - External service not available",
12579
+ "content": {
12580
+ "application/json": {
12581
+ "schema": {
12582
+ "$ref": "#/components/schemas/ErrorResponse"
12583
+ },
12584
+ "example": {
12585
+ "error": "Service unavailable",
12586
+ "details": {
12587
+ "service": "pinecone"
12588
+ }
12589
+ }
12590
+ }
12591
+ }
11585
12592
  }
11586
12593
  }
11587
12594
  }
11588
12595
  },
11589
- "/search/similar/collections": {
12596
+ "/search/entities": {
11590
12597
  "post": {
11591
12598
  "tags": [
11592
12599
  "Search"
11593
12600
  ],
11594
- "summary": "Find similar collections",
11595
- "description": "Find collections that are semantically similar to a given collection.\n\nUses the collection's weighted centroid vector (combination of description and entity embeddings) to find related collections.",
11596
- "x-arke-action": "search:similar",
12601
+ "summary": "Search entities within collection(s)",
12602
+ "description": "Search for entities within one or more collections using semantic text search.\n\nProvide either `collection_pi` for a single collection or `collection_pis` for multiple collections (searched in parallel).\n\nUse `per_collection_limit` to ensure result diversity when searching multiple collections.",
12603
+ "x-arke-action": "search:query",
11597
12604
  "x-arke-auth": "optional",
11598
12605
  "x-arke-tier": "external",
11599
12606
  "requestBody": {
@@ -11602,25 +12609,47 @@
11602
12609
  "schema": {
11603
12610
  "type": "object",
11604
12611
  "properties": {
11605
- "pi": {
12612
+ "collection_pi": {
11606
12613
  "type": "string",
11607
- "description": "Collection PI to find similar collections for"
12614
+ "description": "Single collection PI to search within"
12615
+ },
12616
+ "collection_pis": {
12617
+ "type": "array",
12618
+ "items": {
12619
+ "type": "string"
12620
+ },
12621
+ "maxItems": 20,
12622
+ "description": "Multiple collection PIs to search (max 20)"
12623
+ },
12624
+ "query": {
12625
+ "type": "string",
12626
+ "minLength": 1,
12627
+ "maxLength": 500,
12628
+ "description": "Search query text"
11608
12629
  },
11609
12630
  "limit": {
11610
12631
  "type": "number",
11611
12632
  "minimum": 1,
11612
12633
  "maximum": 100,
11613
- "default": 10,
11614
- "description": "Maximum results to return"
12634
+ "default": 20,
12635
+ "description": "Maximum total results to return"
11615
12636
  },
11616
- "refresh": {
11617
- "type": "boolean",
11618
- "default": false,
11619
- "description": "Force fresh query, bypassing cache"
12637
+ "types": {
12638
+ "type": "array",
12639
+ "items": {
12640
+ "type": "string"
12641
+ },
12642
+ "description": "Filter by entity types"
12643
+ },
12644
+ "per_collection_limit": {
12645
+ "type": "number",
12646
+ "minimum": 1,
12647
+ "maximum": 50,
12648
+ "description": "Max results per collection for diversity"
11620
12649
  }
11621
12650
  },
11622
12651
  "required": [
11623
- "pi"
12652
+ "query"
11624
12653
  ]
11625
12654
  }
11626
12655
  }
@@ -11628,7 +12657,7 @@
11628
12657
  },
11629
12658
  "responses": {
11630
12659
  "200": {
11631
- "description": "Similar collections found",
12660
+ "description": "Search results",
11632
12661
  "content": {
11633
12662
  "application/json": {
11634
12663
  "schema": {
@@ -11645,9 +12674,15 @@
11645
12674
  "label": {
11646
12675
  "type": "string"
11647
12676
  },
12677
+ "type": {
12678
+ "type": "string"
12679
+ },
11648
12680
  "score": {
11649
12681
  "type": "number"
11650
12682
  },
12683
+ "collection_pi": {
12684
+ "type": "string"
12685
+ },
11651
12686
  "created_at": {
11652
12687
  "type": "string"
11653
12688
  },
@@ -11658,28 +12693,35 @@
11658
12693
  "required": [
11659
12694
  "pi",
11660
12695
  "label",
11661
- "score"
12696
+ "type",
12697
+ "score",
12698
+ "collection_pi"
11662
12699
  ]
11663
12700
  }
11664
12701
  },
11665
12702
  "metadata": {
11666
12703
  "type": "object",
11667
12704
  "properties": {
11668
- "source_pi": {
12705
+ "collection_pis": {
12706
+ "type": "array",
12707
+ "items": {
12708
+ "type": "string"
12709
+ }
12710
+ },
12711
+ "query": {
11669
12712
  "type": "string"
11670
12713
  },
11671
- "result_count": {
12714
+ "collections_searched": {
11672
12715
  "type": "number"
11673
12716
  },
11674
- "cached": {
11675
- "type": "boolean"
11676
- },
11677
- "cached_at": {
11678
- "type": "string"
12717
+ "result_count": {
12718
+ "type": "number"
11679
12719
  }
11680
12720
  },
11681
12721
  "required": [
11682
- "source_pi",
12722
+ "collection_pis",
12723
+ "query",
12724
+ "collections_searched",
11683
12725
  "result_count"
11684
12726
  ]
11685
12727
  }
@@ -11716,19 +12758,6 @@
11716
12758
  }
11717
12759
  }
11718
12760
  },
11719
- "404": {
11720
- "description": "Not Found - Resource does not exist",
11721
- "content": {
11722
- "application/json": {
11723
- "schema": {
11724
- "$ref": "#/components/schemas/ErrorResponse"
11725
- },
11726
- "example": {
11727
- "error": "Entity not found"
11728
- }
11729
- }
11730
- }
11731
- },
11732
12761
  "503": {
11733
12762
  "description": "Service Unavailable - External service not available",
11734
12763
  "content": {
@@ -11748,14 +12777,14 @@
11748
12777
  }
11749
12778
  }
11750
12779
  },
11751
- "/search/similar/items": {
12780
+ "/search/discover": {
11752
12781
  "post": {
11753
12782
  "tags": [
11754
12783
  "Search"
11755
12784
  ],
11756
- "summary": "Find similar items across collections",
11757
- "description": "Find entities that are semantically similar to a given entity, searching across multiple collections.\n\nThis performs a two-tier search:\n1. First finds collections similar to the entity's collection\n2. Then searches within each collection for similar items\n3. Aggregates and ranks results with diversity weighting",
11758
- "x-arke-action": "search:similar",
12785
+ "summary": "Discover entities across all collections",
12786
+ "description": "Two-step discovery search: first finds relevant collections, then searches within them.\n\nUse this endpoint when you don't know which collections to search. The system will:\n1. Find collections semantically related to your query\n2. Search within each collection in parallel\n3. Aggregate and rank results across all collections\n\nGreat for exploration and AI agents navigating the network.",
12787
+ "x-arke-action": "search:query",
11759
12788
  "x-arke-auth": "optional",
11760
12789
  "x-arke-tier": "external",
11761
12790
  "requestBody": {
@@ -11764,49 +12793,43 @@
11764
12793
  "schema": {
11765
12794
  "type": "object",
11766
12795
  "properties": {
11767
- "pi": {
11768
- "type": "string",
11769
- "description": "Entity PI to find similar items for"
11770
- },
11771
- "collection_pi": {
12796
+ "query": {
11772
12797
  "type": "string",
11773
- "description": "Entity's collection PI"
12798
+ "minLength": 1,
12799
+ "maxLength": 500,
12800
+ "description": "Search query text"
11774
12801
  },
11775
12802
  "limit": {
11776
12803
  "type": "number",
11777
12804
  "minimum": 1,
11778
12805
  "maximum": 100,
11779
12806
  "default": 20,
11780
- "description": "Maximum results to return"
12807
+ "description": "Maximum total results to return"
11781
12808
  },
11782
- "tier1_limit": {
12809
+ "types": {
12810
+ "type": "array",
12811
+ "items": {
12812
+ "type": "string"
12813
+ },
12814
+ "description": "Filter by entity types"
12815
+ },
12816
+ "collection_limit": {
11783
12817
  "type": "number",
11784
12818
  "minimum": 1,
11785
12819
  "maximum": 50,
11786
12820
  "default": 10,
11787
- "description": "Number of similar collections to search"
12821
+ "description": "Number of collections to search"
11788
12822
  },
11789
- "tier2_limit": {
12823
+ "per_collection_limit": {
11790
12824
  "type": "number",
11791
12825
  "minimum": 1,
11792
12826
  "maximum": 20,
11793
12827
  "default": 5,
11794
- "description": "Items to fetch per collection"
11795
- },
11796
- "include_same_collection": {
11797
- "type": "boolean",
11798
- "default": true,
11799
- "description": "Include results from the same collection"
11800
- },
11801
- "refresh": {
11802
- "type": "boolean",
11803
- "default": false,
11804
- "description": "Force fresh query, bypassing cache"
12828
+ "description": "Max results per collection"
11805
12829
  }
11806
12830
  },
11807
12831
  "required": [
11808
- "pi",
11809
- "collection_pi"
12832
+ "query"
11810
12833
  ]
11811
12834
  }
11812
12835
  }
@@ -11814,7 +12837,7 @@
11814
12837
  },
11815
12838
  "responses": {
11816
12839
  "200": {
11817
- "description": "Similar items found",
12840
+ "description": "Discovery results",
11818
12841
  "content": {
11819
12842
  "application/json": {
11820
12843
  "schema": {
@@ -11828,19 +12851,18 @@
11828
12851
  "pi": {
11829
12852
  "type": "string"
11830
12853
  },
11831
- "type": {
11832
- "type": "string"
11833
- },
11834
12854
  "label": {
11835
12855
  "type": "string"
11836
12856
  },
11837
- "collection_pi": {
11838
- "type": "string",
11839
- "nullable": true
12857
+ "type": {
12858
+ "type": "string"
11840
12859
  },
11841
12860
  "score": {
11842
12861
  "type": "number"
11843
12862
  },
12863
+ "collection_pi": {
12864
+ "type": "string"
12865
+ },
11844
12866
  "created_at": {
11845
12867
  "type": "string"
11846
12868
  },
@@ -11850,17 +12872,17 @@
11850
12872
  },
11851
12873
  "required": [
11852
12874
  "pi",
11853
- "type",
11854
12875
  "label",
11855
- "collection_pi",
11856
- "score"
12876
+ "type",
12877
+ "score",
12878
+ "collection_pi"
11857
12879
  ]
11858
12880
  }
11859
12881
  },
11860
12882
  "metadata": {
11861
12883
  "type": "object",
11862
12884
  "properties": {
11863
- "source_pi": {
12885
+ "query": {
11864
12886
  "type": "string"
11865
12887
  },
11866
12888
  "collections_searched": {
@@ -11868,16 +12890,10 @@
11868
12890
  },
11869
12891
  "result_count": {
11870
12892
  "type": "number"
11871
- },
11872
- "cached": {
11873
- "type": "boolean"
11874
- },
11875
- "cached_at": {
11876
- "type": "string"
11877
12893
  }
11878
12894
  },
11879
12895
  "required": [
11880
- "source_pi",
12896
+ "query",
11881
12897
  "collections_searched",
11882
12898
  "result_count"
11883
12899
  ]
@@ -11915,19 +12931,6 @@
11915
12931
  }
11916
12932
  }
11917
12933
  },
11918
- "404": {
11919
- "description": "Not Found - Resource does not exist",
11920
- "content": {
11921
- "application/json": {
11922
- "schema": {
11923
- "$ref": "#/components/schemas/ErrorResponse"
11924
- },
11925
- "example": {
11926
- "error": "Entity not found"
11927
- }
11928
- }
11929
- }
11930
- },
11931
12934
  "503": {
11932
12935
  "description": "Service Unavailable - External service not available",
11933
12936
  "content": {