/task/{taskId}/forced/{forced}/startTask
POST
TDM_Tasks
Starts a task execution and returns the execution's task_execution_id on success. The API can get an optional input of overridden parameters for the task execution. Starting from TDM 10.1, the API can also get an optional ID of a previous execution of the task, in order to rerun the task with the override parameters of that execution.
If at least one of the validations fail, the API does not start the task. Instead, it returns a FAILED status and the validation errors.
Below is the list of the validation codes, returned by the API:
BEandLUs
Reference
selectionMethod
Versioning
ReplaceSequence
DeleteBeforeLoad
syncMode
totalNumberOfReservedEntities
versioningRetentionPeriod
reserveRetentionPeriod
If the validations pass successfully, start the task execution by populating the following TDM DB tables:
taskId
forced - this parameter indicates if the execution should ignore a failure of the task's environment connections validation. If the forced parameter is set to true, then the execution ignores the validation failure and executes the task. If the forced parameter is set to false and the environment validation fails, the execution is not initiated.
An optional request body with the following attributes:
overrideParameters - an optional object with the overridden parameters of the task execution. It is possible to populate all, part, or none of the overridden parameters. The parameter names are set in uppercase, for example: ENTITY_LIST, SOURCE_ENVIRONMENT_NAME.
taskExecutionId - new in TDM 10.1. An optional ID of an existing execution of the task. The override parameters of this execution (stored in the TASK_EXECUTION_OVERRIDE_ATTRS TDM DB table) are used as a baseline for the new execution:
Override parameters that are also populated in overrideParameters take precedence over the baseline.
Parameters that are populated neither in the baseline nor in overrideParameters are taken from the task itself.
A new task execution is always created. The input task execution ID is checked as a baseline.
The following override parameters can be set in the overrideParameters object:
{
"overrideParameters": {
"BE_ID": "string",
"ENTITY_LIST": "string",
"SOURCE_ENVIRONMENT_NAME": "string",
"TARGET_ENVIRONMENT_NAME": "string",
"TASK_GLOBALS": {
"additionalProp1": "string"
},
"NO_OF_ENTITIES": 0,
"SELECTED_VERSION_TASK_EXE_ID": 0,
"SELECTED_SUBSET_TASK_EXE_ID": 0,
"DATAFLUX_RETENTION_PARAMS": {
"units": "string",
"value": "string"
},
"RESERVE_IND": true,
"RESERVE_RETENTION_PARAMS": {
"units": "string",
"value": "string"
},
"EXECUTION_NOTE": "string",
"SELECTION_METHOD": "string",
"PARAMETERS": "string",
"BP_QUERY": "string",
"GENERATE_DATA_PARAMS": {
"additionalProp1": {"value": "string"}
},
"CUSTOM_LOGIC_FLOW": "string",
"CUSTOM_LOGIC_LU_NAME": "string",
"LOGICAL_UNITS": [
{"lu_id": 0, "lu_name": "string", "max_no_of_workers": 0, "source_affinity": "string", "target_affinity": "string"}
],
"TABLE_FILTERS": [
{"ref_table_name": "string", "interface_name": "string", "schema_name": "string",
"fields": [{"field": "string", "condition": "string", "value": "string"}]}
],
"TABLE_SAMPLING": [
{"ref_table_name": "string", "interface_name": "string", "schema_name": "string", "records_limit": 0, "partitions_limit": 0}
],
"PRE_EXECUTION_PROCESSES_PARAMS": [
{"process_id": 0, "parameter_overrides": [{"name": "string", "value": "string"}]}
],
"POST_EXECUTION_PROCESSES_PARAMS": [
{"process_id": 0, "parameter_overrides": [{"name": "string", "value": "string"}]}
]
},
"taskExecutionId": 0
}
http://localhost:3213/api/task/55/forced/true/startTask
{
"overrideParameters": {
"ENTITY_LIST": "1,2,4,9,8,11",
"SOURCE_ENVIRONMENT_NAME": "SRC1",
"TARGET_ENVIRONMENT_NAME": "TAR1",
"TASK_GLOBALS": {
"Customer.Global2": "value2",
"Customer.CUST_DETAILS": "'{\"name\":\"John\", \"age\":30, \"car\":null}'"
},
"RESERVE_IND": true,
"RESERVE_RETENTION_PARAMS": {
"units": "Days",
"value": "10"
}
}
}
{
"overrideParameters": {
"SOURCE_ENVIRONMENT_NAME": "SRC1",
"TARGET_ENVIRONMENT_NAME": "TAR1",
"TASK_GLOBALS": {
"Customer.Global2": "value2"
},
"NO_OF_ENTITIES": 10
}
}
Override the selected version:
{
"overrideParameters": {
"SOURCE_ENVIRONMENT_NAME": "TAR1",
"TARGET_ENVIRONMENT_NAME": "TAR1",
"TASK_GLOBALS": {
"EMAIL": "john123@gmail.com"
},
"SELECTED_VERSION_TASK_EXE_ID": 10
}
}
{
"overrideParameters": {
"ENTITY_LIST": "1,2,4,9,8,11,33",
"SOURCE_ENVIRONMENT_NAME": "TAR1",
"TASK_GLOBALS": {
"EMAIL": "john123@gmail.com"
},
"DATAFLUX_RETENTION_PARAMS": {
"units": "Days",
"value": "10"
},
"EXECUTION_NOTE": "Snapshot 1"
}
}
{
"overrideParameters": {
"LOGICAL_UNITS": [
{
"lu_id": 1,
"lu_name": "Customer",
"max_no_of_workers": 5,
"source_affinity": "DC1",
"target_affinity": "DC2"
}
],
"TABLE_FILTERS": [
{
"ref_table_name": "RefT",
"interface_name": "RefInterface",
"schema_name": "RefSchema",
"fields": [
{"field": "col1", "condition": "=", "value": "val1"}
]
}
],
"TABLE_SAMPLING": [
{
"ref_table_name": "RefT",
"interface_name": "RefInterface",
"schema_name": "RefSchema",
"records_limit": 100,
"partitions_limit": 2
}
],
"PRE_EXECUTION_PROCESSES_PARAMS": [
{
"process_id": 1,
"parameter_overrides": [
{"name": "param1", "value": "v1"}
]
}
],
"POST_EXECUTION_PROCESSES_PARAMS": [
{
"process_id": 2,
"parameter_overrides": [
{"name": "param1", "value": "v1"}
]
}
]
}
}
Rerun the task with the override parameters of execution 120, and override its number of entities:
{
"taskExecutionId": 120,
"overrideParameters": {
"NO_OF_ENTITIES": 20
}
}
Entity or environment permission errors - the validation errors are returned in the result:
{
"result": {
"Number of entity": "Exceeds write permission"
},
"errorCode": "FAILED",
"message": "validation failure"
}
Invalid override parameters or permission errors - the error is returned in the message:
{
"result": null,
"errorCode": "FAILED",
"message": "LOGICAL_UNITS[0] is missing required field 'lu_name'."
}
The test connection runs when the forced input parameter is set to false.
{"errorCode":"FAILED","message":"The test connection of [CRM_DB] failed. Please check the connection details of target environment TAR"}
{
"result": {
"taskExecutionId": 43
},
"errorCode": "SUCCESS",
"message": null
}
ease check the connection details of target environment TAR"}
#### Successful Execution Example
json { "result": { "taskExecutionId": 43 }, "errorCode": "SUCCESS", "message": null } ```
/task/{taskId}/forced/{forced}/startTask
POST
TDM_Tasks
Starts a task execution and returns the execution's task_execution_id on success. The API can get an optional input of overridden parameters for the task execution. Starting from TDM 10.1, the API can also get an optional ID of a previous execution of the task, in order to rerun the task with the override parameters of that execution.
If at least one of the validations fail, the API does not start the task. Instead, it returns a FAILED status and the validation errors.
Below is the list of the validation codes, returned by the API:
BEandLUs
Reference
selectionMethod
Versioning
ReplaceSequence
DeleteBeforeLoad
syncMode
totalNumberOfReservedEntities
versioningRetentionPeriod
reserveRetentionPeriod
If the validations pass successfully, start the task execution by populating the following TDM DB tables:
taskId
forced - this parameter indicates if the execution should ignore a failure of the task's environment connections validation. If the forced parameter is set to true, then the execution ignores the validation failure and executes the task. If the forced parameter is set to false and the environment validation fails, the execution is not initiated.
An optional request body with the following attributes:
overrideParameters - an optional object with the overridden parameters of the task execution. It is possible to populate all, part, or none of the overridden parameters. The parameter names are set in uppercase, for example: ENTITY_LIST, SOURCE_ENVIRONMENT_NAME.
taskExecutionId - new in TDM 10.1. An optional ID of an existing execution of the task. The override parameters of this execution (stored in the TASK_EXECUTION_OVERRIDE_ATTRS TDM DB table) are used as a baseline for the new execution:
Override parameters that are also populated in overrideParameters take precedence over the baseline.
Parameters that are populated neither in the baseline nor in overrideParameters are taken from the task itself.
A new task execution is always created. The input task execution ID is checked as a baseline.
The following override parameters can be set in the overrideParameters object:
{
"overrideParameters": {
"BE_ID": "string",
"ENTITY_LIST": "string",
"SOURCE_ENVIRONMENT_NAME": "string",
"TARGET_ENVIRONMENT_NAME": "string",
"TASK_GLOBALS": {
"additionalProp1": "string"
},
"NO_OF_ENTITIES": 0,
"SELECTED_VERSION_TASK_EXE_ID": 0,
"SELECTED_SUBSET_TASK_EXE_ID": 0,
"DATAFLUX_RETENTION_PARAMS": {
"units": "string",
"value": "string"
},
"RESERVE_IND": true,
"RESERVE_RETENTION_PARAMS": {
"units": "string",
"value": "string"
},
"EXECUTION_NOTE": "string",
"SELECTION_METHOD": "string",
"PARAMETERS": "string",
"BP_QUERY": "string",
"GENERATE_DATA_PARAMS": {
"additionalProp1": {"value": "string"}
},
"CUSTOM_LOGIC_FLOW": "string",
"CUSTOM_LOGIC_LU_NAME": "string",
"LOGICAL_UNITS": [
{"lu_id": 0, "lu_name": "string", "max_no_of_workers": 0, "source_affinity": "string", "target_affinity": "string"}
],
"TABLE_FILTERS": [
{"ref_table_name": "string", "interface_name": "string", "schema_name": "string",
"fields": [{"field": "string", "condition": "string", "value": "string"}]}
],
"TABLE_SAMPLING": [
{"ref_table_name": "string", "interface_name": "string", "schema_name": "string", "records_limit": 0, "partitions_limit": 0}
],
"PRE_EXECUTION_PROCESSES_PARAMS": [
{"process_id": 0, "parameter_overrides": [{"name": "string", "value": "string"}]}
],
"POST_EXECUTION_PROCESSES_PARAMS": [
{"process_id": 0, "parameter_overrides": [{"name": "string", "value": "string"}]}
]
},
"taskExecutionId": 0
}
http://localhost:3213/api/task/55/forced/true/startTask
{
"overrideParameters": {
"ENTITY_LIST": "1,2,4,9,8,11",
"SOURCE_ENVIRONMENT_NAME": "SRC1",
"TARGET_ENVIRONMENT_NAME": "TAR1",
"TASK_GLOBALS": {
"Customer.Global2": "value2",
"Customer.CUST_DETAILS": "'{\"name\":\"John\", \"age\":30, \"car\":null}'"
},
"RESERVE_IND": true,
"RESERVE_RETENTION_PARAMS": {
"units": "Days",
"value": "10"
}
}
}
{
"overrideParameters": {
"SOURCE_ENVIRONMENT_NAME": "SRC1",
"TARGET_ENVIRONMENT_NAME": "TAR1",
"TASK_GLOBALS": {
"Customer.Global2": "value2"
},
"NO_OF_ENTITIES": 10
}
}
Override the selected version:
{
"overrideParameters": {
"SOURCE_ENVIRONMENT_NAME": "TAR1",
"TARGET_ENVIRONMENT_NAME": "TAR1",
"TASK_GLOBALS": {
"EMAIL": "john123@gmail.com"
},
"SELECTED_VERSION_TASK_EXE_ID": 10
}
}
{
"overrideParameters": {
"ENTITY_LIST": "1,2,4,9,8,11,33",
"SOURCE_ENVIRONMENT_NAME": "TAR1",
"TASK_GLOBALS": {
"EMAIL": "john123@gmail.com"
},
"DATAFLUX_RETENTION_PARAMS": {
"units": "Days",
"value": "10"
},
"EXECUTION_NOTE": "Snapshot 1"
}
}
{
"overrideParameters": {
"LOGICAL_UNITS": [
{
"lu_id": 1,
"lu_name": "Customer",
"max_no_of_workers": 5,
"source_affinity": "DC1",
"target_affinity": "DC2"
}
],
"TABLE_FILTERS": [
{
"ref_table_name": "RefT",
"interface_name": "RefInterface",
"schema_name": "RefSchema",
"fields": [
{"field": "col1", "condition": "=", "value": "val1"}
]
}
],
"TABLE_SAMPLING": [
{
"ref_table_name": "RefT",
"interface_name": "RefInterface",
"schema_name": "RefSchema",
"records_limit": 100,
"partitions_limit": 2
}
],
"PRE_EXECUTION_PROCESSES_PARAMS": [
{
"process_id": 1,
"parameter_overrides": [
{"name": "param1", "value": "v1"}
]
}
],
"POST_EXECUTION_PROCESSES_PARAMS": [
{
"process_id": 2,
"parameter_overrides": [
{"name": "param1", "value": "v1"}
]
}
]
}
}
Rerun the task with the override parameters of execution 120, and override its number of entities:
{
"taskExecutionId": 120,
"overrideParameters": {
"NO_OF_ENTITIES": 20
}
}
Entity or environment permission errors - the validation errors are returned in the result:
{
"result": {
"Number of entity": "Exceeds write permission"
},
"errorCode": "FAILED",
"message": "validation failure"
}
Invalid override parameters or permission errors - the error is returned in the message:
{
"result": null,
"errorCode": "FAILED",
"message": "LOGICAL_UNITS[0] is missing required field 'lu_name'."
}
The test connection runs when the forced input parameter is set to false.
{"errorCode":"FAILED","message":"The test connection of [CRM_DB] failed. Please check the connection details of target environment TAR"}
{
"result": {
"taskExecutionId": 43
},
"errorCode": "SUCCESS",
"message": null
}
ease check the connection details of target environment TAR"}
#### Successful Execution Example
json { "result": { "taskExecutionId": 43 }, "errorCode": "SUCCESS", "message": null } ```