Creating schemas with REST API

New in 8.10.5 A set of REST API endpoints is dedicated to managing model extensions. You can use the REST API to create the database schema.

Before you begin

To use the endpoints for managing model extensions, you must have the installer or administrator role. Model extensions are related to the Decision Center schema.

About this task

You must use the endpoints in the following order to create a database schema.

Procedure

  1. Open the Decision Center REST API Swagger:
  2. Use the following endpoint to retrieve the default model extension files:
    /v1/DBAdmin/modelextensionfiles

    This action retrieves a compressed archive that contains the default model and data extension files, and all the default message files for the locales that are supported by default.

  3. To download an SQL script to create the database schema, use the following endpoint with either the default model and data files or the user customized model and data files:
    /v1/DBAdmin/createschema

    The keepData flag has no incidence when the schema is empty. When the SQL script is downloaded, you can modify it to comply with any requirements that your organization might have, for example, credentials to modify schema.

  4. Run the SQL script by using the following endpoint to create the database schema:
    /v1/DBAdmin/execute

    The completion of the SQL script can be seen in the following endpoint:

    /v1/DBAdmin/status
  5. Use the following endpoint to persist the model extension and data extension files. This step is a mandatory after you run the SQL script.
    /v1/DBAdmin/uploadextensionmodel

    Now, you can use the model set in the tables.

  6. Use the following endpoint to upload a message file that corresponds to the used model extensions:
    /v1/DBAdmin/uploadmessagesfile

    This endpoint needs to be called for every message file that must be uploaded.

  7. Use the following endpoint to verify the model extension files:
    /v1/DBAdmin/modelextensionfiles