Settings

Database settings and API keys.

Introduction

The database Settings page allows configuring and managing your database:

At the very top of the page, you can:

  • Rename the database.
  • Delete the database.
  • Clone (duplicate) the database.
  • Export all database data to JSON or CSV.

The last two options can also be used to keep your database safe for future use which is a great option to take into consideration.

🚧

If you need to create a backup of the database for further use together with your app, you will have to save it separately by exporting its data to JSON or CSV (check below for how to do it) and all of the databases connections will need to be recreated. The same applies to API Express projects and Server Code data.

Session expiration

You can set how long a user session will be valid when you do log in. The default value is 1 day. This means when a user does login and doesn't invoke any other APIs, his or her session will expire after 24 hours. After that, the user will need to log in again.

To invalidate all active user tokens immediately, click Invalidate tokens.

API keys

An API key is always used when making requests to REST API. It is added as X-Appery-Database-Id header (found in the browser address bar):

By default, the API key is hidden, to show it, click the eye icon. You can also copy the key using the corresponding button:

You can also create additional API keys. Additional API keys are useful when you want to share the database with someone for testing but then remove access. To remove access, simply delete that API key.

❗️

Removing an API key

When you remove an API key, any clients that use that API key will stop working.

Master API key

Master API key gives you full access to your data. This is basically root access. It is added as X-Appery-Master-Key header and is hidden by default. To show it, click the eye icon. You can also copy the key to the clipboard using the corresponding button:

❗️

Master API key

Don't use or share this key unless you need full access over your data.

Maintenance mode

You can turn off public access to a database. It could be useful if you need to migrate data or restrict any access to it.

Use ISO date format

This option affects the columns with the type Date.
If it is turned on, all dated in REST request responses and all API calls in server code will return dates in ISO 8601 date format - YYYY-MM-DDTHH:MM:SS.SSSZ.
If it is turned off, all dates in REST request responses will return in the format YYYY-MM-DD HH:MM:SS.SSS and all API calls in server code will return dates in the format { $date: YYYY-MM-DDTHH:MM:SS.SSSZ }

🚧

Changing this option

All new databases are created with this option turned on. It simplifies development as all predefined components expect to receive date in this format.
However if you have database with this options turned off and you already have working application please consider leaving it as is, as it doesn't affect application in any possible way. If you still want to enable this option, please check carefully all the app logic, as your app could rely on the old format and stop working as expected.

Push Notifications

This section will show the app if it uses this database for Push Notifications (Devices collection):

Share with support

When you share a database with support, the support will be able to view and edit the database data.

🚧

Don't share the database unless the support team needs access to it.