{
"title": "REST API Reference",
"content": [
{"heading": {"level": 1, "text": "REST API Reference"}},
{"heading": {"level": 2, "text": "Document Operations"}},
{"para": ["• ", {"code": "GET /{key}"}, " - Retrieve document (raw JSON response)"]},
{"para": ["• ", {"code": "PUT /{key}"}, " - Store document (expects JSON body)"]},
{"para": ["• ", {"code": "DELETE /{key}"}, " - Remove document"]},
{"para": ["• ", {"code": "HEAD /{key}"}, " - Check document existence (200/404)"]},
{"heading": {"level": 2, "text": "Administrative Operations"}},
{"para": ["POST to root with ", {"code": "op"}, " parameter:"]},
{"para": ["• ", {"code": '{\"op\": \"keys\"}'}, " - List all document keys"]},
{"para": ["• ", {"code": '{\"op\": \"dump\"}'}, " - Export all documents as JSON"]},
{"para": ["• ", {"code": '{\"op\": \"flush\"}'}, " - Sync database to disk"]},
{"para": ["• ", {"code": '{\"op\": \"stop\"}'}, " - Graceful server shutdown"]},
{"heading": {"level": 2, "text": "Response Formats"}},
{"para": ["Documents returned as raw JSON (not wrapped in ", {"code": '{\"value\": ...}'}, ")"]},
{"para": ["Operation responses: ", {"code": '{\"status\": \"ok\"}'}, " or ", {"code": '{\"error\": \"message\"}']}]
]
}