Open API specification for simple file-based data (markdown, text, ...) publishing server
A Moon Server is the most simplified language/technology-agnostic definition of a publishing server. Its aim is to define the absolute minimum of actions necessary for:
- Publishing notes (e.g. from Obsidian)
- Unpublishing notes
- Getting note detail by ID (generated on the server during publishment)
Any implementation following Open API specification will play nicely with Moon Server Publisher plugin for Obsidian editor.
Response
{
"name": "Article ABC",
"path": "my/folder/Article ABC.md",
"metadata": {"id": 123, "category": "lifestyle"},
"content": "Markdown",
"attachments": {"image.jpg": "base64"}
}
Creates or updates item
Body
{
"name": "Article ABC",
"path": "my/folder/Article ABC.md",
"metadata": {"id": 123, "category": "lifestyle"},
"content": "Markdown",
"attachments": {"image.jpg": "base64"}
}
Response
Response must contain an object with ID
!
{
"id" : 123,
"anything" : "else"
}
Removes the item
Response must contain an object with ID
set to null
or ID
must be completely missing (so the client system knows it was successfully unpublished)!
Response
{
"id" : null,
"anything" : "else"
}
See the source code MoonServerSpecification.yaml
To keep the definition at its absolute minimum, this specification does not solve additional functionalities like searching, paging, sorting, grouping, and other possible list actions. It's up to every single specific Moon Server implementation to define additional logic and extended endpoints to do so.