Skip to content
This page View Markdown Open in ChatGPT Open in Claude

Database settings

The settings of a database apply to every table of it, and to every API of those tables, unless a table or an API sets the same key itself.

Page API Info → DB API → select the database → Add Database Settings.
Type T.IInstanceApiSettingsTypes
Applies to The APIs of every table of the database.
Database settings
import * as T from 'types';

// Remove properties which you want to apply from parent level
let instanceColSetting: T.IInstanceApiSettingsTypes = {
    enableCaching: false,
    acceptOnlyEncryptedData: false,
    apiAccessType: T.EAPIAccessType.TOKEN_ACCESS,
    // authProviders: ['users_tg'],   // absent : common.authProviders of the secret ; [] : API user token only
};
module.exports = instanceColSetting;

The keys

Key Values Meaning
apiAccessType TOKEN_ACCESS (default), IS_PUBLIC, NO_ACCESS Who may call : with the token of an API user, anybody, or only your own code and the admin panel.
authProviders names of auth providers The person tokens the call must carry. Absent : common.authProviders of the secret. [] : the API user token alone.
acceptOnlyEncryptedData true / false Refuse plain bodies and query strings : see encrypted payloads.
enableCaching true / false Cache the answers of the reads in Redis until a write of the table : see automatic caching. Table and database level only.
  • A setting is used when it is present : leave a key out to inherit it. The order is API settings → table settings → database settings → secret → default.