This is the Communote REST API for the communote microblogging system. The API provides a resources for the components of communote (e.g. Topics, Notes). An overview of all resources you can found under Available Resource.

We recommend to use the Content-Type application/json;charset=UTF-8 for request. Please read the section Tunneling before you start an request. (Thats necessary because there is a distinctive different for using requests with HTTP-Method PUT and DELETE.)

If the request was succeed, you get the following response format:

"status": "OK"
// returned resource as json or resources as json-array
"result": ...
// only if you request with a resource with HTTP-Methode LIST
"metaData":  
{
        // number of all found elements
        "numberOfElements": "45" 
        // there are more elements after the 
        // choosen offset and maxCount  
        "moreElementsAvailable": "true"  
}

If the request fails, you get the following error response format:

"status": "ERROR"

// general error message
"message": "general message" 

// only if you request with a resource with HTTP-Methode LIST
"errors":  
{
        // mentioned incorrect element 
        "cause": "element"  
        // specific error message for this incorrect element
        "message": "element is incorrect" 
}

As Response you get Content-Type application/json or Content-Type text/html. Content-Type text/html gives you an html-container who contain a global javascript variable with the result. The table below gives you an explanation for using extensions.

URL-ExtensionResponse Content-Type
.../Resource/IDapplication/json;charset=UTF-8
.../Resource/ID.jsonapplication/json;charset=UTF-8
.../Resource/ID.htmltext/html;charset=UTF-8

Tunneling

Some servers or proxies don't allow the use of other HTTP methods than GET and POST, also many browsers only support GET and POST. To circumvent this problem it is possible to use a technique called tunneling.
Instead of sending the request using the intended method, for instance PUT, the request will be send as POST and the intended method will be set as GET parameter _method.
Please refer to the servers documentation to find out, if you have to use tunneling for your requests. This documentation was generated with tunneling enabled.

Usage of HTTP-Methods

MethodTunneling MethodTunneling Url
POSTPOST.../Resource/
PUTPOST.../Resource/ID?_method=PUT
GETGET.../Resource/ID
LISTGET.../Resource/
DELETEPOST.../Resource/ID?_method=DELETE