Steps to start a new delete

Introduction

Before you start a new delete, 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 delete 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 delete

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

The Type parameter is Delete.

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

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

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 delete.

Stop the delete

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

Check the delete status

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

With this request you can get some reports (if you pass the parameter IncludeReports with value true), like number of records and when the delete 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 delete final reports

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

This request only return data if the delete 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 delete 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 delete.

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