# GetTableList

Retrieves the list of tables of a specific Replicate task that matches the specified state(s), table schema(s), and table name(s). This is useful for automation processes, for example, as it allows you to retrieve tables in a certain state (for example, suspended) and then perform an operation on them (for example, ReloadTable).

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

## Syntax

`AemGetTableListResp GetTableList(` ` string server,  ` ` string task,  ` ` string schema = null,  ` ` string table = null,  ` ` bool includequeued = false,  ` ` bool includeloading = false,  ` ` bool includecompleted = false,  ` ` bool includechangeprocessing = false,  ` `bool includeerror = false` `)`

## Request parameters

Request parameters

| Value | Type | Description |
| --- | --- | --- |
| server | string | The Replicate Server name as defined on Qlik Enterprise Manager.<br><br>Example: myrepsrv1 |
| schema | string | The default is all source schemas. Specifying a specific schema name will retrieve all tables from the specified schema. Specifying a pattern will retrieve all tables from schemas that match the pattern. For example, specifying ad% will retrieve tables from the adventure and adventuretwo schemas.<br><br>Information noteSchema names are case-sensitive. |
| table | string | The default is all source tables. Specifying a specific table name will retrieve the specified table. Specifying a pattern will retrieve all tables that match the pattern. For example, specifying em% will retrieve the employees and employed tables.Table names are case-sensitive. |
| includequeued | boolean | Whether to retrieve tables in a queued state. |
| includeloading | boolean | Whether to retrieve tables in a loading state. |
| includecompleted | boolean | Whether to retrieve tables in a completed state. |
| includechangeprocessing | boolean | Whether to retrieve tables in a Change Processing state (that is, tables that are having changes applied to them). |
| includeerror | boolean | Whether to retrieve tables in an error state. |

## Return values

AemGetTableListResp

Return values

| Value | Type | Description |
| --- | --- | --- |
| TableList | List | List of tables that matches the specified input parameters. |
| schema | string | The name of the schema. |
| table | string | The name of the table. |
| [state](https://help.qlik.com/en-US/enterprise-manager/May2025/Content/EnterpriseManager/EnterpriseManager_APIGuide/Shared/aem_rest_api_response_params.htm#table_state) | enum | The current state of the table. |

## Errors

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

Error responses

| Error | Message | Explanation | Description |
| --- | --- | --- | --- |
| 500 | AEM\_TABLE\_LIST\_INNER\_ERR | Failed to retrieve table list for replication task "{task}" on server "{server}". Error: "{message}" | Returned when the table list cannot be retrieved. |
| 500 | AEM\_TASK\_NOT\_FOUND | Replicate task {task} on server {server} could not be found. | The task name is unknown to Enterprise Manager. |