HTTP server and command line tools for Leisure.
/v1/doc/create/ID
/v1/doc/create/ID?alias=ALIAS
If no ID is given one will be created
Body is the document content
Returns a JSON string the document ID
/v1/doc/list
returns a JSON list of each document and its alias (or null if there is none)
/v1/session/create/
/v1/session/connect/SESSION_NAME
/v1/session/connect/SESSION_NAME?docId=ID
With docId, it will automatically create a session on the given document
/v1/session/list
/v1/session/get/
/v1/session/replace
Body is a JSON struct like this:
{...}
/v1/session/update
?minutes=2
Will wait for a given number of minutes for an update (defaults to 2). If this returns true, there is an update and the client should make a replacement.