dbsync_srvapp.register_central_app_params()

Registers parameters for the DB Sync server-side app.

Syntax

FUNCTION register_central_app_params(
      dbschema_filename STRING,
      app_id dbsync_core.t_app_id,
      user_id dbsync_core.t_user_id
  )
  1. dbschema_filename defines the path to the schema file.
  2. app_id defines the app id for the DB Sync server-side app; this is a string.
  3. user_id defines the user id; this is a string.

Usage

In this call, the schema_filename must be the JSON file containing the database schema definition. To create the schema file, see Set up the database schema file or Set up DB Sync in direct mode. The schema file must be deployed with application program files.

The app_id parameter identifies the server-side application in the DB Sync system. This app_id is created with the DB Sync app definition console.

The user_id parameter identifies the end user which is using the current server-side app. This user_id must exist. It can be created in the DB Sync system with the DB Sync user definition console, or it can be automatically registered with the dbsync_srvapp.auto_register_user() function.

If you are not using GAS/SSO to authenticate server-side DB Sync users, the application must identify the end user to get the user_id. For example, call the dbsync_core.enter_user_credentials() function to ask the end user for a login/password.

When using GAS/SSO to authenticate server-side DB Sync users, the user_id should be the OIDC subject assigned to the SSO user. In the context of the server-side app, the OIDC subject can be found in the OIDC_SUB environment variable:
LET user_id = fgl_getenv(“OIDC_SUB“)

For more details about server-side app and user setup, see Set up DB Sync for server-side apps.