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.
Request parameters
Location | Name | Required | Description |
---|---|---|---|
URL |
host [string] |
Yes |
The host name of the Qlik Enterprise Manager server. Example: computer.network.net |
URL |
ServerName [string] |
Yes |
The Replicate Server name as defined on Qlik Enterprise Manager. Example: myrepsrv1 |
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. |
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. |
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
Name | Description |
---|---|
schema |
The name of the schema. |
table |
The name of the table. |
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 as well as the errors listed in the table below.
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. |