Skip to content
wurfkeks edited this page Aug 1, 2012 · 9 revisions

Table of Contents

General

There are some general responses of all calls:

  • Status Code 501: the appropriate app isn't installed on the device
  • Status Code 405: the method isn't supported
  • Status Code 401: authentication is enabled but the user isn't logged in

/

 * Method: GET
 * Redirects to /index.html
 * Status Code 301
 * "Location" header contains new url

Notepad

/notes/get

 Exaple: [{"title":"Test2","_id":2,"created":1339242756956,"note":"Test Note 2","modified":1339242756956},{"title":"Test1","_id":1,"created":1339242751357,"note":"Test Note 1","modified":1339242751357}]

/notes/get?id=

 Example: {"title":"Test1","_id":1,"created":1339242751357,"note":"Test Note 1","modified":1339242751357}

/notes/new

 * Method: POST
 * Form parameters:
   * title
   * note
   * tags (optional)
 * Creates and persists a new note
 * Status Code
   * 500: parameter parsing failed
   * 400: parameters are wrong, like missing parameter or empty value

/notes/delete

 * Method: GET
 * Deletes all notes 
 * Status Code 200

/notes/delete?id=

 * Method: GET
 * /notes/delete?id=1
 * Deletes the note with the given id
 * Status Code 200

/notes/update

 * Method: POST
 * Form parameters:
   * _id
   * title
   * note
   * tags (optional)
 * Creates and persists a new note
 * Status Code
   * 500: parameter parsing failed
   * 400: parameters are wrong, like missing parameter or empty value

Shoppinglist

/shoppinglist/list/get

 Example: [{"accessed":1342539277820,"_id":1,"created":1342539277820,"modified":1342539277820,"name":"My shopping list"},{"accessed":1342553022638,"_id":2,"created":1342553022638,"modified":1342553022638,"name":"Lidl"}]

/shoppinglist/list/get?id=

 Example: {"title":"Test1","_id":1,"created":1339242751357,"note":"Test Note 1","modified":1339242751357}

Clone this wiki locally