API Express Project

Working with API Express projects.

To create your first REST API you need to create an API Express project. A project holds one or more APIs.

📘

How to Add API Express into Mobile Application

You might also like this video for detailed instructions on how to:

  • create a Database connection to a relational DB,
  • expose the relational DB data as a REST service and
  • use this functionality in an Appery.io mobile app:

Creating New Project

To create a new API Express project, under the API Express tab, simply click the Create new project button:

1256

In the new window, enter the project name and an optional description. Then click the Create button.

Importing Project

You can also import a previously saved API Express project. If you have the backup file, click Import from backup and select the backup file:

1222

To export a backup, go to the Settings page inside the project:

1692

Working with Folders and Services

This section explains how to work with folders and start creating services.

New Folder

Inside a project, you can create one or more folders by clicking the new folder link:

1684

A folder allows you to organize your APIs. The folder name will be part of the REST API endpoint name. This is your traditional folder, like on your computer. It's a good idea to give the folder some description. You can now create a sub-folder inside this folder.

To edit or delete a folder, use the edit and delete links.

New Service

To start creating a new service, click the new service link:

1652

In the new service popup you will see the following options:

Service group name

A group name to organize the services. A group name will be part of the API endpoint.

Type

There are two main ways to create services in API Express.

  1. If you need to expose a relational database table via APIs, you can use Generate REST API. With this option, APIs will be automatically generated for a database table.
  • No other services can be created inside this service group.
  1. The Custom REST API option will launch the Visual Service Builder where you can create advanced service logic.
  • Inside this service group you can only create other custom APIs.

It's a good idea to specify a service description to make it easier to find the service that you need later.

Service keys

The Service keys page is where you can store keys which can be used by any APIs in this project.

1694

For example, it's a good place to store values that don't change or change very rarely such as API keys. Go to the Components Data page and then to the Params section to learn more how to use these keys.

Settings

In the project's Settings page, you can:

  • Rename or edit the project description.
  • Delete the project.
  • Export the project backup:
994

API key

The API key is used in every request to a service, usually appended in the URL.

1491

📘

Note!

It is incorrect "usually appended in the URL" apiKey is passed in URL for testing purposes and in production mode should be passed as a header.

Debug Mode

When testing API services show additional error information such as native database SQL errors.

📘

Note!

It is recommended to disable the Debug mode when the app is in production because additional error information can contain internal information about the database and etc.

Secure REST API

Allow only authenticated users to call REST APIs in this project. Learn how to configure Security.

Limits

API Express custom and generated services have a set of limitations on request and response. In case of exiting these limitations, API Express returns predefined code and message.

Request
Request size can't exceed 5242880 bytes

  • API Express code AE018
  • HTTP code 413
  • message Body request max size is exceeded.

Response
Response size can't exceed 10241000 bytes and count of records can be more then 1000

  • API Express code AE102
  • HTTP code 400
  • message Data is too long.