Skip to main content Skip to complementary content

PatchTask

Use the methods described in this topic to get and modify settings of existing tasks.

Required user role

See Required Enterprise Manager permissions.

Payload overview

The payload should be in JSON format and determines:

  • Setting values that will be changed

  • Settings that will be disabled

As the API reflects the behavior and functionality of the Replicate UI, some settings require certain parent settings to be enabled before they can be modified. For example, it is not possible to enable the Optimize handling when LOB size is less than option when the Replicate LOB columns option is disabled. Therefore, if you are not sure whether the parent settings are enabled, to prevent errors, best practice is to include operations for enabling the parent settings in the request payload as well. Examples of how to do this are provided below.

Information noteTo verify a command in the Replicate console, you must first refresh your browser.

Changing a setting value

Syntax

The syntax for changing a setting value is as follows:

[
	{ "op": "add", "path": "full path to setting", "value": new-value }
]

Example

The following example shows how to change the Maximum number of tables setting in the Full Load Tuning tab.

[
	{ "op": "add", "path": "/full_load_sub_tasks", "value": 100 }
]

Reverting to the default setting value

You revert a setting to its default value by using the "remove" command. If the setting is dependent on other settings being enabled, you also need to enable those settings before you can revert the specific setting to its default. If you are aware that the related settings are already enabled, then you can simply use the "remove" operation.

Example

In the following example, the user wants to revert the Chunk size (KB) (lob_chunk_size) setting to its default value. Changing this setting or restoring its default requires the Replicate LOB columns and Allow unlimited LOB size settings to be enabled. Because the user is not sure they are enabled, he includes operations for enabling them in the request payload.

[
	{ "op": "add", "path": "/common_settings/support_lobs", "value": true },
	{ "op": "add", "path": "/common_settings/lob_max_size", "value": 0 },
	{ "op": "remove", "path": "/common_settings/lob_chunk_size" }
]

If the user knew beforehand that the Replicate LOB columns and Allow unlimited LOB size settings were enabled, he would only need to include the "remove" operation in the request payload.

[
	{ "op": "remove", "path": "/common_settings/lob_chunk_size" }
]

Enabling or disabling a setting (the equivalent of selecting or clearing a check box)

You enable a setting using the "add" operation. You can disable a setting using the "remove" operation or by setting the value to "false".

Enabling a setting

The syntax for enabling a setting is as follows:

[
	{ "op": "add", "path": "path_to_setting", "value": true }
]

To enable the Replicate LOB columns option:

[
	{ "op": "add", "path": "/common_settings/support_lobs", "value": true }
]

Disabling a setting using the "remove" operation

The syntax for disabling a setting using the "remove" operation is as follows:

[
	{ "op": "remove", "path": "path_to_setting" }
]

To disable the Replicate LOB columns option:

[
	{ "op": "remove", "path": "/common_settings/support_lobs" }
]

Disabling a setting by setting its value to "false"

The syntax for disabling a setting by setting its value to "false" is as follows:

[
	{ "op": "add", "path": "path_to_setting", "value": false }
]

To disable the Replicate LOB columns option:

[
	{ "op": "add", "path": "/common_settings/support_lobs", "value": false }
]

 

Configuring task settings

Call PutTaskProperties to modify all supported task settings, except the task description.

Syntax

public void PutTaskProperties(AemTaskProperties payload, string server, string task)

Parameters

Parameters
Parameter Type Description
AemTaskProperties payload

A JSON payload containing the settings to modify.

server string

The Replicate server name as defined in Enterprise Manager.

Example:

myrepsrv1

task string

The name of an existing task.

Payloads for supported settings

Setting or removing the task description

Call AemTaskProperties GetTaskProperties to modify or remove the task description.

Syntax

public AemTaskProperties (GetTaskProperties payload, string server, string task)

Parameters

Parameters
Parameter Type Description
GetTaskProperties payload

The payload as shown below.

server string

The Replicate server name as defined in Enterprise Manager.

Example:

myrepsrv1

task string

The name of an existing task.

Payload

Action Payload with examples
Add Valid Description

Add a description (Uppercase/Lowercase/Numbers/Space/Special Characters)

{
  "description": "important task"
}
Remove Description

Remove the description

{
  "description": ""
}

Getting all settings, except Replicate loggers, the task description, and error handling

Call PatchTaskSettings to get current values for all settings, except Replicate loggers, the task description, and error handling settings.

Syntax

public void PatchTaskSettings(string payload, string server, string task)

Parameters

Parameters
Parameter Type Description
string payload

The JSON payload consisting of the settings.

Payload example:

Find out if LOB support is enabled, the maximum LOB size, and the target schema:

[
  { "path": "/common_settings/support_lobs" },
  { "path": "/target_settings/default_schema" },
  { "path": "/common_settings/lob_max_size" }
]
server string

The Replicate server name as defined in Enterprise Manager.

Example:

myrepsrv1

task string

The name of an existing task.

Getting the settings for Replicate loggers, the task description, and error handling

Call TaskSettingsPatchTemplate to get current values for Replicate loggers, the task description, and error handling.

Syntax

public string TaskSettingsPatchTemplate(string payload, string server, string task)

Parameters

Parameters
Parameter Type Description
string payload

The JSON payload consisting of the settings to get.

server string

The Replicate server name as defined in Enterprise Manager.

Example:

myrepsrv1

task string

The name of an existing task.

Errors

Apart from specific errors related to settings that are not valid, you might also encounter general errors. For more information on these, see general errors.

Did this page help you?

If you find any issues with this page or its content – a typo, a missing step, or a technical error – please let us know!