Steps to start a new import

Introduction

Before you start a new import, you should read the Getting Started With DMM API. In this page, you have the installation steps to start using the DMM API.

In all the requests you have to pass the header X-DMM-Token. This value is the one define in the section Define the REST API key from the Getting Started With DMM API page.


Create the connections

When you install the DMM API, it is automatically created the Runtime Connection. If you want to import data to this environment, you don't need to create any connection, otherwise you can create a Data Destination connection using the CreateConnection request.

Start the import

To start a new import, you should use the StartExecution request.

The Type parameter is Import.

This request has the header X-DMM-Token-OTP and the value can be found in the environment where the import is to be executed, in the Authentication Token page.

You can find more information about the JSON configuration in the Start Execution import configuration page.

The zip file to import can be generated using the export execution.

If this request finishes without any error, in the response you find the MainExecutionTrackerId. You will need this value to use the remaining requests related to this import.

Stop the import

You can use the StopExecution request to stop the import. The import process will be stopped and no more chunks will be imported. The entities that already were imported will not be reverted!

Check the import status

You can use the GetExecutionStatus request to obtain some information about the import.

With this request you can get some reports (if you pass the parameter IncludeReports with value true), like number of records and when the import was started, and you can also get the execution log if you pass the parameter IncludeLogs with the value true.

Also, with the parameters LogRecords and LogPage you can have pagination in the logs (by default, you only will obtain the first 10 lines).

The log information will be return in the parameter Logs. This field is sent as a base64 string, so you need to do a base64 decode to obtain the log lines.

To learn more about this request response, you can follow this link.

Get the import final reports

You can use the GetExecutionOutputs request to obtain the final outputs when the import is finished.

This request only return data if the import already finishes (status InError or Complete). You can know the status with the GetExecutionStatus request, in the field Status.

With this request you can get some final reports (if you pass the parameter IncludeReports with value true), like number of records and when the import was started.

You can also get the execution final logs if you pass the parameter IncludeLogs with the value true. This field is sent as a base64 string, so you need to do a base64 decode to obtain the log zip file. After you do the base64 decode, you can save the file with the extension .zip. Inside this zip file, you can find one or more files with all the logs from the import.

To learn more about this request response, you can follow this link.