Overview

Database REST API overview.

Appery.io provides a cloud database to store app data, such as customers, orders, locations, etc. Your app communicates with this cloud database via an elegantly simple REST API.

The database dashboard is used to manage all aspects of the databases, view and edit the data, run queries, and more.

Appery.io uses MongoDB version 3.2.11.

This section contains API request format for all endpoints.

Authentication

Authentication is done via HTTP headers.

Header

Description

X-Appery-Database-Id

This is the database API key (ID). Every request must have this header specified.

X-Appery-Session-Token

Session token after user login or registration. This header is required if your app users the User API and has object permissions set (via ACL).

X-Appery-Master-Key

The master key is like having root access to the database. In other words, the app (client) can read, edit and delete any data in the database. Use carefully and only when needed.

Request Format

For a POST and a PUT request the request body must be JSON, with the Content-Type header set to application/json.

Response Format

A JSON object is the response format for all requests.

An HTTP status code indicates whether the request succeeded or not:

  • A 2xx status code indicates success.
  • A 4xx status code indicates failure.

When a request fails, the response body is still JSON, but will contain an error message. For example:

{
     "code": xxx,convenient to use
     "error": "error message"
}