Quick Start Guide

See Tonic's API Documentation for more detailed information on the different endpoints, their parameters, and their responses.

1. Create an API Token

API tokens are created in the application on the user settings page. The user settings page can be found in the menu to the right side of the Generate button.

Once a token is created, set your authorization header to Authorization: Apikey <token>. This type of token does not expire but can be revoked by the user who created it.

2. Create a new Workspace

/api/Workspace

If successful, the response would return the workspace id that was created.

3. Assign a new source DB

/api/DataSource/source_db

Connect a source DB to your workspace that was created in the previous step.

4. Assign a new destination DB

/api/DataSource/destination_db

Connect a destination DB of the same type as the source DB to your workspace.

5. Specify the table mode for the source DB tables

/api/Workspace/{workspaceId}/bulk_table_mode

See the table modes section for more information

6. Apply generators to columns

/api/Workspace/{workspaceId}/update_replacements/{schema}/{table}

Apply Tonic generators as desired to columns.

Before starting a data generation job, it's recommended that you check for any schema changes on the source database by:

  • Reviewing changes and resolving them through the Schema Changes page

  • Sending an API request to /api/SchemaDiff to view the changes followed by /api/SchemaDiff/resolve_multiple to resolve any that appear.

7. Add data generation job to the queue

/api/GenerateData/start

You're now ready to submit a new data generation job! If successful, the response would return the DatabaseScanId.

8. Monitor your job's status

/api/GenerateData/jobs/{databaseScanId}

You can poll this API endpoint to get periodic job status updates.

See the jobs section for more information