Skip to content

API 2.0

Sander edited this page Jul 3, 2017 · 7 revisions

The app offers a RESTful API

DRAFT

Authentication & Basics

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

The base URL for all calls is:

https://user:[email protected]/index.php/apps/ownnote/api/v2.0/

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

https://user:[email protected]/index.php/apps/ownnote/api/v2.0/notes

Input

In general the input parameters can be in the URL or request body, the App Framework doesnt 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