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 · Path | Operation |
|---|---|
POST /v1/stores | create a store |
POST /v1/stores/{id}/write | write a memory |
POST /v1/stores/{id}/retrieve | retrieve within a token budget |
POST /v1/stores/{id}/delete | hard-delete (if HARD_DELETE) |
GET /v1/stores/{id}/audit | the immutable record |
GET /v1/stores/{id}/capabilities | declared capability set |
GET /health | liveness + version |
Cloud Platform APIs
note
Cloud APIs are available when running with --cloud and require Authorization: Bearer <api_key> on every request.
Decision Trail — /v1/decisions/ (7 endpoints)
| Method | Path | Description |
|---|---|---|
POST | /v1/decisions/log | Log an inference decision |
GET | /v1/decisions/ | List decisions (filtered, paginated) |
GET | /v1/decisions/stats | Summary statistics |
GET | /v1/decisions/{id} | Get a single decision |
GET | /v1/decisions/{id}/replay | Replay — show deleted facts since decision |
GET | /v1/decisions/export | Bulk NDJSON export |
DELETE | /v1/decisions/scrub/{fact_ref} | GDPR scrub a fact from all records |
Erasure Proof — /v1/erasure/ (6 endpoints)
| Method | Path | Description |
|---|---|---|
POST | /v1/erasure/issue | Issue a signed erasure certificate |
GET | /v1/erasure/stats | Summary statistics |
GET | /v1/erasure/{id} | Get a certificate |
GET | /v1/erasure/{id}/verify | Verify Ed25519 signature |
GET | /v1/erasure/fact/{fact_ref} | Find certificate by fact ref |
GET | /v1/erasure/ | List all certificates |
Governance Gateway — /v1/governance/ (10 endpoints)
| Method | Path | Description |
|---|---|---|
GET | /v1/governance/stats | Summary statistics |
GET | /v1/governance/policy-types | Available policy types with schemas |
POST | /v1/governance/policies | Create a policy |
GET | /v1/governance/policies | List 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/evaluate | Evaluate policies against a request |
POST | /v1/governance/seed-defaults | Seed default policies |
GET | /v1/governance/logs | Evaluation log |
Regulatory Reports — /v1/reports/ (7 endpoints)
| Method | Path | Description |
|---|---|---|
GET | /v1/reports/stats | Summary statistics |
GET | /v1/reports/frameworks | Available frameworks |
POST | /v1/reports/generate | Generate a compliance report |
GET | /v1/reports/ | List all reports |
GET | /v1/reports/{id} | Get full report with content |
GET | /v1/reports/{id}/download | Download as JSON file |
DELETE | /v1/reports/{id} | Delete a report |
Live Swagger: https://grafomem-production.up.railway.app/docs
Source: src/aml/server/app.py (OpenAPI)