# GetTableList

## General

### URL

https://{host}/attunityenterprisemanager/api/v1/servers/{ServerName}/tasks/{TaskName}/tables?schema={schema}&table={table}&includequeued={includequeued}&includeloading={includeloading}&includecompleted={includecompleted}&includechangeprocessing={includechangeprocessing}&includeerror={includeerror}

### Description

Retrieves the list of tables of a specific Replicate task that match 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 (e.g. suspended) and then peform an operation on them (e.g. `ReloadTable`).

### Method

GET

### 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 parameters

Request 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 | ServerName [string] | Yes | The Replicate Server name as defined on Qlik Enterprise Manager.<br><br>Example: myrepsrv1 |
| URL | TaskName [string] | Yes | The name of the Replicate task. |
| URL | SchemaName [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 | TableName [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.<br><br>Information noteTable names are case-sensitive. |
| 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. |
| Header | EnterpriseManager.APISessionID [string] | Yes | wCo0\_KvjEUFROvfHF5KGrw |

## Response body

```
{
   "tablelist":[
      {
         "schema":"{string}",
         "table":"{string}",
         "state":"{enum table_state}"
      },
      {
         "schema":"{string}",
         "table":"{string}",
         "state":"{enum table_state}"
      },
      {
         "schema":"{string}",
         "table":"{string}",
         "state":"{enum table_state}"
      },
      {
         "schema":"{string}",
         "table":"{string}",
         "state":"{enum table_state}"
      }
   ]
}
```

## Response parameters

Response parameters

| Name | Description |
| --- | --- |
| schema | The name of the schema. |
| table | The name of the table. |
| [state](https://help.qlik.com/en-US/enterprise-manager/May2026/Content/EnterpriseManager/EnterpriseManager_APIGuide/Shared/aem_rest_api_response_params.htm#table_state) | The current state of the table. |

## cURL example

### Request

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

### 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

```
{
   "tablelist":[
      {
         "schema":"MYSCHEMA",
         "table":"TABLE1",
         "state":"TABLE_CHANGE_PROCESSING"
      },
      {
         "schema":"MYSCHEMA",
         "table":"TABLE2",
         "state":"TABLE_LOADING"
      },
      {
         "schema":"MYSCHEMA",
         "table":"TABLE3",
         "state":"TABLE_QUEUED"
      },
      {
         "schema":"MYSCHEMA",
         "table":"TABLE4",
         "state":"TABLE_QUEUED"
      }
   ]
}
```

## 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\_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. |