Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
102 changes: 102 additions & 0 deletions docs/openapi.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,102 @@
openapi: 3.0.0
info:
title: Engram Miner API
description: API specification for Engram miner HTTP endpoints
version: 1.0.0
servers:
- url: http://localhost:8000
description: Local development server

components:
securitySchemes:
Sr25519Signature:
type: apiKey
in: header
name: X-Sr25519-Signature
description: Sr25519 signed challenge header for authentication

paths:
/ingest:
post:
summary: Ingest data into the Engram network
security:
- Sr25519Signature: []
requestBody:
required: true
content:
application/json:
schema:
type: object
properties:
data:
type: string
description: Data to ingest
namespace:
type: string
description: Optional namespace for private data
required:
- data
responses:
'200':
description: Data ingested successfully
content:
application/json:
schema:
type: object
properties:
success:
type: boolean
message:
type: string
'401':
description: Unauthorized - invalid signature

/query:
post:
summary: Query data from the Engram network
security:
- Sr25519Signature: []
requestBody:
required: true
content:
application/json:
schema:
type: object
properties:
query:
type: string
description: Query string
limit:
type: integer
description: Maximum number of results
required:
- query
responses:
'200':
description: Query results
content:
application/json:
schema:
type: object
properties:
results:
type: array
items:
type: object
'401':
description: Unauthorized - invalid signature

/health:
get:
summary: Health check endpoint
responses:
'200':
description: Service is healthy
content:
application/json:
schema:
type: object
properties:
status:
type: string
example: healthy