REST API OpenAPI spec (#612)

* OpenAPI spec in specs/api.  Checked lint with redoc.
This commit is contained in:
cybermaggedon 2026-01-15 11:04:37 +00:00 committed by GitHub
parent 62b754d788
commit fce43ae035
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
84 changed files with 5638 additions and 0 deletions

View file

@ -0,0 +1,91 @@
type: object
description: Knowledge service response
properties:
ids:
type: array
description: List of knowledge core IDs (returned by list-kg-cores)
items:
type: string
example: ["core-123", "core-456"]
triples:
type: object
description: Triples data (returned by get-kg-core, streamed)
properties:
metadata:
type: object
required:
- id
- user
- collection
properties:
id:
type: string
description: Knowledge core ID
example: core-123
user:
type: string
description: User identifier
example: alice
collection:
type: string
description: Collection identifier
example: default
metadata:
type: array
description: Metadata triples
items:
$ref: '../../common/Triple.yaml'
triples:
type: array
description: Knowledge triples
items:
$ref: '../../common/Triple.yaml'
graph-embeddings:
type: object
description: Graph embeddings data (returned by get-kg-core, streamed)
properties:
metadata:
type: object
required:
- id
- user
- collection
properties:
id:
type: string
description: Knowledge core ID
example: core-123
user:
type: string
description: User identifier
example: alice
collection:
type: string
description: Collection identifier
example: default
metadata:
type: array
description: Metadata triples
items:
$ref: '../../common/Triple.yaml'
entities:
type: array
description: Entity embeddings
items:
type: object
required:
- entity
- vectors
properties:
entity:
$ref: '../../common/RdfValue.yaml'
vectors:
type: array
description: Embedding vectors
items:
type: number
example: [0.1, 0.2, 0.3]
eos:
type: boolean
description: End of stream marker (for streaming responses)
example: true