-
Notifications
You must be signed in to change notification settings - Fork 7
Interface
wurfkeks edited this page Aug 1, 2012
·
9 revisions
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
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}]
Example: {"title":"Test1","_id":1,"created":1339242751357,"note":"Test Note 1","modified":1339242751357}
* 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
* Method: GET * Deletes all notes * Status Code 200
* Method: GET * /notes/delete?id=1 * Deletes the note with the given id * Status Code 200
* 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
Example: [{"accessed":1342539277820,"_id":1,"created":1342539277820,"modified":1342539277820,"name":"My shopping list"},{"accessed":1342553022638,"_id":2,"created":1342553022638,"modified":1342553022638,"name":"Lidl"}]
Example: {"title":"Test1","_id":1,"created":1339242751357,"note":"Test Note 1","modified":1339242751357}