# GetTableStatuses

Retrieves the tables states of a specific Replicate task for all source tables that match the specified states, table schemas, and table names. 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/November2025/Content/EnterpriseManager/EnterpriseManager_APIGuide/Introduction/AEMPermissions.htm).

## Syntax

`AemGetTableStatusesResp GetTableStatuses(` ` 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 |
| Task | string | The Replicate task name. |
| 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. |

Warning noteWhile it is possible to set a table state parameter to "false", doing so will have no effect. Therefore, if you are only interested in specific states, set the desired states to "true" rather than setting the unwanted states to "false". For example, setting includecompleted=false and includechangeprocessing=false will not work as expected (all table states will be returned). However, setting includeloading=true, includeerror=true, and includequeued=true will return the desired states. Additionally, omitting the state parameters is the same as setting all parameters to "true" so if you want to see all states, simply omit the parameters.

## Return values

AemGetTableStatusesResp

General return values

| Name | Type | Description |
| --- | --- | --- |
| TableDetails | List | List of table statuses that matches the specified request parameters. |
| SchemaOnSource | string | Source schema name. |
| TableOnSource | string | Source table name. |
| SchemaOnTarget | string | Target schema name. If this information not available, an empty string will be returned. |
| TableOnTarget | string | Target table name. If this information not available, an empty string will be returned. |
| State | enum | An enum reflecting the table state.<br><br>See [state](https://help.qlik.com/en-US/enterprise-manager/November2025/Content/EnterpriseManager/EnterpriseManager_APIGuide/Shared/aem_rest_api_response_params.htm#table_state). |
| DataErrorsCount | int64 | The number of data errors encountered when replicating the table. |

table\_full\_load\_infotable\_full\_load\_info return values

| Name | Type | Description |
| --- | --- | --- |
| StartTime | string | Date-time of when the table full load started.<br><br>Timezone: UTC ; Style: ISO8601 (consistent with AemGetTaskDetails). |
| EndTime | string | Date-time of when the table full load started.<br><br>Timezone: UTC ; Style: ISO8601 (consistent with AemGetTaskDetails). |
| EstimatedRowCount | int64 | Relevant only for tables in certain states (loading/queued). |
| EstimatedEndTime | string | Relevant only for tables in certain states (loading/queued).<br><br>Timezone: UTC ; Style: ISO8601 (consistent with AemGetTaskDetails).<br><br>Information note<br><br>EstimatedEndTime is always null. You can calculate the approximate end time using the following formula:<br><br>` EstimatedEndTime  = start_time + EstimatedRowCount * (CurrentTime - StartTime)/TransferredRowCount  ` |
| TransferredRowCount | int64 | The number of rows transferred to the target, after the source filtering, but before the target filtering. |
| TransferredVolumeMb | int64 | The amount of bytes transferred to the target, after the source filtering, but before the target filtering. |

TableCdcInfoTableCdcInfo return values

| Name | Type | Description |
| --- | --- | --- |
| InsertCount | int64 | The number of records inserted into the target table. |
| UpdateCount | int64 | The number of records updated in the target table. |
| DeleteCount | int64 | The number of records deleted in the target table. |
| DdlCount | int64 | The number of DDL operations performed on the target table. |
| LastUpdateTime | string | The last time that the table was updated on target.<br><br>Timezone: UTC ; Style: ISO8601 (consistent with AemGetTaskDetails). |
| CachedInsertCount | int64 | INSERT operations that were cached during Full Load. |
| CachedUpdateCount | int64 | UPDATE operations that were cached during Full Load. |
| CachedDeleteCount | int64 | DELETE operations that were cached during Full Load. |

## Errors

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

Error responses

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