Skip to content
wurfkeks edited this page Jun 14, 2012 · 9 revisions
Call Method Example Explanation Response Example
/ GET
  • Redirects to /index.html
  • Status Code: 301
  • "Location" header contains new url
/notes/get GET
  • Returns a JSON Array of JSON Objects.
  • Status Codes:
    • 405 if method is not GET
    • 500 if exception during creation of response is thrown
[{"title":"Test2","_id":2,"created":1339242756956,"note":"Test]
/notes/get?id= GET /notes/get?id=1
  • Returns a JSON Object of the requested note
  • Status Codes:
    • see /notes/get
    • 404 if the requested note could not be found
{"title":"Test1","_id":1,"created":1339242751357,"note":"Test Note 1","modified":1339242751357}
/notes/new POST Form parameters:
  • title
  • note
  • tags (optional)
  • Creates and persists a new note
  • Status Codes:
    • 500 if parameter parsing failed
    • 400 if parameters are wrong
/notes/delete GET
  • Deletes all notes
  • Status Code: 200
/notes/delete?id= GET /notes/delete?id=1
  • Deletes note with given id
  • Status Code: 200
/notes/update POST Form parameters:
  • _id
  • title
  • note
  • tags (optional)
  • Creates and persists a new note
  • Status Codes:
    • 500 if parameter parsing failed
    • 400 if parameters are wrong

Every call would redirect to /login.html when authentication is required.

Clone this wiki locally