# PutTaskTableSelection

## General

### URL

https://{host}/attunityenterprisemanager/api/v1/servers/{server}/tasks/{task}/tables?action=selection

### Description

Overrides the list of tables selected for inclusion in a specific Replicate task.

### Method

PUT

### Required user role

See [Required Enterprise Manager permissions](https://help.qlik.com/en-US/enterprise-manager/May2026/Content/EnterpriseManager/EnterpriseManager_APIGuide/Introduction/AEMPermissions.htm).

## Request URL parameters

Request URL parameters

| Location | Name | Required | Description |
| --- | --- | --- | --- |
| URL | host [string] | Yes | The host name of the Qlik Enterprise Manager server.<br><br>Example: computer.network.net |
| URL | Server [string] | Yes | The Replicate Server name as defined on Qlik Enterprise Manager.<br><br>Example: myrepsrv1 |
| URL | Task [string] | Yes | The Replicate task for which the tables were selected. |
| Header | EnterpriseManager.APISessionID [string] | Yes | wCo0\_KvjEUFROvfHF5KGrw |

## Request body parameters

The request body should be in a JSON file in valid JSON format.

Request body parameters

| Location | Name | Required | Description |
| --- | --- | --- | --- |
| JSON | included\_pattern | No | The new include table pattern for the Replicate task.<br><br><ul> <li><span>owner:</span>&nbsp;The table schema or owner</li> <li><span>name:</span> Tables matching this pattern will be included</li> <li><span>load_order:</span> The order in which the tables will be loaded to the target. "0" means random order. <span>See <a href="https://help.qlik.com/en-US/enterprise-manager/May2026/Content/EnterpriseManager/EnterpriseManager_APIGuide/Shared/aem_rest_api_response_params.htm#Load_order">Load order</a> for additional numeric values that can be used to define the load order.</span> You can also set the value to <span>LOWEST</span>, <span>LOW</span>, <span>NORMAL</span>, <span>HIGH</span>, or <span>HIGHEST</span>.</li> <li><span>table_type:</span> The entity type. Can be view or table.</li> </ul> |
| JSON | excluded\_pattern | No | The new exclude table pattern for the Replicate task.<br><br><ul> <li><span>owner:</span>&nbsp;The table schema or owner</li> <li><span>name:</span> Tables matching this pattern will be excluded</li> <li><span>load_order:</span> The order in which the tables will be loaded to the target. "0" means random order. <span>See <a href="https://help.qlik.com/en-US/enterprise-manager/May2026/Content/EnterpriseManager/EnterpriseManager_APIGuide/Shared/aem_rest_api_response_params.htm#Load_order">Load order</a> for additional numeric values that can be used to define the load order.</span> You can also set the value to <span>LOWEST</span>, <span>LOW</span>, <span>NORMAL</span>, <span>HIGH</span>, or <span>HIGHEST</span>.</li> <li><span>table_type:</span> The entity type. Can be view or table.</li> </ul> |
| JSON | explicit\_included\_tables | Only if no patterns have been defined. | The specific list of tables and views selected for the Replicate task and the order in which they are loaded to the target.<br><br><ul> <li><span>owner:</span>&nbsp;The table schema or owner</li> <li><span>name:</span> Tables matching this name will be included</li> <li><span>load_order:</span> The order in which the tables will be loaded to the target. "0" means random order. <span>See <a href="https://help.qlik.com/en-US/enterprise-manager/May2026/Content/EnterpriseManager/EnterpriseManager_APIGuide/Shared/aem_rest_api_response_params.htm#Load_order">Load order</a> for additional numeric values that can be used to define the load order.</span> You can also set the value to <span>LOWEST</span>, <span>LOW</span>, <span>NORMAL</span>, <span>HIGH</span>, or <span>HIGHEST</span>.</li> <li><span>table_type:</span> The entity type. Can be view or table.</li> </ul> |

### Example JSON for overriding patterns and explicitly selected tables

{"included\_pattern":[{"owner":"dbo","name":"tbl%","load\_order":0,"table\_type":"TABLE"}],

"excluded\_pattern":[{"owner":"dbo","name":"tbl\_xyz%","load\_order":0,"table\_type":"VIEW"}],

"explicit\_included\_tables": [

{

"owner": "dbo",

"name": "employees",

"load\_order": 0,

"table\_type": "TABLE"

},

{

"owner": "dbo",

"name": "customers",

"load\_order": 0,

"table\_type": "TABLE"

}

]

## cURL example

### Request

`curl -X PUT -i -k --header "EnterpriseManager.APISessionID: eEAt8oWp4TtS3KzV7YlDUw" https://myemhost/attunityenterprisemanager/api/v1/servers/localhost/tasks/sql2sql_fl_test/tables?action=selection -T "c:\putselection.json"`

## Errors

All of the [general errors](https://help.qlik.com/en-US/enterprise-manager/May2026/Content/EnterpriseManager/EnterpriseManager_APIGuide/PythonAPI/error_handling.htm) as well as the errors listed in the table below.

Error responses

| HTTP Code | Enterprise Manager Code | Text | Description |
| --- | --- | --- | --- |
| 500 | AEM\_TASK\_NOT\_FOUND | Replicate task {task} on server {server} could not be found. | The task name is unknown to Enterprise Manager. |