Skip to main content

TDM REST API

Manage API tokens and Test Data Management (TDM) operations in Enov8’s REST API by creating, updating, retrieving, testing connections, and generating reports.


Endpoints Overview

OperationHTTP MethodURL Structure
Create TDM ObjectPOST{ecosystem api url}/DataConnection
Retrieve TDM ObjectGET{ecosystem api url}/DataConnection
Update TDM ObjectPUT{ecosystem api url}/DataExecutionResult
Test Data ConnectionPOST{ecosystem api url}/dcstestconnection
TDM Operations ExecutionPOST{ecosystem api url}/rundcs
Get TDM LogGET{ecosystem api url}/tdm_get_log
Get TDM ReportGET{ecosystem api url}/tdm_get_report

Authentication and Prerequisites

Authentication Headers

To authenticate API requests for TDM (Test Data Management), you need to include specific headers in every request. These headers ensure that the application and user are authorised to access the API.

Required Headers

Every request made to the Ecosystem REST-API must include the following headers:

  • app-id: Identifies the application key making the request.
  • app-key: The secret key used to authenticate the request.
  • user-id: Identifies the user on whose behalf the request is being made.

These headers are mandatory and must be included in every API request to successfully authenticate and access the REST API.

Example Request: Get TDM Report

To retrieve a filtered TDM report, use the following curl request. This example demonstrates how to include the necessary authentication headers.

Request
curl -X GET "{ecosystem_api_url}/ecosystem/api/tdm_get_report" \
-H "app-id: your_app_id" \
-H "app-key: your_app_key" \
-H "user-id: your_user_id"

Ecosystem API Tokens

To generate your Ecosystem API key, please follow the steps in the API Key Guide.

Base64 Encoding

Most payloads are base64 encoded using UTF-8.


Example Requests and Responses

Create TDM Object

HTTP Method: POST
URL: {ecosystem api url}/DataConnection

Headers:

app-id: {your_app_id}
app-key: {your_app_key}
user-id: {your_user_id}

Description: This endpoint creates a new Data Connection in the Enov8 ecosystem.

Sample URL:

POST {ecosystem api url}/DataConnection

Post Body:

{
"Connection Name": "csv_file",
"Type": "File - Delimited",
"Status": "Active",
"Assigned To": "ECO-000000004182",
"Organisation": "ECO-000000003945",
"Connection String": "{\"File Path\":\"L3BhdGhGdGV8Vm1zZS50eHQ=\",\"File Delimiter\":\"\\\\t\",\"File Header\":\"WWVz\",\"Header Count\":\"MQ==\",\"Footer Count\":\"MA==\",\"File Quote\":\"\"}"
}

Connection String Example:

MSSQL Connection String, depending the database type utilised, the keys will change:

{
"Server": "{b64_encoded_server}",
"Username": "{b64_encoded_username}",
"Password": "{b64_encoded_password}",
"Database": "{b64_encoded_database}",
"Port": "{b64_encoded_port}",
"Authentication Mechanism": "{b64_encoded_auth_mech}",
"Certificate Authentication File Path": "{b64_encoded_cert_auth_fp}",
"Client Certificate File Path": "{b64_encoded_client_cert_fp}",
"Certificate Key File Path": "{b64_encoded_cert_key_fp}"
}

Response:

  • 201 Created: The Data Connection was successfully created.
{
"success": true,
"total_attempted": 1,
"total_created": 1,
"result": [
{
"success": true,
"System ID": "ECO-00000123"
}
],
"value passed": "{passed_body}"
}

Retrieve TDM Object

HTTP Method: GET
URL: {ecosystem api url}/DataConnection

Headers:

app-id: {your_app_id}
app-key: {your_app_key}
user-id: {your_user_id}

Description: Retrieves details for various TDM objects (e.g., Data Connections, Execution Results) using specific filters such as Status, Type, and Timestamp.

Sample Request:

GET {ecosystem api url}/DataConnection?status=active&type=mssql

Response:

  • 200 OK: Returns a filtered response for the Data Connection object.
{
"System ID": "ECO-00000123",
"Connection Name": "MSSQL Connection",
"Type": "mssql",
"Status": "Active",
"Assigned To": "ECO-000000004182",
"Organisation": "ECO-000000003945",
"Profiling Date": "2024-09-19",
"Masking Date": "2024-09-20",
"Validation Date": "2024-09-21",
"Connection Size": "50 GB"
}

Update TDM Object

HTTP Method: PUT
URL: {ecosystem api url}/DataExecutionResult

Headers:

app-id: {your_app_id}
app-key: {your_app_key}
user-id: {your_user_id}

Description: Updates an existing TDM object such as Data Execution Results.

Sample Request:

PUT {ecosystem api url}/DataExecutionResult

Update Body:

{
"System ID": "ECO-00000123",
"Status": "Active"
}

Response:

  • 200 OK: The object was successfully updated.
{
"success": true,
"total_attempted": 1,
"total_updated": 1,
"result": [
{
"success": true,
"System ID": "ECO-00000123"
}
],
"value passed": "{passed_body}"
}

Test Data Connection

HTTP Method: POST
URL: {ecosystem api url}/dcstestconnection

Headers:

app-id: {your_app_id}
app-key: {your_app_key}
user-id: {your_user_id}

Description: Tests a Data Connection using either the connection string or system ID.

Test Using Connection String:

POST {ecosystem api url}/dcstestconnection

Post Body:

{
"database_type": "{db_type}",
"org_id": "{org_id}",
"user_eco_id": "{user_id}",
"connection_string": "{b64_encoded_json}"
}

Test Using System ID:

POST {ecosystem api url}/dcstestconnection

Post Body:

{
"database_type": "{db_type}",
"org_id": "{org_id}",
"user_eco_id": "{user_id}",
"connection_id": "{dataconn_id}"
}

Response:

  • 200 OK: The connection test was successful.
{
"jsonrpc": "2.0",
"message": "Connection to Data Source was successful!",
"success": true
}

TDM Operations Execution (Profiling, Masking, Validation)

HTTP Method: POST
URL: {ecosystem api url}/rundcs

Headers:

app-id: {your_app_id}
app-key: {your_app_key}
user-id: {your_user_id}

Description: Executes TDM operations like profiling, masking, or validation.

Sample Request (Profiling/Masking):

{
"configuration_id": "{config_id}",
"organisation_id": "{org_id}",
"user_eco_id": "{user_id}",
"assigned_to": "{assigned_group}",
"connection_id": "{dataconn_id}"
}

Sample Request (Validation):

{
"configuration_id": "{config_id}",
"organisation_id": "{org_id}",
"user_eco_id": "{user_id}",
"assigned_to": "{assigned_group}",
"connection_id": "{dataconn_id}",
"type": "Validate"
}

Response:

  • 200 OK: The operation was successfully initiated.
{
"jsonrpc": "2.0",
"message": "Data Compliance Script is being executed.",
"success": true
}

Get TDM Log

HTTP Method: GET
URL: {ecosystem api url}/tdm_get_log

Headers:

app-id: {your_app_id}
app-key: {your_app_key}
user-id: {your_user_id}

Description: Retrieves the TDM operation logs filtered by system_id.

Sample Request:

GET {ecosystem api url}/tdm_get_log?system_id={system_id}

Response:

  • 200 OK: The log data was successfully retrieved.

Get TDM Report

HTTP Method: GET
URL: {ecosystem api url}/tdm_get_report

Headers:

app-id: {your_app_id}
app-key: {your_app_key}
user-id: {your_user_id}

Description: Retrieves a filtered TDM report using system_id.

Sample Request:

GET {ecosystem api url}/tdm_get_report?system_id={system_id}

Response:

  • 200 OK: The report data was successfully retrieved.