# GetTableStatuses

## General

### URL

https://{host}/attunityenterprisemanager/api/v1/servers/{server}/tasks/{task}/tables?action=getstatus&schema={schema}&table={table}&includequeued={includequeued}&includeloading={includeloading}&includecompleted={includecompleted}&includechangeprocessing={includechangeprocessing}&includeerror={includeerror}

### Description

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).

### Method

GET

### Required user role

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

## Request parameters

Request parameters

| Location | Name | Required | Description |
| --- | --- | --- | --- |
| Header | EnterpriseManager.APISessionID [string] | Yes | wCo0\_KvjEUFROvfHF5KGrw |
| 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 name. |
| URL | schema [string] | No | 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. |
| URL | table [string] | No | 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. |
| URL | action=getstatus | Yes | The actual function to execute. |
| URL | includequeued [boolean] | No | Whether to retrieve tables in a queued state. |
| URL | includeloading [boolean] | No | Whether to retrieve tables in a loading state. |
| URL | includecompleted [boolean] | No | Whether to retrieve tables in a completed state. |
| URL | includechangeprocessing [boolean] | No | Whether to retrieve tables in a Change Processing state (that is, tables that are having changes applied to them). |
| URL | includeerror [boolean] | No | 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.

## Response body

```
{  
   "table_details":[
```

```
     {  
         "schema_on_source":"{string}",
         "table_on_source":"{string}",
         "schema_on_target":"{string}",
         "table_on_target":"{string}",
         "state":"{enum}",
         "data_errors_count":"{int64}",
         "table_full_load_info":{  
            "start_time":"{string}",
            "end_time":"{string}",
            "estimated_row_count":"{int64}",
            "estimated_end_time":"{string}",
            "transferred_row_count":"{int64}",
            "transferred_volume_mb":"{int64}"
         },
         "table_cdc_info":{  
            "insert_count":"{int64}",
            "update_count":"{int64}",
            "delete_count":"{int64}",
            "ddl_count":"{int64}",
            "last_update_time":"{string}",
            "cached_insert_count":"{int64}",
            "cached_update_count":"{int64}",
            "cached_delete_count":"{int64}"
         }
      }
   ]
}
```

## Response parameters

Response parameters

| Name | Description |
| --- | --- |
| schema\_on\_source | Source schema name. |
| table\_on\_source | Source table name. |
| schema\_on\_target | Target schema name. If this information is not available, an empty string will be returned. |
| table\_on\_target | Target table name. If this information is not available, an empty string will be returned. |
| state | An enum reflecting the table state.<br><br>See [state](https://help.qlik.com/en-US/enterprise-manager/May2025/Content/EnterpriseManager/EnterpriseManager_APIGuide/Shared/aem_rest_api_response_params.htm#table_state). |
| data\_errors\_count | The number of data errors encountered when replicating the table. |
| table\_full\_load\_info | - |
| start\_time | Date-time of when the table full load started.<br><br>Timezone: UTC ; Style: ISO8601 (consistent with GetTaskDetails). |
| end\_time | Date-time of when the table full load started.<br><br>Timezone: UTC ; Style: ISO8601 (consistent with GetTaskDetails). |
| estimated\_row\_count | Relevant only for tables in certain states (loading/queued). |
| estimated\_end\_time | Relevant only for tables in certain states (loading/queued).<br><br>Timezone: UTC ; Style: ISO8601 (consistent with GetTaskDetails).<br><br>Information note<br><br>estimated\_end\_time is always null. You can calculate the approximate end time using the following formula:<br><br>`estimated_end_time = start_time + estimated_row_count * (CurrentTime - start_time)/transferred_row_count` |
| transferred\_row\_count | The number of rows transferred to the target, after the source filtering, but before the target filtering. |
| transferred\_volume\_mb | The amount of bytes transferred to the target, after the source filtering, but before the target filtering. |
| End of table\_full\_load\_info | - |
| table\_cdc\_info | - |
| insert\_count | The number of records inserted to the target table. |
| update\_count | The number of records updated in the target table. |
| delete\_count | The number of records deleted in the target table. |
| ddl\_count | The number of DDL operations performed on the target table. |
| last\_update\_time | The last time that the table was updated on target.<br><br>Timezone: UTC ; Style: ISO8601 (consistent with GetTaskDetails). |
| cached\_insert\_count | INSERT operations that were cached during Full Load. |
| cached\_update\_count | UPDATE operations that were cached during Full Load. |
| cached\_delete\_count | DELETE operations that were cached during Full Load. |
| End of table\_cdc\_info | - |

## cURL example

### Request

`curl -i -k --header "EnterpriseManager.APISessionID: wCo0_KvjEUFROvfHF5KGrw" https://computer.network.net/attunityenterprisemanager/api/v1/servers/{server}/tasks/{task}/tables?action=getstatus`

### Response

`Headers:`

`HTTP/1.1 200 OK`

`Cache-Control: no-cache, no-store`

`Content-Length: 205`

`Content-Type: application/json; charset=utf-8`

`Server: Microsoft-HTTPAPI/2.0`

`Date: Mon, 26 Dec 2016 11:18:53 GMT`

### Payload

```
{  
   "table_details":[  
      {  
         "schema_on_source":"myschema1",
         "table_on_source":"mytable1",
         "schema_on_target":"",
         "table_on_target":"",
         "state":"TABLE_CHANGE_PROCESSING",
         "data_errors_count":0,
         "table_full_load_info":{  
            "start_time":"2019-08-05T01:35:06",
            "end_time":"2019-08-05T01:35:06",
            "estimated_row_count":0,
            "estimated_end_time":null,
            "transferred_row_count":4,
            "transferred_volume_mb":1856
         },
         "table_cdc_info":{  
            "insert_count":2,
            "update_count":0,
            "delete_count":0,
            "ddl_count":0,
            "last_update_time":null,
            "cached_insert_count":0,
            "cached_update_count":0,
            "cached_delete_count":0
         }
      },
      {  
         "schema_on_source":"myschema2",
         "table_on_source":"mytable2",
         "schema_on_target":"",
         "table_on_target":"",
         "state":"TABLE_CHANGE_PROCESSING",
         "data_errors_count":0,
         "table_full_load_info":{  
            "start_time":"2019-08-05T01:35:06",
            "end_time":"2019-08-05T01:35:31",
            "estimated_row_count":0,
            "estimated_end_time":null,
            "transferred_row_count":1000000,
            "transferred_volume_mb":464000000
         },
         "table_cdc_info":{  
            "insert_count":0,
            "update_count":4,
            "delete_count":0,
            "ddl_count":0,
            "last_update_time":null,
            "cached_insert_count":0,
            "cached_update_count":0,
            "cached_delete_count":0
      
         }
      }
   ]
}
```

## Errors

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

Error responses

| HTTP Code | Qlik Enterprise Manager Code | Text | Description |
| --- | --- | --- | --- |
| 500 | AEM\_SERVER\_NOT\_FOUND | Replicate server {server} could not be found. | Server name unknown to Qlik Enterprise Manager. |
| 500 | AEM\_TASK\_NOT\_FOUND | Replicate task {task} on server {server} could not be found. | The task name is unknown to Enterprise Manager. |
| 500 | 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. |