-
Notifications
You must be signed in to change notification settings - Fork 19
Notes 2.0
Sander edited this page Jul 6, 2017
·
20 revisions
- Status: Draft
- Method: GET
- Route: /notes
-
Parameters:
- group -> Filter notes by group name
- deleted -> 1 to get deleted, 0 or omit to show normal notes.
- Returns:
[
{
"id": 76,
"created": 1376752464,
"modified": 1376753464,
"title": "New note"
"content": "New note\n and something more",
"shared_with": [],
"group": "Group 1"
}, // etc
]
- Status: Draft
- Method: GET
- Route: /notes/{noteId}
-
Parameters:
- exclude (since 0.6): fields which should be excluded, seperated with a comma e.g.: ?exclude=content,title
- Return codes:
- HTTP 404: If the note does not exist
- Returns:
{
"id": 76,
"created": 1376752464,
"modified": 1376753464,
"title": "New note"
"content": "New note\n and something more",
"shared_with": [],
"group": "Group 1"
}
Creates a new note and returns the note. The title is generated from the first line of the content. If no content is passed, a translated string New note will be returned as title
- Status: Draft
- Method: POST
- Route: /notes
- Parameters:
{
"title": "New note",
"content": "New note\n and something more",
"group": "Group 1"
}
- Returns:
{
"id": 76,
"created": 1376752464,
"modified": 1376753464,
"title": "New note"
"content": "New note\n and something more",
"shared_with": [],
"group": "Group 1"
}
Updates a note with the id noteId. Always update your app with the returned title because the title can be renamed if there are collisions on the server.
- Status: Draft
- Method: PUT
- Route: /notes/{noteId}
- Parameters:
{
"title": "Note title"
"content": "New content",
"group": "Group 1"
}
- Return codes:
- HTTP 404: If the note does not exist
- Returns:
{
"id": 76,
"content": "New content",
"modified": 1376753464,
"group": "Group 1",
"title": "New title"
}
Deletes a note with the id noteId
- Status: Draft
- Method: DELETE
- Route: /notes/{noteId}
- Parameters: none
- Return codes:
- HTTP 404: If the note does not exist
- Returns:
{
"success": true
}