API 0.2

Hendrik Leppelsack edited this page Dec 10, 2016 · 2 revisions

The Notes app 0.2 offers a RESTful API

Authentication & Basics

Because REST is stateless you have to send user and password each time you access the API. Therefore running Nextcloud with SSL is highly recommended otherwise everyone in your network can log your credentials.

The base URL for all calls is:

https://user:password@yournextcloud.com/index.php/apps/notes/api/v0.2/

All defined routes in the Specification are appended to this url. To access all notes for instance use this url:

https://user:password@yournextcloud.com/index.php/apps/notes/api/v0.2/notes

Input

In general the input parameters can be in the URL or request body, the App Framework doesn't differentiate between them.

So JSON in the request body like:

{
  "id": 3
}

will be treated the same as

/?id=3

It is recommended though that you use the following convention:

  • GET: parameters in the URL
  • POST: parameters as JSON in the request body
  • PUT: parameters as JSON in the request body
  • DELETE: parameters as JSON in the request body

Output

The output is JSON.

Specification

Clone this wiki locally
You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.
Press h to open a hovercard with more details.