SetChangeDataRetentionBarrier
General
Description
The method can be used to:
- Set a retention barrier for deleting consumed partitions. Setting a retention barrier will initiate periodic deletion of consumed Change Data Partitions from the target database defined for the specified task. Partitions will be deleted according to the Allow consuming applications to delete partitions every interval set on Replicate Server, and up to the specified "retention_point".
- Remove the retention barrier, thereby stopping periodic deletion of consumed Change Data Partitions.
- Partitions will only be deleted if the Change Data Partitioning and Partition Retention options are enabled in the Replicate console.
- Partitions will only be deleted if the task is running. If the task is not running, the partitions will be deleted the next time it runs.
- Only partitions that are not locked by a consuming application will be deleted.
URL
https://{host:port}/attunityenterprisemanager/api/v1/servers/{server}/tasks/ {task}?action=set_change_data_retention_barrier
HTTP method
PUT
Required user role
See Required Enterprise Manager permissions.
Request parameters
Location | Name | Required | Description/Example |
---|---|---|---|
URL |
host [string] |
Yes |
The host name of the Enterprise Manager machine. Example: computer.network.net |
URL |
server [string] |
Yes |
The Replicate server name, as defined in Enterprise Manager. Example: myrepsrv1 |
URL |
task [string] |
Yes |
The Replicate task name. Example: TargetAWSEMR |
Request body
Body for setting a retention barrier
retention_point=timestamp
application=application_name
Where:
- timestamp is the date up to which partitions can be deleted. The timestamp must be in the following format: (yyyy'-'MM'-'dd'T'HH':'mm':'ss'Z').
- application_name is the name of the consuming application.
Example:
retention_point=2020-06-30T16:15:00Z
application=Compose
Body for removing the retention barrier
retention_point=
application=application_name
Where application_name is the name of the consuming application.
cURL example
PUT attunityenterprisemanager/api/v1/servers/roni-2012/tasks/Oracle2NULL?action=set_change_data_retention_barrier
Parameters:
"retention_point":"2020-06-30T16:15:00Z",
"application": "xxx"
Error response
HTTP Code | Enterprise Manager Code | Text | Description |
---|---|---|---|
500 |
AEM_TASK_NOT_FOUND |
Replication task {task] on server {server} could not be found. |
Returned when an unknown task name is encountered. |
500 | AEM_INVALID_TIMESTAMP_FORMAT | The specified partition retention barrier does not conform to the expected timestamp format. Timestamp format should be yyyy'-'MM'-'dd'T'HH':'mm':'ss'Z'. | Returned when the specified partition retention barrier does not conform to the expected timestamp format. |
500 |
AEM_SET_CHANGE_DATA_RETENTION_BARRIER_INNER_ERR |
Failed to set change data retention barrier for task {task} on server {server}. Message: {error_message} |
Returned when an error is encountered during partition deletion. |