15 API Functions
Lukas Metzger edited this page 2018-04-13 17:37:09 +02:00

General

  • all Read functions are executed with HTTP GET requests
  • all Create functions are executed with HTTP POST requests
  • all Update functions are executed with HTTP PUT requests
  • all Delete functions are executed as HTTP DELETE requests
  • Search functions are executed as a GET request with URL parameters.
  • API functions that return data do so via json objects.
  • API fucntions that accept data do so via json objects in the request body.

API results should be indicated with the matching HTTP status code. Specific codes are described next to the API, but here are some general errors.

code result
400 The provided body is not valid json
403 Either no authentication headers are supplied or the user has not enough permissions

The JSON examples use the following Convention

{
  "foo": "this is a required property",
  "bar?": "this is an optional property"
}

If a call errors it provides a json with an error field. This contains a plain text description of the error. Additionally some errors provide a code field which can have the following values.

code description
invalid_session The supplied session token is invalid (often caused by session expiration)

Versioning

This documentation documents the API in version 1. All URLs are relative to /api/v1

API Functions