Legacy Notes Compatibility
Documentation for the legacy workspace-scoped note routes that remain available for compatibility.
Legacy Notes Compatibility
These routes remain available for backward compatibility in omni-edge-proxy/src/routes/pkms.ts:1367-1512. They are still used by the current desktop client for note CRUD in web-omni/src/features/desktop-client/lib/documentRepository.ts:317-387 and web-omni/src/features/desktop-client/lib/documentRepository.ts:422-472, but they do not currently go through the same unified create/update/delete helpers used by /v1/documents.
Authentication and headers
All legacy note routes require:
Authorization: Bearer <token>They also participate in the same response transformation pipeline as the modern routes:
X-Proxy-Decrypt: true
X-Client-Key: <client-key>Behavior is grounded to omni-edge-proxy/src/routes/pkms.ts:122-233 and omni-edge-proxy/src/routes/pkms.ts:1367-1512:
- Without
X-Proxy-Decrypt: true, encrypted fields are returned unchanged. - With
X-Proxy-Decrypt: true, the proxy attempts to resolve a client key. X-Client-Keytakes precedence over escrowed key lookup.- If no client key is available, responses remain encrypted.
Route inventory
| Method | Path | Description |
|---|---|---|
GET | /v1/workspaces/:workspaceId/notes | List legacy note entries for a workspace. |
POST | /v1/workspaces/:workspaceId/notes | Create a legacy compatibility note. |
GET | /v1/workspaces/:workspaceId/notes/:noteId | Fetch one compatibility note plus blocks and markdown. |
PATCH | /v1/workspaces/:workspaceId/notes/:noteId | Partially update a compatibility note. |
DELETE | /v1/workspaces/:workspaceId/notes/:noteId | Delete a compatibility note. |
GET | /v1/workspaces/:workspaceId/notebooks | Read the legacy encrypted notebooks blob. |
POST | /v1/workspaces/:workspaceId/notebooks | Save the legacy encrypted notebooks blob. |
GET | /v1/workspaces/:workspaceId/notebooks/:notebookId | Fetch a structured notebook record when present. |
Route details
GET /v1/workspaces/:workspaceId/notes
Returns the raw array produced by listLegacyNotes(...), not a wrapped { notes: [...] } object.
Example response:
[
{
"id": "doc_123",
"format": "omni.om.encrypted",
"ciphertext": "iv:tag:ciphertext",
"_meta": {
"updatedAt": "ISO8601 timestamp",
"notebookId": "nb_123"
}
}
]Behavior:
- The route reads
document.omordocument.om.encblobs directly and parses them if possible. - If
meta.omexists, it is merged into_metaon the returned object. - Stored encrypted note payloads remain ciphertext by default.
- With
X-Proxy-Decrypt: trueand a client key, encrypted note entries can be transformed by the shared response transformer.
Grounded to omni-edge-proxy/src/routes/pkms.ts:795-836 and omni-edge-proxy/src/routes/pkms.ts:1367-1373.
POST /v1/workspaces/:workspaceId/notes
Creates a compatibility note by directly writing raw note artifacts.
Accepted request fields used by the current implementation include:
documentPayloadblocksPayloadmarkdownindexableBlocksnotebookIddocumentIdoptional
Important current behavior:
documentPayloadandblocksPayloadare required.- The handler writes
document.om.encandblocks.om.encdirectly as JSON strings. - It optionally writes
markdown.md. - It writes a plaintext
meta.omsidecar built fromindexableBlocksandnotebookId. - It does not call
createUnifiedDocument(...)orupsertDocumentIndex(...).
Grounded to omni-edge-proxy/src/routes/pkms.ts:1378-1417.
GET /v1/workspaces/:workspaceId/notes/:noteId
Returns one compatibility note detail object:
{
"document": {},
"blocks": [],
"markdown": "# My note"
}Behavior:
- The route reads raw stored artifacts directly.
documentis parsed fromdocument.omordocument.om.enc.blocksis parsed fromblocks.omorblocks.om.encwhen present.markdownis returned as the stored string or"".- There is no outer
{ note: ... }wrapper in the current implementation.
Grounded to omni-edge-proxy/src/routes/pkms.ts:1423-1440.
PATCH /v1/workspaces/:workspaceId/notes/:noteId
Partially updates a compatibility note by directly rewriting raw artifacts.
Accepted request fields used by the current implementation include:
documentPayloadblocksPayloadmarkdownindexableBlocksnotebookId
Current behavior:
- If
documentPayloadis present, the route rewritesdocument.om.enc. - If
blocksPayloadis present, the route rewritesblocks.om.enc. - If
markdownis present, the route rewritesmarkdown.md. - If
indexableBlocksornotebookIdis present, the route updatesmeta.om. - It does not call
patchUnifiedDocument(...)orupsertDocumentIndex(...).
Grounded to omni-edge-proxy/src/routes/pkms.ts:1446-1494.
DELETE /v1/workspaces/:workspaceId/notes/:noteId
Deletes note artifacts.
Success response:
{
"success": true
}Current behavior:
- The route deletes stored document, blocks, markdown, and meta artifacts.
- It does not call
removeDocumentIndex(...), so derived block-index cleanup is not part of this legacy delete handler.
Grounded to omni-edge-proxy/src/routes/pkms.ts:1500-1508.
Notebook compatibility routes
Notebook compatibility behavior is split across three routes:
GET /v1/workspaces/:workspaceId/notebooksreturns{ ciphertext: string | null }from the legacy encrypted notebook blob.POST /v1/workspaces/:workspaceId/notebooksrequires{ ciphertext: string }and returns{ success: true }.GET /v1/workspaces/:workspaceId/notebooks/:notebookIdreturns{ notebook }when a structured notebook record exists.
Grounded to omni-edge-proxy/src/routes/pkms.ts:1191-1225.
NOTE: These routes are compatibility-only and new clients should prefer the unified
/v1/documentsand/v1/workspaces/:workspaceId/documentsendpoints documented incore-console/content/docs/api-reference/endpoints.mdx:1-725.
API Endpoints
Canonical API contract for the Omni edge proxy and modern PKMS routes.
Dumb Client Implementation Guide
Guide for building the Omni PKMS front-end using the "dumb client" approach. It shows how the DesktopClientApp leverages the API contract, handles decryption headers, and manages workspaces, documents, and notes.