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

System API settings

Each system API has its own settings. Without settings, a system API is NO_ACCESS : your code calls it through g.sys, the admin panel tests it, and an HTTP call is refused with 401. The token API is the exception : public unless its settings say otherwise.

Page API Info → System API → the plus button of the API.
Type T.ISystemApiSettingsTypes
Default NO_ACCESS for every system API but the token API.
Open the hash data API to the applications
1
2
3
4
5
6
7
8
9
import * as T from 'types';

let systemApi: T.ISystemApiSettingsTypes = {
    enableCaching: false,
    acceptOnlyEncryptedData: false,
    apiAccessType: T.EAPIAccessType.TOKEN_ACCESS,
    // authProviders: ['users_tg'],
};
module.exports = systemApi;

The keys

Key Values Meaning
apiAccessType NO_ACCESS (default), TOKEN_ACCESS, IS_PUBLIC Who may call it over HTTP : nobody, an API user whose group grants the system API, anybody.
authProviders names of auth providers The person tokens the call must carry. Absent : common.authProviders of the secret. [] : the API user token alone.
enableCaching true / false Cache the answers in Redis. Reset them with reset system API cache.
acceptOnlyEncryptedData true / false Refuse plain bodies : encrypted payloads.
  • Open only what applications really need : execute plain query, get secret, create indexes and the cache resets change or reveal a lot. The APIs Security Report lists the sensitive ones which are open.