REST API for database migration

New in 8.10.2.2 You can use a REST API to copy the contents of an old database into a new schema, and grant the required privileges to the database user referenced in the data source.

Use the following REST API functions to upgrade a Decision Center database schema.

Table 1. REST API functions for migration
REST API function Purpose Equivalent Ant task
/v1/DBAdmin/migrationrole Creates an SQL script that grants the required privileges to the database user referenced in the data source. The role has select permission on all the required tables in the old database. You can use this role task on any database, not just those requiring specific privileges. However, you do not have to use the generated script on all the databases. gen-migration-role
/v1/DBAdmin/migration Creates the SQL script that is used to copy the old database content into the new schema. gen-migration-script
/v1/DBAdmin/execute Executes the created SQL script. execute-script

/v1/DBAdmin/status

Shows the status of a running script. None

To avoid concurrency issues, only one script execution is possible for a given data source. If an execution is already running for the data source, the execute endpoint produces an error.

The status endpoint receives the execution status for the data source. It displays the following information:
  • Status: running, success or failure
  • Running statement: shown when run did not complete or if an error occurred
  • Error message: shown when an error occurred

When no script is run for a data source, an error message is displayed.

Demonstration video

The following video shows how to use REST API to migrate the Decision Center database when using MSSQL as the database server:

Video shows a demo on migrating Operational Decision Manager.