Skip to content
Alfred Bühler edited this page Jun 25, 2018 · 15 revisions

Get all notes

  • Status: Implemented
  • Method: GET
  • Route: /notes
  • Parameters:
    • exclude (since 0.5): fields which should be excluded, separated with a comma e.g.: ?exclude=content,title
  • Returns:
[
    {
        "id": 76,
        "modified": 1376753464,
        "title": "New note",
        "content": "New note\n and something more",
        "favorite": false
    }, // etc
]

Note: the attribute favorite exists since 2.0.3.

Get a note

  • Status: Implemented
  • Method: GET
  • Route: /notes/{noteId}
  • Parameters:
    • exclude (since 0.6): fields which should be excluded, separated with a comma e.g.: ?exclude=content,title
  • Return codes:
  • HTTP 404: If the note does not exist
  • Returns:
{
    "id": 76,
    "modified": 1376753464,
    "title": "New note",
    "content": "New note\n and something more",
    "favorite": false
}

Note: the attribute favorite exists since 2.0.3.

Create a note

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: Implemented
  • Method: POST
  • Route: /notes
  • Parameters:
{
    "content": "New content"
}
  • Returns:
{
    "id": 76,
    "modified": 1376753464,
    "title": "New title",
    "content": "New content",
    "favorite": false
}

Note: the attribute favorite exists since 2.0.3.

Update a note

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. 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: Implemented
  • Method: PUT
  • Route: /notes/{noteId}
  • Parameters:
{
    "content": "New content",
    "favorite": true
}

Note: the attributefavorite is optional and exists since 2.0.3. If favorite is omitted, the notes favorite attribute is not changed. Since 2.0.3, content is optional. If content is omitted, the notes content is not changed.

  • Return codes:
  • HTTP 404: If the note does not exist
  • Returns:
{
    "id": 76,
    "content": "New content",
    "modified": 1483888647,
    "title": "New title",
    "favorite": true
}

Note: the attribute favorite exists since 2.0.3.

Delete a note

Deletes a note with the id noteId

  • Status: Implemented
  • Method: DELETE
  • Route: /notes/{noteId}
  • Parameters: none
  • Return codes:
  • HTTP 404: If the note does not exist
  • Returns: nothing
Clone this wiki locally