Skip to main content

REST API Reference

The server exposes the MemoryBackend operations over HTTP+JSON. When Cloud mode is enabled, four additional routers are mounted.

Core memory API​

Method · PathOperation
POST /v1/storescreate a store
POST /v1/stores/{id}/writewrite a memory
POST /v1/stores/{id}/retrieveretrieve within a token budget
POST /v1/stores/{id}/deletehard-delete (if HARD_DELETE); in Cloud mode issues an erasure certificate with a server-observed content hash (Erasure Proof)
GET /v1/stores/{id}/auditthe audit record: superseded and evicted facts included, hard-deleted excluded
GET /v1/stores/{id}/capabilitiesdeclared capability set
GET /healthliveness + version

Cloud Platform APIs​

note

Cloud APIs are mounted when the server runs on PostgreSQL (-b postgres) and require an API key on every request: X-API-Key: gfm_… (or Authorization: Bearer gfm_…).

Decision Trail — /v1/decisions/ (7 endpoints)​

MethodPathDescription
POST/v1/decisions/logLog an inference decision
GET/v1/decisions/List decisions (filtered, paginated)
GET/v1/decisions/statsSummary statistics
GET/v1/decisions/{id}Get a single decision
GET/v1/decisions/{id}/replayReplay — show deleted facts since decision
GET/v1/decisions/exportBulk NDJSON export
DELETE/v1/decisions/scrub/{fact_ref}GDPR scrub a fact from all records

Full reference →

Erasure Proof — /v1/erasure/ (7 endpoints)​

MethodPathDescription
POST/v1/erasure/issueIssue a certificate for an already-deleted fact (does not delete; 409 if still present)
GET/v1/erasure/statsSummary statistics
GET/v1/erasure/ledger/verifyVerify the ledger hash chain → {ok, rows, problems}
GET/v1/erasure/{id}Get a certificate
GET/v1/erasure/{id}/verifyVerify Ed25519 signature
GET/v1/erasure/fact/{fact_ref}Find certificate by fact ref
GET/v1/erasure/List all certificates

Full reference →

Governance Gateway — /v1/governance/ (10 endpoints)​

MethodPathDescription
GET/v1/governance/statsSummary statistics
GET/v1/governance/policy-typesAvailable policy types with schemas
POST/v1/governance/policiesCreate a policy
GET/v1/governance/policiesList all policies
GET/v1/governance/policies/{id}Get a single policy
PUT/v1/governance/policies/{id}Update a policy
DELETE/v1/governance/policies/{id}Delete a policy
POST/v1/governance/evaluateEvaluate policies against a request
POST/v1/governance/seed-defaultsSeed default policies
GET/v1/governance/logsEvaluation log

Full reference →

Regulatory Reports — /v1/reports/ (8 endpoints)​

MethodPathDescription
GET/v1/reports/statsSummary statistics
GET/v1/reports/frameworksAvailable frameworks
POST/v1/reports/generateGenerate a compliance report
GET/v1/reports/List all reports
GET/v1/reports/{id}Get full report with content
GET/v1/reports/{id}/downloadDownload as JSON file
GET/v1/reports/{id}/download/pdfDownload as PDF
DELETE/v1/reports/{id}Delete a report

Full reference →


Live OpenAPI: https://api.grafomem.com/docs

Source: src/aml/server/app.py (OpenAPI)