Skip to end of metadata
Go to start of metadata

This is a first version of the protocol, it can change at any time.

You can use Oxyd at 3 levels

  • using directly the Core
  • Server via a REST API
  • Using the Client API

Parameters in REST API can be sent via POST or GET method.

getWorkspaces

return the list of workspaces

  • rest API
    /oxyd/command/listworkspaces
  • client API
    List listWorkspaces()
  • core
    List getWorkspacesNames(Context context)

getWorkspaceDocuments

return the list of documents in a workspace

  • rest API
    /oxyd/command/getworkspacedocuments/SpaceName
  • client API
    List getWorkspaceDocuments(String workspace)
  • core
    List getWorkspaceDocumentsName(String spaceName, Context context)

getDocument

return the selected document

  • rest API
    /oxyd/command/getdocument/Workspace/DocumentName
  • client API
    Document getDocument(String workspace, String docName)
  • core
    IDocument getDocument(String workspace, String docName, Context context)

createDocument

create a document and return it

  • rest API
    /oxyd/command/createdocument/WorkspaceName/DocumentName
  • client API
    Document createDocument(String workspace, String docName)
  • core
    IDocument createDocument(String workspace, String docName, Context context)

addBlock

create a block in the selected document and set the first position an content

  • rest API
    /oxyd/command/addblock/WorkspaceName/DocumentName?position=2&content=this%20is%20the%20content
    content is optional
  • client API
    Block addBlock(Document doc, String pos, byte[] content)
  • core
    IBlock addDocumentBlock(String workspace, String docName, String pos, byte[] content, Context context)

updateBlock

update the content of a block

  • rest API
    /oxyd/command/updateblock/WorkspaceName/DocumentName?blockid=2&content=this%20is%20the%20content
  • client API
    boolean updateBlock(Block block)
  • core
    void UpdateDocumentBlock(String workspace, String docName, long blockId, byte[] content, Context context)

getUpdates

return the list of modified blocks

  • rest API
    /oxyd/command/getupdates/Workspace/Document?sinceversion=42
  • client API
    void getUpdates(Document doc)
  • core
    List getUpdate(String workspace, String docName, long sinceVersion, Context context)

lockBlock

lock the block

  • rest API
    /oxyd/command/lockblock/WorkspaceName/DocumentName?blockid=42
  • client API
    boolean lockBlock(Block block)
  • core
    void lockDocumentBlock(String workpace, String docName, long blockId, Context context)

unlockBlock

unlock the block

  • rest API
    /oxyd/command/unlockblock/WorkspaceName/DocumentName
  • client API
    boolean unlockBlock(Block block)
  • core
    void unlockDocumentBlock(String workpace, String docName, long blockId, Context context)

moveBlock

allow to move a block (usefull for text)

  • rest API
    none for the moment
  • client API
    none for the moment
  • core
    none for the moment
Labels: