100% found this document useful (1 vote)
207 views

Enterprise Manager API Guide

Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
100% found this document useful (1 vote)
207 views

Enterprise Manager API Guide

Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 252

 

Enterprise Manager API Guide
TM 
Qlik Enterprise Manager   
November 2021
Last updated: November 23, 2021
Copyright © 1993-2021 QlikTech International AB. All rights reserved.

HELP.QLIK.COM
© 2021 QlikTech International AB. All rights reserved. All company and/or product names may be trade
names, trademarks and/or registered trademarks of the respective owners with which they are associated.
Contents
1   Qlik Enterprise Manager API guide 15
2   Enterprise Manager REST API 16
2.1  Prerequisites 17
2.2  Standards and conventions 17
2.3  Authentication and authorization 17
2.4  Error handling 17
2.5  Login 20
General 20
Request parameters 20
Response header 20
cURL example 20
Error response 21
2.6  Logout 21
General 21
Request parameters 22
cURL example 22
2.7  PutServerLicense 22
General 22
Request parameters 23
Request body 23
cURL example 23
Error response 24
2.8  GetServerDetails 24
General 24
Request parameters 25
Response body 25
Response parameters 26
cURL example 27
Error response 28
2.9  PutServer 29
General 29
Request parameters 29
Request body 29
Request Parameters 30
cURL example 31
Error Response 32
2.10  PutServerAcl 34
General 34
Request parameters 35
Request body 35
Request parameters 36
cURL example 37
Error response 39
2.11  GetServer 40
General 40
Request parameters 40
Response body 41

API Guide - Qlik Enterprise Manager , November 2021 3


Contents
Response parameters 41
cURL example 42
Error response 42
2.12  GetServerAcl 43
General 43
Request parameters 43
Response body 43
Response parameters 44
cURL example 45
Error response 46
2.13  GetServerList 47
General 47
Request parameters 47
Response body 47
Response parameters 48
cURL example 48
2.14  DeleteServer 49
General 49
Request parameters 50
cURL example 50
Error response 50
2.15  DeleteServerAcl 51
General 51
Request parameters 51
cURL example 52
Error response 52
2.16  GetTaskList 52
General 52
Request parameters 53
Response body 53
Response parameters 54
cURL example 54
Errors 55
2.17  GetTaskDetails 55
General 55
Request parameters 56
Response body for a Replicate task 57
Response parameters for Replicate tasks 59
Response body for a Compose task 63
Response parameters for Compose tasks 64
cURL example for Replicate tasks 66
Error response 69
2.18  GetTableList 69
General 69
Request parameters 69
Response body 71
Response parameters 71

API Guide - Qlik Enterprise Manager , November 2021 4


Contents
cURL example 71
Errors 72
2.19  GetTableStatuses 73
General 73
Request parameters 73
Response body 74
Response parameters 75
cURL example 77
Errors 78
2.20  DeleteTask 79
General 79
Request parameters 79
cURL example 80
Error response 80
2.21  ExportTask 81
General 81
Request parameters 81
Response 81
cURL example 81
Error response 82
2.22  ImportTask 82
General 82
Request parameters 82
Response 83
cURL example 83
Error response 84
2.23  ExportAuditTrail 85
General 85
Request parameters 85
Response 85
cURL example 85
Error response 86
2.24  StopTask 86
General 86
Request parameters 86
Response body 87
Response parameters 87
cURL example 87
Error response 88
2.25  RunTask 88
General 88
Request parameters 89
Request body format 90
Response body 91
Response parameters 92
Reload target cURL example for Replicate tasks 92
Resume processing from timestamp cURL examples  for Replicate tasks 92

API Guide - Qlik Enterprise Manager , November 2021 5


Contents
Error response 93
2.26  GetEndpointList 94
General 94
Request parameters 95
Response body 95
Response parameters 95
cURL example 95
Error response 97
2.27  DeleteEndpoint 97
General 97
Request parameters 97
cURL example 98
Error response 98
2.28  ReconfigureEndpointNoWait 99
General 99
Request parameters 100
cURL example 102
Error response 102
2.29  ExportAll 102
General 102
Request parameters 103
Response 103
cURL example 103
Error response 103
2.30  ImportAll 104
General 104
Request parameters 104
Response 105
cURL example 105
Error response 106
2.31  ReloadTable 106
General 106
Request parameters 107
cURL example 107
Error response 107
2.32  TestEndpoint 108
General 108
Request parameters 108
Response body 109
Response parameters 109
cURL example 109
Error response 110
2.33  DeleteOldChangeData 110
General 110
Request parameters 111
Request body 111
cURL example 112

API Guide - Qlik Enterprise Manager , November 2021 6


Contents
Error response 112
2.34  SetChangeDataRetentionBarrier 112
General 112
Request parameters 113
Request body 113
cURL example 114
Error response 114
2.35  GetChangeDataRetentionBarrier 115
General 115
Request parameters 115
Response body 116
cURL example 116
Error response 116
2.36  Parameters 116
3   Enterprise Manager .NET API 121
3.1  Prerequisites 122
General prerequisites 122
.NET SDK prerequisites 122
3.2  Getting started - Login 122
3.3  Authentication and authorization 123
3.4  Error handling 123
3.5  PutServerLicense 125
Syntax 126
Parameters 126
Return values 126
126
Errors 126
3.6  GetServerDetails 126
Syntax 126
Parameters 127
Return values 127
Errors 129
3.7  PutServer 130
Syntax 130
Parameters 130
Return values 131
131
Errors 131
3.8  PutServerAcl 133
Syntax 134
Parameters 135
Return values 135
135
Errors 135
3.9  GetServer 137
Syntax 137
Parameters 137

API Guide - Qlik Enterprise Manager , November 2021 7


Contents
Return values 137
Errors 138
3.10  GetServerAcl 138
Syntax 138
Parameters 138
Return values 138
Errors 139
3.11  GetServerList 139
Syntax 139
Parameters 139
Return values 139
Errors 140
3.12  DeleteServer 140
Description 140
Syntax 141
Parameters 141
Return values 141
Errors 141
3.13  DeleteServerAcl 141
Syntax 142
Parameters 142
Return values 142
Errors 142
3.14  GetTaskList 142
Syntax 142
Parameters 142
Return values 143
Errors 144
3.15  GetTaskDetails 144
Syntax 145
Parameters 145
Return values for Replicate tasks 145
Return values for Compose tasks 153
Errors 155
3.16  GetTableList 155
Syntax 155
Request parameters 155
Return values 156
Errors 156
3.17  GetTableStatuses 157
Syntax 157
Request parameters 157
Return values 158
Errors 159
3.18  DeleteTask 160
Syntax 160
Parameters 160

API Guide - Qlik Enterprise Manager , November 2021 8


Contents
Errors 160
3.19  ExportTask 161
Syntax 161
Parameters 161
Return values 161
Errors 161
3.20  ImportTask 162
Syntax 162
Parameters 162
Return values 162
Errors 163
3.21  StopTask 163
Syntax 164
Parameters 164
Return values 164
Errors 165
3.22  RunTask 165
Syntax 165
Parameters 165
Request body format 166
Return value 167
Errors 167
3.23  GetEndpointList 168
Syntax 169
Parameters 169
Return values 169
Errors 169
3.24  DeleteEndpoint 170
Description 170
Syntax 170
Parameters 170
Return values 170
Errors 170
3.25  ReconfigureEndpointNoWait 170
Syntax 171
Parameters 171
Return values 171
Errors 171
3.26  ExportAll 172
Syntax 172
Parameters 172
Return values 172
Errors 172
3.27  ImportAll 173
Syntax 173
Parameters 173
Return values 173

API Guide - Qlik Enterprise Manager , November 2021 9


Contents
Errors 173
3.28  ExportAuditTrail 174
Syntax 174
Parameters 174
Return values 175
Errors 175
3.29  ReloadTable 175
Syntax 175
Parameters 175
Return values 175
Errors 176
3.30  TestEndpoint 176
Syntax 176
Parameters 176
Return values 176
Errors 177
3.31  DeleteOldChangeData 177
Syntax 177
Parameters 178
Error response 178
3.32  SetChangeDataRetentionBarrier 179
Syntax 179
Parameters 180
Error response 180
3.33  GetChangeDataRetentionBarrier 181
Syntax 181
Parameters 181
Response 181
Error response 182
3.34  Parameters 182
4   Enterprise Manager Python API 186
4.1  Prerequisites 187
General Prerequisites 187
Python 2.7 Prerequisites 187
Python 3.7 Prerequisites 187
4.2  Getting started - Login 187
4.3  Authentication and authorization 188
4.4  Error handling 188
4.5  put_server_license 190
Syntax 191
Parameters 191
Return values 191
191
Errors 191
4.6  get_server_details 191
Syntax 192
Parameters 192

API Guide - Qlik Enterprise Manager , November 2021 10


Contents
Return values 192
Errors 194
4.7  put_server 194
Syntax 194
Parameters 195
Return values 195
Errors 196
4.8  put_server_acl 197
Syntax 198
Parameters 199
Return values 199
199
Errors 199
4.9  get_server 201
Syntax 201
Parameters 201
Return values 201
Errors 201
4.10  get_server_acl 202
Syntax 202
Parameters 202
Return values 202
Errors 203
4.11  get_server_list 203
Syntax 203
Parameters 203
Return values 203
Errors 204
4.12  delete_server 204
Description 204
Syntax 205
Parameters 205
Return values 205
Errors 205
4.13  delete_server_acl 206
Syntax 206
Parameters 206
Return values 206
Errors 206
4.14  get_task_list 206
Syntax 206
Parameters 207
Return values 207
Errors 208
4.15  get_task_details 208
Syntax 209
Parameters 209

API Guide - Qlik Enterprise Manager , November 2021 11


Contents
Return values for Replicate tasks 209
Return Values for Compose Tasks 215
Errors 217
4.16  get_table_list 217
Syntax 217
Parameters 217
Return values 218
Errors 218
4.17  get_table_statuses 219
Syntax 219
Request parameters 219
Return values 220
Errors 222
4.18  delete_task 222
Syntax 222
Parameters 222
Return values 222
Errors 223
4.19  export_task 223
Syntax 223
Parameters 223
Return values 223
Errors 224
4.20  import_task 224
Syntax 224
Parameters 224
Return values 225
Errors 225
4.21  export_audit_trail 226
Syntax 226
Parameters 226
Return values 226
Errors 226
4.22  stop_task 227
Syntax 227
Parameters 227
Return values 227
Errors 228
4.23  run_task 228
Syntax 228
Parameters 229
Request Body Format for Replicate tasks 229
Return value 230
Errors 231
4.24  get_endpoint_list 232
Syntax 232
Parameters 232

API Guide - Qlik Enterprise Manager , November 2021 12


Contents
Return values 232
Errors 233
4.25  delete_endpoint 233
Description 233
Syntax 233
Parameters 234
Return values 234
Errors 234
4.26  reconfigure_endpoint_no_wait 234
Syntax 234
Parameters 235
Return values 235
Errors 235
4.27  export_all 235
Syntax 236
Parameters 236
Return values 236
Errors 236
4.28  import_all 236
Syntax 237
Parameters 237
Return values 237
Errors 237
4.29  reload_table 238
Syntax 238
Parameters 238
Return values 238
Errors 238
4.30  test_endpoint 238
Syntax 239
Parameters 239
Return values 239
Errors 239
4.31  delete_old_change_data 240
Syntax 240
Parameters 241
Error response 241
4.32  set_change_data_retention_barrier 242
Syntax 242
Parameters 243
Error response 243
4.33  get_change_data_retention_barrier 244
Syntax 244
Parameters 244
Response 244
Error response 245
4.34  Parameters 245

API Guide - Qlik Enterprise Manager , November 2021 13


Contents
A   Reconfiguring endpoints 249
A.1  Setting up the Replicate task 249
A.2  Switching to the secondary Replicate endpoint 250
A.3  Reverting to the primary Replicate endpoint 250
B   Required Enterprise Manager permissions 251

API Guide - Qlik Enterprise Manager , November 2021 14


1   Qlik Enterprise Manager API guide

1    Qlik Enterprise Manager API guide
The Qlik Enterprise Manager APIs provide programmatic interfaces for performing tasks typically carried 
out using the Enterprise Manager web console, including:

 l Viewing a list of tasks for a server
 l Viewing details for a particular task
 l Stopping a task
 l Running a task
 l Exporting all definitions from the requested server repository on the selected server
 l Importing the JSON definitions provided in the request body into the requested server repository on 
the selected server
 l Reloading a table
 l Exporting a task
 l Importing a task
 l Testing an endpoint's connectivity and configuration

The Enterprise Manager SDKs allow other systems to interact with  Enterprise Manager, for example, to 
display data about one or more tasks in a user's dashboard. They also offer a quick and easy way of 
running batch operations.

Using an SDK requires basic familiarity with web services, Replicate, and Enterprise Manager.

The following methods are supported with Replicate tasks only:

 l ImportAll
 l ExportAll
 l ExportTask
 l TestEndpoint
 l GetEndpointList
 l DeleteEndpoint
 l ImportTask
 l DeleteTask
 l ReloadTable

API Guide - Qlik Enterprise Manager , November 2021 15


2   Enterprise Manager REST API

2    Enterprise Manager REST API
This section explains how to use the Enterprise Manager REST API and lists the available methods.

In this section:

 l Prerequisites (page 17)
 l Standards and conventions (page 17)
 l Authentication and authorization (page 17)
 l Error handling (page 17)
 l Login (page 20)
 l Logout (page 21)
 l PutServerLicense (page 22)
 l GetServerDetails (page 24)
 l PutServer (page 29)
 l PutServerAcl (page 34)
 l GetServer (page 40)
 l GetServerAcl (page 43)
 l GetServerList (page 47)
 l DeleteServer (page 49)
 l DeleteServerAcl (page 51)
 l GetTaskList (page 52)
 l GetTaskDetails (page 55)
 l GetTableList (page 69)
 l GetTableStatuses (page 73)
 l DeleteTask (page 79)
 l ExportTask (page 81)
 l ImportTask (page 82)
 l ExportAuditTrail (page 85)
 l RunTask (page 88)
 l StopTask (page 86)
 l GetEndpointList (page 94)
 l DeleteEndpoint (page 97)
 l ReconfigureEndpointNoWait  (page 99)
 l ExportAll (page 102)
 l ImportAll (page 104)
 l ReloadTable (page 106)
 l TestEndpoint (page 108)
 l DeleteOldChangeData (page 110)
 l SetChangeDataRetentionBarrier (page 112)

API Guide - Qlik Enterprise Manager , November 2021 16


2   Enterprise Manager REST API

 l GetChangeDataRetentionBarrier (page 115)
 l Parameters (page 116)

2.1   Prerequisites
Before using the Enterprise Manager REST API, make sure that:

 l Qlik Enterprise Manager has been installed.
 l The Qlik Enterprise Manager service is active.
 l The relevant permissions have been granted.

2.2   Standards and conventions
The API is based on the following standards:

 l Names: Camel Case, such as GetTaskList
 l Date and time format: ISO 8601 (YYYY-MM-DD HH:MM:SS), in UTC (Universal Time Coordinated)
Example: 2007-04-05T14:30:25 (implicitly interpreted as UTC without the explicit trailing Z).
 l Standard URL format: api/v1/URL

In addition, this topic uses the following conventions:

 l Parameters in examples appear in curly brackets as {xx} and should be replaced with an actual 
value. An example of a parameter is {server}, which should be replaced by the server name or 
IP address of the machine where Replicate is installed. For a list of parameters, see Parameters 
(page 116).

All examples in this chapter use cURL as the HTTP engine.

In terms of forward and backward compatibility of the Enterprise Manager REST API, the caller should 
expect future releases to add new optional request parameters and additional data items in responses.

2.3   Authentication and authorization
The Enterprise Manager REST API uses the BASIC HTTP authorization scheme to authenticate callers 
and create a client session. A client session is established using the Login (page 20) method, which returns 
the special header “EnterpriseManager.APISessionID” with a value (session token) that needs to be 
sent as a request header in any subsequent requests.

A session token expires 5 minutes after the last request. After the session expires, the caller must re-
authenticate to establish a new session.

Authorization for performing a specific REST request relies on permission, assigned to the authenticated 
user either directly or by means of group membership. Each REST request requires a minimum role, which 
is specified in the section describing the request.

2.4   Error handling
An error response has the following structure:

API Guide - Qlik Enterprise Manager , November 2021 17


2   Enterprise Manager REST API

{
"error_code":"code","error_message":"message”
}
This section lists the generic messages that apply to most of the API functions. Errors that are specific to a 
particular API function appear in the section for that API function.

Error responses
Error Code Message Description

UNAUTHORIZED_ Unauthorized Request. The user is not 


REQUEST authorized to perform 
the requested action 
(for example, deleting a 
task).

INVALID_SESSION_ The session has expired or the session ID is not  Session expired or 


ID  valid. invalid. 

DESERIALIZE_TO_ Failed to deserialize JSON to type {type}: {message} Returned when the 


TYPE JSON format is invalid. 

AEM_SERVER_ The requested server {server} could not be found. The requested server 


NOT_FOUND cannot be found.

AEM_SERVER_ The requested server {server} is not monitored. The requested  server 


NOT_MONITORED is not being monitored 
and thus the 
information is not 
accessible.

AEM_SERVER_ The requested server "{server}" cannot be reached  The desired 


NOT_CONNECTED at this time.  information cannot be 
retrieved as the 
Message: {message}
requested  server is not 
connected.

AEM_SERVER_ The license for requested  server {server} has  The requested  server 


LICENSE_EXPIRED expired. license has expired.

AEM_SERVER_ The license for requested server {server} is not valid. The requested  server 


INVALID_LICENSE license is not valid.

LICENSE_NOT_ You need to register a Replication Management  Replication 


FOUND license in order to use Qlik Enterprise Manager. To  Management license 
register or obtain a license, open the Qlik Enterprise  was not found. 
Manager console and follow the instructions. Returned when a user  
is permitted to Register 
Qlik Enterprise 
Manager license.

API Guide - Qlik Enterprise Manager , November 2021 18


2   Enterprise Manager REST API

Error Code Message Description

LICENSE_NOT_ An Enterprise Manager Admin needs to register a  Replication 


FOUND_CONTACT_ Replication Management license before you can use  Management license 
ADMIN the product. To obtain a license, contact your Qlik  was not found. 
Sales Representative with the Enterprise Manager  Returned when a user  
machine name (which is displayed when you open  is NOT permitted to 
the Enterprise Manager console). Register Qlik 
Enterprise Manager 
license.

LICENSE_ {Module} evaluation license has expired. {Module} is one of the 


EVALUATION_ following: 
EXPIRED 
 l Replication 
Management 
 l Replication 
Analytics

LICENSE_TERM_ {Module} license has expired. {Module} is one of the 


EXPIRED  following: 

 l Replication 
Management 
 l Replication 
Analytics

LICENSE_INVALID_ The {Module} license signature is invalid. {Module} is one of the 


SIGNATURE  following: 

 l Replication 
Management 
 l Replication 
Analytics

LICENSE_HOST_ The host name in the {Module} license does not  {Module} is one of the 


MISMATCH match the Enterprise Manager machine name. following: 

 l Replication 
Management 
 l Replication 
Analytics 

AEM_MISSING_ The "{fieldName}" field is missing from the request. When a mandatory 


FIELD field is missing from the 
request or appears 
empty

API Guide - Qlik Enterprise Manager , November 2021 19


2   Enterprise Manager REST API

2.5   Login
General
URL
https://{host}/attunityenterprisemanager/api/v1/login

Description   
Authenticates an API caller with Enterprise Manager using Active Directory or SAML, and acquires a 
session token to be used with API method calls. The server requests client authentication.

HTTP method   
GET - Active Directory

POST - Active Directory and SAML

Required user role   
See Required Enterprise Manager permissions (page 251).

Request parameters
Request parameters
Location URL Parameter Name Required Example

URL host [string] Yes computer.network.net

Header (Required with Active  user@domain:password  Yes c27kc2Rmc27k


Directory authentication only) converted to base 64 [string]

The user password cannot contain a colon (:).

Response header
Response header parameters
URL Param Name Description

EnterpriseManager.APISessionID Identifier to be used to get authorization to run API functions on 
Enterprise Manager

cURL example
Active Directory request   
curl -i -k --header "Authorization: Basic cWFAcWE6cWE="
https://computer.network.net/attunityenterprisemanager/
api/v1/login

API Guide - Qlik Enterprise Manager , November 2021 20


2   Enterprise Manager REST API

SAML request   
curl -i -X POST https://computer.network.net/attunityenterprisemanager/api/v1/login --data
"@saml.txt"

Where @saml.txt  is  the SAML assertion from a SAML IDP. This must be a URL encoded string containing 
the SAMLResponse parameter  with a base64 encoded SAML assertion as its value. The string may also 
contain other parameters (for example, RelayState), but these parameters are ignored.

Response
HTTP/1.1 200 OK

Content-Length: 0

Content-Type: text/html

Server: Microsoft-HTTPAPI/2.0

EnterpriseManager.APISessionID: J3cKzWIbi_w6Fr1G-tO03Q

Date: Mon, 26 Dec 2016 17:02:01 GMT

Error response
Error responses
HTTP Code Enterprise Manager Code Text Description

401 UNAUTHORIZED_ Unauthorized  The request was not 


REQUEST Request. authorized.

2.6   Logout
General
URL
https://{host}/attunityenterprisemanager/api/v1/logout

Description   
End a session

HTTP method   
GET

Required user role   
See Required Enterprise Manager permissions (page 251).

API Guide - Qlik Enterprise Manager , November 2021 21


2   Enterprise Manager REST API

Request parameters
Request parameters
Location URL Param Name Required Example

URL host [string] Yes computer.network.net

Header EnterpriseManager.APISessionID [string] Yes wCo0_KvjEUFROvfHF5KGrw

cURL example
Request   
curl -i -k --header "EnterpriseManager.APISessionID: wCo0_KvjEUFROvfHF5KGrw A"
https://computer.network.net/attunityenterprisemanager/
api/v1/logout

Response   
Header:

HTTP/1.1 200 OK

Content-Length: 0

Content-Type: text/html

Server: Microsoft-HTTPAPI/2.0

Date: Tue, 27 Dec 2016 08:00:27 GMT

2.7   PutServerLicense
General
URL
https://[host]/attunityenterprisemanager/api/v1/servers/[server]/license/def

Description   
Registers a license on a specific server via Qlik Enterprise Manager.

HTTP method   
PUT

Required user role   
See Required Enterprise Manager permissions (page 251).

API Guide - Qlik Enterprise Manager , November 2021 22


2   Enterprise Manager REST API

Request parameters
Request parameters
Location Name Required Example

URL Host [string] Yes computer.network.net

URL ServerName [string] Yes The name of the server in 


Enterprise Manager:

myrepsrv1 

Header EnterpriseManager.APISessionID  Yes wCo0_KvjEUFROvfHF5KGrw


[string]

Request body
The license to register on the server [stream].

This is the license that was provided by your Qlik Sales Representative.

Expected format: Text or JSON.

Currently refers to the Replicate license only. 

cURL example
Request   
curl -i -k -X PUT --header "EnterpriseManager.APISessionID: wCo0_KvjEUFROvfHF5KGrw" --header
"Content-Length: 324"
"https://computer.network.net/attunityenterprisemanager/api/v1/servers/myrepsrv1/license/def"
-T "C:\license_exp2018-02-07_ser90000319.txt"

Request body   
(content of "C:\license_exp2018-02-07_ser90000319.txt ")

# Temporary license for development

license_type=evaluation_license

licensed_to=Qlik Internal - Qlik Replicate Development

licensed_by=Miki

serial_no=2333

expiration_date=2018-01-31

source_types=

API Guide - Qlik Enterprise Manager , November 2021 23


2   Enterprise Manager REST API

target_types=

features=manager

version=5.5.0.0

issue_date=2017-11-01

checksum=C2855-R5J8F-JF8RQ-C3K7K

Response   
Header:

HTTP/1.1 200 OK
Cache-Control: no-cache, no-store
Content-Length: 38
Content-Type: application/json; charset=utf-8
Server: Microsoft-HTTPAPI/2.0
Date: Mon, 26 Dec 2016 16:31:01 GMT

Error response
All of the general errors as well as the errors listed in the table below.

Error responses
Enterprise 
HTTP 
Manager  Text Description
Code
Code

500 AEM_PUT_ Failed to put  Returned if Qlik Enterprise Manager encounters an 


SRV_LIC_ license for server  error/exception when trying to register the license on 
INNER_ERR "{server}".  the specified server.

Error: "
{message}"

500 AEM_SRV_ The license file  Returned when the contents of the license file are 


LIC_INVALID_ format is corrupt. invalid.
FORMAT

2.8   GetServerDetails
General
URL
https://{host}/attunityenterprisemanager/api/v1/servers/[server]

Description   
Retrieves details about the specified server.

API Guide - Qlik Enterprise Manager , November 2021 24


2   Enterprise Manager REST API

HTTP method   
GET

Required user role   
See Required Enterprise Manager permissions (page 251).

Request parameters
Request parameters
Location    Name    Required    Example   

URL host [string] Yes computer.network.net

URL ServerName [string] Yes myrepsrv1

Header EnterpriseManager.APISessionID [string] Yes wCo0_KvjEUFROvfHF5KGrw

Response body
{
"serverDetails":{
"$type":"{string}",
"name":"{string}",
"description":"{string}",
"configuration":{
"host":"{string}",
"platform":"{enum server_platform}",
"port":"{string}",
"username":"{string}"
},
"state":"{enum server_state}",
"message": "{string}",
"version": "{string}",
"license":{
"issue_date":"{string}",
"state":"{enum license_state}",
"expiration":"{string}",
"days_to_expiration":"{int32}"
},
"last_connection":"{string}",
"task_summary":{
"total":"{int32}",
"running":"{int32}",
"stopped":"{int32}",
"recovering":"{int32}",
"error":"{int32}"
},
"resource_utilization":{
"disk_usage_mb":"{int64}",
"memory_mb":"{int64}",
"attunity_cpu_percentage":"{int32}",
"machine_cpu_percentage":"{int32}"
},
}
}

API Guide - Qlik Enterprise Manager , November 2021 25


2   Enterprise Manager REST API

Response parameters
General parameters
Name    Description   

$type The server's type, which can either be ReplicateServerDetails or 
ComposeServerDetails.

Name The name of the server in Qlik Enterprise Manager.

Description The server description

configuration parameters
Name    Description   

host The host name or IP address of the Replicate/Compose Server machine.

platform The platform on which  the Replicate/Compose Server machine is installed.

port The port through which the Replicate/Compose Server machine is accessed.

user name The user name for connecting to  the Replicate/Compose Server machine.

State The current monitoring state of  the Replicate/Compose Server machine.

message The error message if Qlik Enterprise Manager fails to connect to the Replicate/Compose 
Server machine.

version    The Replicate/Compose Server version.

license parameters
Name    Description   

issue_date When the license was issued.

state The current license state (for example, valid, expired, and so on.).

expiration The expiration date of the server license.   

days_to_expiration The number of days left before the license expires.

last_connection    The date and time of the last successful sync/retrieval of tasks and messages.

task_summary parameters
Name    Description   

total The total number of tasks, regardless of state.

running The number of running tasks.   

stopped The number of stopped tasks.   

recovering The number of recovering tasks.

error The number of tasks that encountered a fatal error.

API Guide - Qlik Enterprise Manager , November 2021 26


2   Enterprise Manager REST API

resource_utilization parameters
Name    Description   

disk_usage_ The amount of disk space that the server is currently consuming, in MB. This is the sum 
mb of disk usage for all tasks on this server. 

memory_mb    The amount of memory that the server is currently consuming, in MB. This is the sum of 
memory usage for all active tasks on this server, excluding stopped tasks. 

attunity_cpu_ The current CPU usage of the Replicate server process + all task processes.
percentage

machine_ The current total CPU usage of all the processes running on the machine.
cpu_
percentage

 l The return value -1 means N/A.
 l Parameters related to Disk, Memory, Qlik CPU, and Machine CPU usage are not 
available for Compose servers. For Compose servers, these parameters will be 
returned as -1.
 l Parameters related to Qlik CPU and Machine CPU usage are only available for 
Replicate 6.2 and above. For earlier Replicate versions, these parameters will be 
returned  as -1.
 l For servers that are in an error state or not monitored, parameters related to Disk and 
Memory usage will be returned  as -1.

cURL example
Request:

curl -i -k --header "EnterpriseManager.APISessionID: wCo0_KvjEUFROvfHF5KGrw"


https://computer.network.net/attunityenterprisemanager/api/v1/
servers/myrepsrv1

Response:

Headers:
HTTP/1.1 200 OK
Cache-Control: no-cache, no-store
Content-Length: 1658
Content-Type: application/json; charset=utf-8
Server: Microsoft-HTTPAPI/2.0
Date: Mon, 26 Dec 2016 13:18:27 GMT
Payload:
{
"serverDetails":{
"$type": "ReplicateServerDetails",
"name":"myrepsrv1",

API Guide - Qlik Enterprise Manager , November 2021 27


2   Enterprise Manager REST API

"description":"My daily replication tasks",


"configuration":{
"host":"computer.network.net",
"platform":"WINDOWS",
"port":"443",
"username":"Administrator"
},
"state":"MONITORED",
"message": "",
"version": "5.2.0.156",
"license":{
"issue_date":"2016-12-31",
"state":"LICENSE_VALID",
"expiration":"2017-12-31",
"days_to_expiration":"30"
},
"last_connection":"2016-12-18T02:23:30",
"task_summary":{
"total":50,
"running":20,
"stopped":10,
"recovering":12,
"error":8
},
"resource_utilization":{
"disk_usage_mb":500,
"memory_mb":112832,
"attunity_cpu_percentage":30,
"machine_cpu_percentage":50
},
}

Error response
Error responses
HTTP  Enterprise Manager 
Text    Description   
Code    Code   

500 AEM_SERVER_ Replicate server {server} could  Server name unknown to Qlik 


NOT_FOUND not be found. Enterprise Manager.

403 See Error handling  - -
(page 17).

440 See Error handling  - -
(page 17).

API Guide - Qlik Enterprise Manager , November 2021 28


2   Enterprise Manager REST API

2.9   PutServer
General
URL
https://[host]/attunityenterprisemanager/api/v1/servers/[server]/def

Description   
Adds a new Replicate/Compose Server or updates the server definition (Connection Properties) if the 
specified server already exists.

This method can be used together with GetServer in order to update the connection properties of an 
existing server. First call GetServer, then edit the returned properties as required, and finally, call 
PutServer.

HTTP method   
PUT

Required user role   
See Required Enterprise Manager permissions (page 251).

Request parameters
Request parameters
Location Name Required Example

URL Host [string] Yes computer.network.net

URL ServerName [string] Yes myrepsrv1 

Header EnterpriseManager.APISessionID [string] Yes wCo0_KvjEUFROvfHF5KGrw

Request body
{

"$type": "{string}",
"name": "{string}",
"description": "{string}",
"host": "{string}",
"port": "{string}",
"username": "{string}",
"password": "{string}",
"verify_server_certificate": {bool},
"monitored": {bool}
}

API Guide - Qlik Enterprise Manager , November 2021 29


2   Enterprise Manager REST API

Request Parameters
Request parameters
Name Description

$type The server's type: Can either be AemReplicateServer or AemComposeServer.

name The name of the server.

For details of what constitutes a valid server name, see AEM_INVALID_NAME  (page 
34).

description  The description of the server.

For details of what constitutes a valid description, see AEM_INVALID_DESC (page 33)

host  The host name or IP address of the server.

For details of what constitutes a valid host name, see AEM_INVALID_HOST  (page 33)

port  The port through which the server is accessed.

username The user name to connect to the server.

The specified user must be a server administrator.

For details of what constitutes a valid user name, see AEM_INVALID_USERNAME 
(page 33).

password The password to connect to the server.

Within a session, the password identifier (GUID) that is returned by 
GetServer can be used in this request to indicate that the password should 
remain unchanged.

The password identifier returned by GetServer must be used in the same 
session, otherwise an error will occur.

API Guide - Qlik Enterprise Manager , November 2021 30


2   Enterprise Manager REST API

Name Description

verify_ Set  to true to ensure the Server certificate is trusted. As a rule, to reduce the chance of 
server_ "man-in-the-middle" attacks, this option should always be set to true. 
certificate
 l When connecting directly to an Qlik Replicate replication server (default port 
3552) with its automatically generated self-signed certificate, Qlik Enterprise 
Manager is able to validate the certificate without requiring any additional setup.  

 l When connecting to a Replicate Server via the Replicate UI Server (typically 
using port 443) or to the Replicate replication server with a user-installed 
certificate, you must make sure that the SSL/TLS certificate used by the server is 
trusted by the Qlik Enterprise Manager machine. The same applies when 
connecting to a Compose Server with a user-installed certificate.   You can easily 
verify whether the certificate is trusted by opening a Chrome browser window on 
the Qlik Enterprise Manager machine and connecting to Replicate. If there are 
no security warnings, the certificate is trusted.  

For information on the different ways of connecting to Qlik Replicate, see Qlik Replicate 
Server Requirements in the Qlik Enterprise Manager Help.

monitored Whether to retrieve tasks and messages from this server or not. The default is true.

cURL example
Request   
curl -i -k -X PUT --header "EnterpriseManager.APISessionID: wCo0_KvjEUFROvfHF5KGrw" --header
"Content-Length: 242"
https://computer.network.net/attunityenterprisemanager/api/v1/servers/myrepsrv1/def -T
"C:\myrepsrv1.json"

Request body   
(content of "C:\myrepsrv1.json")

{
"$type":"AemReplicateServer",
"name":"myrepsrv1",
"description":"replicate for business",
"host":"rep2018r2gs7.qa.int",
"port":"443",
"username":"administrator",
"password":"pass123",
"verify_server_certificate":true,
"monitored":true
}

Response   
Headers:
HTTP/1.1 200 OK

Cache-Control: no-cache, no-store

API Guide - Qlik Enterprise Manager , November 2021 31


2   Enterprise Manager REST API

Content-Length: 38

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

Server: Microsoft-HTTPAPI/2.0

Date: Mon, 26 Dec 2016 13:18:27 GMT

Error Response
All of the general errors as well as the errors listed in the table below.

Error responses
HTTP  Enterprise 
Text Description
Code Manager Code

500 DESERIALIZE_ "Failed to deserialize json to type Server:  Returned when 


TO_TYPE {message}"  the JSON format 
is invalid format. 
For example, 
such an error will 
be returned if the 
JSON contains 
an unknown role.

500 AEM_PUT_ Failed to put server "{server}".  Returned if Qlik 


SERVER_ Enterprise 
Error: "{message}".
INNER_ERR Manager 
encounters an 
error/exception 
when trying to 
PUT the server.

500 AEM_INVALID_ Server type {ServerType} for server " Returned when  


SERVER_TYPE {ServerName}" is not valid. an invalid server 
type is specified.

500 AEM_NAME_ The name of the server in the request does not  Returned when 


URL_MISMATCH match the one that is specified in the URL. the name of the 
server in the 
request does not 
match the one 
that is specified in 
the URL.

500 AEM_EMPTY_ The host is missing from the request. Returned when 


HOST the host is 
missing from the 
request.

API Guide - Qlik Enterprise Manager , November 2021 32


2   Enterprise Manager REST API

HTTP  Enterprise 
Text Description
Code Manager Code

500 AEM_EMPTY_ The port is missing from the request. Returned when 


PORT the port is 
missing from the 
request.

500 AEM_EMPTY_ The username is missing from the request.  Returned when 


USERNAME the user name is 
missing from the 
request.

500 AEM_EMPTY_ The password is missing from the request.  Returned when 


PASSWORD the password is 
missing from the 
request. 

500 AEM_INVALID_ The port is invalid. Returned when 


PORT  the specified port 
is not valid.

500 AEM_INVALID_ The user name is invalid.  Returned when 


USERNAME the specified user 
User names cannot exceed 104 characters and 
name is not valid.
can contain all Unicode characters except for the 
following characters: Forward slash (/), Left square 
bracket ([), Right square bracket (]), Colon (:), 
Semicolon (;), Vertical bar (|), Equal sign (=), Plus 
sign (+), Asterisk (*), Question mark (?), Left angle 
bracket (<), Right angle bracket (>), Double quote 
(\").

500 AEM_INVALID_ The description is invalid.  Returned when 


DESC the description 
Descriptions cannot exceed 250 characters.
exceeds 250 
characters.

500 AEM_INVALID_ The host is invalid.  Returned when 


HOST  the server host 
Hosts cannot exceed 64 characters and can only 
name exceeds 64 
contain letters (a-z or A-Z), digits, spaces, dots (.), 
characters or 
dashes (-), and underscores (_).
contains invalid 
characters.

API Guide - Qlik Enterprise Manager , November 2021 33


2   Enterprise Manager REST API

HTTP  Enterprise 
Text Description
Code Manager Code

500 AEM_INVALID_ The name of the server is invalid.  Returned when 


NAME  the server name 
Server names cannot exceed 64 characters and 
exceeds 64 
can only contain letters (a-z or A-Z), digits, spaces, 
characters or 
dots (.), dashes (-), and underscores (_). 
contains invalid 
characters.

500 AEM_HOST_ Host {name/IP} and port {number} are already in  Returned when 


PORT_ use by another server. both the server 
ALREADY_EXIST host name/IP 
  address and the 
server port are 
already in use  by 
another server.

500 - - -

2.10   PutServerAcl
General
URL
https://[host]/attunityenterprisemanager/api/v1/servers/[server]?action=acl

Description   
Puts an explicit ACL for a specific server in Qlik Enterprise Manager.

The method will replace any existing explicit ACL with the ACL in the request.

The request also includes a Boolean flag for specifying if the server  should  inherit ACLs from its ancestors 
(in addition to its explicitly defined ACLs) or not.

The inherited ACLs (that is, the ACLs of the server's ancestors) are not affected by this method.

The PutServerAcl can be used together with the GetServerAcl method in order to update an existing 


server's ACL. First call GetServerAcl, then edit the returned roles as required, and finally, call 
PutServerAcl.

Behavior when putting a partial request   
When the request body  includes only some of the roles (as opposed to all four of them), only the roles 
specifically defined in the request body will be set on the server; roles that are missing or empty will be 
inherited, but only if the following are true:

API Guide - Qlik Enterprise Manager , November 2021 34


2   Enterprise Manager REST API

 l The disable_inheritance flag is set to "True".
 l The  roles that are missing/empty in the request are defined for the ancestors.

Behavior on conflicts   
If the disable_inheritance flag is set to "False" and the explicit roles in the request conflict with existing 
inherited roles, then the explicit roles will take precedence. For example, if the request defines user A as a 
Viewer on MyServer and user A is also defined as an Admin on All Servers, then user A will be defined as 
an Admin on All Servers but as a Viewer on MyServer.

The user permissions in Enterprise Manager are completely independent of the user 
permissions in Replicate. Consequently, PutServerAcl will affect the server's Enterprise 
Manager user permissions, but will not affect Replicate's user permissions. 

Moreover, when performing an operation via Enterprise Manager, the user permissions 
defined for the server entity in Enterprise Manager apply, whereas when performing an 
operation directly via the Replicate Console, the user permissions defined in  Replicate apply. 

Defining the same user/group in different roles is not allowed. However, if the same user or 
group is defined in different roles but with a different case (for example, Mike vs. mike or 
Analysts vs. ANALYSTS), no error will be returned and the strongest role will take precedence.

HTTP method   
PUT

Required user role   
See Required Enterprise Manager permissions (page 251).

Request parameters
Request parameters
Location Name Required Example

URL Host [string] Yes computer.network.net

URL ServerName [string] Yes myrepsrv1 

Header EnterpriseManager.APISessionID [string] Yes wCo0_KvjEUFROvfHF5KGrw

Request body
{

"admin_role": {

"users": [ { "name": "{string}"}, { "name": "{string}"}, … ],

"groups": [ { "name": "{string}"}, { "name": "{string}"}, … ]

},

API Guide - Qlik Enterprise Manager , November 2021 35


2   Enterprise Manager REST API

"designer_role": {

"users": [ { "name": "{string}"}, { "name": "{string}"}, … ],

"groups": [ { "name": "{string}"}, { "name": "{string}"}, … ]

},

"operator_role": {

"users": [ { "name": "{string}"}, { "name": "{string}"}, … ],

"groups": [ { "name": "{string}"}, { "name": "{string}"}, … ]

},

"viewer_role": {

"users": [ { "name": "{string}"}, { "name": "{string}"}, … ],

"groups": [ { "name": "{string}"}, { "name": "{string}"}, … ]

},

"disable_inheritance": "{bool}"

Request parameters
 l admin_role
 l users: An array of users assigned as Admins on the server.
 l name: A single Admin user. 
 l groups: An array of groups assigned as Admins on the server.
 l name: A single Admin group.
 l designer_role
 l users: An array of users assigned as Designers on the server.
 l name: A single Designer user. 
 l groups: An array of groups assigned as Designers on the server.
 l name: A single Designer group.
 l operator_role
 l users: An array of users assigned as Operators on the server.
 l name: A single Operator user. 
 l groups: An array of groups assigned as Operators on the server.
 l name: A single Operator group.
 l viewer_role
 l users: An array of users assigned as Viewers on the server.
 l name: A single Viewer user. 
 l groups: An array of groups assigned as Viewers on the server.
 l name: A single Viewer group.

API Guide - Qlik Enterprise Manager , November 2021 36


2   Enterprise Manager REST API

 l disable_inheritance: If set to "true", the server does not inherit ACLs from its ancestors (in addition 
to its explicit ACLs).  If set to "false", the server inherits ACLs from its ancestors, in addition to any 
explicit ACLs.

Response parameters
Name A B Description

admin_role - - -

- users - An array of users assigned as Admins on the server.

- - name A single Admin user. 

- groups - An array of groups assigned as Admins on the server.

- - name A single Admin group.

designer_ - - -
role

- users - An array of users assigned as Designers on the server.

- - name A single Designer user. 

- groups - An array of groups assigned as Designers on the server.

- - name A single Designer group.

operator_role - - -

- users - An array of users assigned as Operators on the server.

- - name A single Operator user. 

- groups - An array of groups assigned as Operators on the server.

- - name A single Operator group.

viewer_role - - -

- users - An array of users assigned as Viewers on the server.

- - name A single Viewer user. 

- groups - An array of groups assigned as Viewers on the server.

- - name A single Viewer group.

disable_ - - If set to "true", the server does not inherit ACLs from its 
inheritance ancestors (in addition to its explicit ACLs).  If set to "false", the 
server inherits ACLs from its ancestors, in addition to any explicit 
ACLs.

cURL example
Request   
CURL.EXE -i -k -X PUT --header "EnterpriseManager.APISessionID: wCo0_KvjEUFROvfHF5KGr" --
header "Content-Length: 638" https://computer.network.net/attunityenterprisemanager/
api/v1/servers/myrepsrv1?action=acl" -T "C:\myrepsrv1Acl.json"

API Guide - Qlik Enterprise Manager , November 2021 37


2   Enterprise Manager REST API

Request body   
(defined in myrepsrv1Acl.json)

{
"admin_role": {
"users": [
{"name": "QLIK\\Paul.Clarke"},
{"name": "QLIK\\testAuth1"}
],

"groups": [
{"name": "QLIK\\AttunityEnterpriseManagerAdmins"}
]
},
"designer_role": {
"users": [
{"name": "QLIK\\Marisa.Lewis"},
{"name": "QLIK\\testAuth2"}
],
"groups": [
{"name": "QLIK\\AttunityEnterpriseManagerDesigners"}
]
},
"operator_role": {
"users": [
{"name": "QLIK\\David.Foster"},
{"name": "QLIK\\testAuth3"}
],
"groups": [
{"name": "QLIK\\AttunityEnterpriseManagerOperators"}
]
},
"viewer_role": {
"users": [
{"name": "QLIK\\Laura.Todd"},
{"name": "QLIK\\testAuth4"}
],
"groups": [
{"name": "QLIK\\AttunityEnterpriseManagerViewers"}
]
},
"disable_inheritance": true

Response   
Header:

HTTP/1.1 200 OK
Cache-Control: no-cache, no-store
Content-Length: 38
Content-Type: application/json; charset=utf-8
Server: Microsoft-HTTPAPI/2.0
Date: Mon, 26 Dec 2016 16:31:01 GMT

API Guide - Qlik Enterprise Manager , November 2021 38


2   Enterprise Manager REST API

Error response
All of the general errors as well as the errors listed in the table below.

Error responses
HTTP  Enterprise 
Text Description
Code Manager Code

500 DESERIALIZE_ "Failed to deserialize json to  Returned when the JSON format is 


TO_TYPE type AemAuthorizationAcl:  invalid format. For example, such an 
{message}"  error will be returned if the JSON 
contains an unknown role.

500 AEM_PUT_ Failed to put ACL of server " Returned if Qlik Enterprise Manager 


SERVER_ACL_ {server}".  encounters an error/exception when 
INNER_ERR trying to put the server's ACL.
Error: "{message}".

500 AEM_NO_  User "{userName}" must be  Returned when the domain is 


DOMAIN_IN_ preceded by a domain name,  missing from the user name.
USER separated by a backslash.  

Example: 

domain_name\user_name. 

500 AEM_NO_  Group "{groupName}" must be  Returned when the domain is 


DOMAIN_IN_ preceded by a domain name,  missing from the group name.
GROUP separated by a backslash.  

Example: 

domain_name\group_name. 

500 AEM_NO_ Requested server " Returned when there is no admin on 


ADMIN_ON_ {serverName}" has no admin  the server. 
SERVER  user. 
Possible reasons:
At least one user or group must 
 l The request JSON is set to 
be assigned to the "admin" role.
disable_inheritance=true 
and the explicit admin role in 
the JSON is empty.
 l The JSON is set to disable_
inheritance =true, the 
explicit admin role in the 
JSON is empty, and the 
parent levels do not have an 
admin user to inherit.

API Guide - Qlik Enterprise Manager , November 2021 39


2   Enterprise Manager REST API

HTTP  Enterprise 
Text Description
Code Manager Code

500 AEM_USER_ User "{userName}" is assigned  Returned when a user is assigned to 


ASSIGNED_TO_ to multiple roles. Users can only  multiple roles.
MULTIPLE_ be assigned to a single role. 
ROLES 

500 AEM_GROUP_ Group "{groupName}" is  Returned when a group is assigned 


ASSIGNED_TO_ assigned to multiple roles.  to multiple roles.
MULTIPLE_ Groups can only be assigned to 
ROLES   a single role.  

500 AEM_USER_ "{userName/groupName}" is  Returned either when the specified 


GROUP_ assigned to multiple roles or to  user already exists as a group in the 
MULTIPLE_ the same role twice.  same/another role, or the specified 
ASSIGNED Users/groups can only be  group already exists as a user in the 
assigned once, and to a single  same/another role.
role.

2.11   GetServer
General
URL
https://[host]/attunityenterprisemanager/api/v1/servers/[server]/def

Description   
Retrieves the definition (Connection Properties) of the specified  server.

This method can be used together with PutServer in order to update the connection properties of an 
existing server. First call GetServer, then edit the returned properties as required, and finally, call 
PutServer.

HTTP method   
GET

Required user role   
See Required Enterprise Manager permissions (page 251).

Request parameters
Request parameters
Location Name Required Example

URL Host [string] Yes computer.network.net

API Guide - Qlik Enterprise Manager , November 2021 40


2   Enterprise Manager REST API

Location Name Required Example

URL ServerName [string] Yes myrepsrv1 

Header EnterpriseManager.APISessionID [string] Yes wCo0_KvjEUFROvfHF5KGrw

Response body
{

"$type": "{string}",
"name": "{string}",
"description": "{string}",
"host": "{string}",
"port": "{string}",
"username": "{string}",
"password": "{string}",
"verify_server_certificate": "{bool}",
"monitored": "{bool}"
}

Response parameters
Response parameters
Name Description

$type The server's type. Can either be AemReplicateServer or AemComposeServer.

name The name of the server.

description  The description of the server.

host  The host name or IP address of the server.

port  The port through which the server is accessed.

username The user name to connect to the Replicate/Compose Server.

password The password to connect to the Replicate/Compose Server.

The password identifier (GUID) that is returned by GetServer is valid only 
for the session in which it was generated.

Using it in another session (for example as input for PutServer) will result in 
exception. 

verify_ When "true", Qlik Enterprise Manager verifies that the Server certificate is trusted, 
server_ thereby reducing the chance of "man-in-the-middle" attacks.
certificate
For details on setting this option, see PutServer (page 29).

monitored Whether to retrieve tasks and messages from this server or not.

API Guide - Qlik Enterprise Manager , November 2021 41


2   Enterprise Manager REST API

cURL example
Request   
CURL.EXE -i -k --header "EnterpriseManager.APISessionID: wCo0_KvjEUFROvfHF5KGr"
https://computer.network.net/attunityenterprisemanager/
api/v1/servers/myrepsrv1/def

Response   
Headers:
HTTP/1.1 200 OK

Cache-Control: no-cache, no-store

Content-Length: 224

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

Server: Microsoft-HTTPAPI/2.0

Date: Mon, 26 Dec 2016 13:18:27 GMT

Payload
{
"$type":"AemReplicateServer",
"name":"myrepsrv1",
"description":"replicate for business",
"host":"rep2018r2gs7.qa.int",
"port":"443",
"username":"administrator",
"password":"{S:98bdfd05-d16e-4afb-ad24-256c4dc6aae9}",
"verify_server_certificate":"true",
"monitored":"true"
}

Error response
All of the general errors as well as the following error:

Error responses
HTTP  Enterprise 
Text Description
Code Manager Code

500 AEM_GET_ Failed to get  Returned if Qlik Enterprise Manager encounters an 


SERVER_ server " error/exception when trying to get the server details.
INNER_ERR {server}". 

Error: "
{message}".

API Guide - Qlik Enterprise Manager , November 2021 42


2   Enterprise Manager REST API

2.12   GetServerAcl
General
URL
https://[host]/attunityenterprisemanager/api/v1/servers/[server]?action=acl

Description   
Retrieves the explicit ACL defined in Qlik Enterprise Manager for the specified server, including a Boolean 
indication if ACL inheritance is disabled or enabled for the server. 

The method returns the explicit ACL only. In other words, it does not return inherited ACLs.

If all of the servers ACLs are inherited (that is, no ACL was explicitly defined for the server), an error will be 
returned indicating that no ACL was found.

This method can be used together with PutServerAcl in order to update an existing server's ACL. First call 
GetServerAcl, then edit the returned roles as required, and finally, call PutServerAcl.

HTTP method   
GET

Required user role   
See Required Enterprise Manager permissions (page 251).

Request parameters
Request parameters
Location Name Required Example

URL Host [string] Yes computer.network.net

URL ServerName [string] Yes myrepsrv1 

Header EnterpriseManager.APISessionID [string] Yes wCo0_KvjEUFROvfHF5KGrw

Response body
{

"admin_role": {
"users": [ { "name": "{string}"}, { "name": "{string}"}, … ],
"groups": [ { "name": "{string}"}, { "name": "{string}"}, … ]
},
"designer_role": {
"users": [ { "name": "{string}"}, { "name": "{string}"}, … ],
"groups": [ { "name": "{string}"}, { "name": "{string}"}, … ]
},
"operator_role": {
"users": [ { "name": "{string}"}, { "name": "{string}"}, … ],
"groups": [ { "name": "{string}"}, { "name": "{string}"}, … ]
},

API Guide - Qlik Enterprise Manager , November 2021 43


2   Enterprise Manager REST API

"viewer_role": {
"users": [ { "name": "{string}"}, { "name": "{string}"}, … ],
"groups": [ { "name": "{string}"}, { "name": "{string}"}, … ]
},
"disable_inheritance": "{bool}"
}

Response parameters
 l admin_role
 l users: An array of users assigned as Admins on the server.
 l name: A single Admin user. 
 l groups: An array of groups assigned as Admins on the server.
 l name: A single Admin group.
 l designer_role
 l users: An array of users assigned as Designers on the server.
 l name: A single Designer user. 
 l groups: An array of groups assigned as Designers on the server.
 l name: A single Designer group.
 l operator_role
 l users: An array of users assigned as Operators on the server.
 l name: A single Operator user. 
 l groups: An array of groups assigned as Operators on the server.
 l name: A single Operator group.
 l viewer_role
 l users: An array of users assigned as Viewers on the server.
 l name: A single Viewer user. 
 l groups: An array of groups assigned as Viewers on the server.
 l name: A single Viewer group.
 l disable_inheritance: If set to "true", the server does not inherit ACLs from its ancestors (in addition 
to its explicit ACLs).  If set to "false", the server inherits ACLs from its ancestors, in addition to any 
explicit ACLs.

Response parameters
Name A B Description

admin_role - - -

- users - An array of users assigned as Admins on the server.

- - name A single Admin user. 

- groups - An array of groups assigned as Admins on the server.

- - name A single Admin group.

API Guide - Qlik Enterprise Manager , November 2021 44


2   Enterprise Manager REST API

Name A B Description

designer_ - - -
role

- users - An array of users assigned as Designers on the server.

- - name A single Designer user. 

- groups - An array of groups assigned as Designers on the server.

- - name A single Designer group.

operator_role - - -

- users - An array of users assigned as Operators on the server.

- - name A single Operator user. 

- groups - An array of groups assigned as Operators on the server.

- - name A single Operator group.

viewer_role - - -

- users - An array of users assigned as Viewers on the server.

- - name A single Viewer user. 

- groups - An array of groups assigned as Viewers on the server.

- - name A single Viewer group.

disable_ - - If set to "true", the server does not inherit ACLs from its 
inheritance ancestors (in addition to its explicit ACLs).  If set to "false", the 
server inherits ACLs from its ancestors, in addition to any explicit 
ACLs.

cURL example
Request   
CURL.EXE -i -k --header "EnterpriseManager.APISessionID: wCo0_KvjEUFROvfHF5KGr"
https://computer.network.net/attunityenterprisemanager/
api/v1/servers/myrepsrv1?action=acl"

Response   
Headers:
HTTP/1.1 200 OK

Cache-Control: no-cache, no-store

Content-Length: 502

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

Server: Microsoft-HTTPAPI/2.0

Date: Mon, 26 Dec 2016 13:18:27 GMT

API Guide - Qlik Enterprise Manager , November 2021 45


2   Enterprise Manager REST API

Payload
{
"admin_role": {
"users": [
{"name": "QLIK\\Paul.Clarke"},
{"name": "QLIK\\testAuth1"}
],
"groups": [
{"name": "QLIK\\AttunityEnterpriseManagerAdmins"}
]
},
"designer_role": {
"users": [
{"name": "QLIK\\Marisa.Lewis"},
{"name": "QLIK\\testAuth2"}
],
"groups": [
{"name": "QLIK\\AttunityEnterpriseManagerDesigners"}
]
},
operator_role": {
"users": [
{"name": "QLIK\\David.Foster"},
{"name": "QLIK\\testAuth3"}
],
"groups": [
{"name": "QLIK\\AttunityEnterpriseManagerOperators"}
]
},
"viewer_role": {
"users": [
{"name": "QLIK\\Laura.Todd"},
{"name": "QLIK\\testAuth4"}
],
"groups": [
{"name": "QLIK\\AttunityEnterpriseManagerViewers"}
]
},
"disable_inheritance": true

Error response
All of the general errors as well as the errors listed in the table below.

API Guide - Qlik Enterprise Manager , November 2021 46


2   Enterprise Manager REST API

Error responses
HTTP  Enterprise 
Text Description
Code Manager Code

500 AEM_GET_ Failed to get  Returned if Qlik Enterprise Manager encounters an 


SERVER_ ACL of server " error/exception when trying to get the server ACL.
ACL_INNER_ {server}". 
ERR
Error: "
{message}".

500 AEM_ ACL for server " Returned if no explicit ACL is defined for the server. 


SERVER_ {server}" could 
HAS_NO_ACL not be found.
A server that does not have its own 
explicit ACL  inherits the ACL from its 
ancestors. Inherited ACLs are not 
returned by this method. 

2.13   GetServerList
General
URL
https://[host]/attunityenterprisemanager/api/v1/servers

Description   
Retrieves a list of servers under Qlik Enterprise Manager management as well as each server's properties. 

HTTP method   
GET

Required user role   
See Required Enterprise Manager permissions (page 251).

Request parameters
Request parameters
Location Name Required Example

URL host [string] Yes computer.network.net

Header EnterpriseManager.APISessionID [string] Yes wCo0_KvjEUFROvfHF5KGrw

Response body
{
"serverList": [{

API Guide - Qlik Enterprise Manager , November 2021 47


2   Enterprise Manager REST API

"$type": "{string}",
"name": "{string}",
"description": "{string}",
"host": "{string}",
"port": "{string}",
"state": "{enum_server_state}",
"message": "{string}",
"platform": "{enum_server_platform}",
"version": "{string}",
"last_connection":"{string}"
}, …
]
}

Response parameters
Response parameters
Name Description

$type The server's type, which can either be ReplicateServerInfo or ComposeServerInfo.

name The name of the server.

description  The description of the server.

host  The host name or IP address of the server.

port  The port through which the server is accessed.

state The current state of the server.

message The error message if Qlik Enterprise Manager fails to connect and monitor the 
server. 

platform The operating system on which the server is installed.

version The version of the server.

last_connection  The date and time of the last successful sync/retrieval of tasks and messages.

cURL example
Request   
CURL.EXE -i -k --header "EnterpriseManager.APISessionID: wCo0_KvjEUFROvfHF5KGr
https://computer.network.net/attunityenterprisemanager/
api/v1/servers

Response   
Headers:
HTTP/1.1 200 OK

Cache-Control: no-cache, no-store

Content-Length: 1658

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

Server: Microsoft-HTTPAPI/2.0

API Guide - Qlik Enterprise Manager , November 2021 48


2   Enterprise Manager REST API

Date: Mon, 26 Dec 2016 13:18:27 GMT

Payload
{
"serverList": [{
"$type": "ReplicateServerInfo",
"name": "RepBS",
"description": "replicate for business",
"host": "rep2008r2gs7.qa.int",
"port": "443",
"state": "MONITORED",
"message": "",
"platform": "WINDOWS",
"version": "5.2.0.156",
"last_connection": "2016-12-18T02:23:30",
}, {
"$type": "ReplicateServerInfo",
"name": "RepDev",
"description": "replicate for developers",
"host": "rep2008r2gs8.qa.int",
"port": "443",
"state": "NOT_MONITORED",
"message": "Server changed status to Not Monitored.",
"platform": "WINDOWS",
"version": "5.2.0.156",
"last_connection": "2016-11-16T05:30:00",
}, {
"$type": "ReplicateServerInfo",
"name": "RepProd",
"description": "replicate for production",
"host": "rep2008r2gs9.qa.int",
"port": "443",
"state": "ERROR",
"message": "REPLICATE-E-REPSRVNFND, Replicate server 'Rep 5003' not found. Last Connection:
12:21 PM",
"platform": "WINDOWS",
"version": "5.2.0.156",
"last_connection": "2016-11-16T05:30:00",
}
]
}

2.14   DeleteServer
General
URL
https://[host]/attunityenterprisemanager/api/v1/servers/[server]/def

Description   
When this method is called, Qlik Enterprise Manager will:

API Guide - Qlik Enterprise Manager , November 2021 49


2   Enterprise Manager REST API

 l Delete the specified server from Qlik Enterprise Manager
 l Stop monitoring any tasks that were defined on the server
 l Delete all messages related to the server from the Message Center
 l Delete all user roles defined for the server, the server tasks, and the server endpoints

The above operations will be performed, regardless of whether the server is currently being 
monitored or in an error state.

HTTP method   
DELETE

Required user role   
See Required Enterprise Manager permissions (page 251).

Request parameters
Request parameters
Location Name Required Example

URL host [string] Yes computer.network.net

URL ServerName [string] Yes myrepsrv1

Header EnterpriseManager.APISessionID [string] Yes wCo0_KvjEUFROvfHF5KGrw

cURL example
Request   
curl -i -k -X DELETE --header "EnterpriseManager.APISessionID: wCo0_KvjEUFROvfHF5KGrw" --
header "Content-Length: 0"
https://computer.network.net/attunityenterprisemanager/api/v1/servers/myrepsrv1/def

Response   
Header:
HTTP/1.1 200 OK
Cache-Control: no-cache, no-store
Content-Length: 38
Content-Type: application/json; charset=utf-8
Server: Microsoft-HTTPAPI/2.0
Date: Mon, 26 Dec 2016 16:31:01 GMT

Error response
All of the general errors as well as the errors listed in the table below.

API Guide - Qlik Enterprise Manager , November 2021 50


2   Enterprise Manager REST API

Error responses
HTTP  Enterprise 
Text Description
Code Manager Code

500 AEM_SERVER_ Requested server " The server name is unknown to Qlik 


NOT_FOUND {server}" could not be  Enterprise Manager.
found.

500 AEM_DELETE_ Failed to delete  Qlik Enterprise Manager encountered an 


SERVER_INNER_ requested server " error/exception when trying to delete the 
ERR {server}". server.

2.15   DeleteServerAcl
General
URL
https://[host]/attunityenterprisemanager/api/v1/servers/[server]?action=acl

Description   
Deletes the explicit ACL defined in Qlik Enterprise Manager for the specified server.

Inherited ACLs are not affected by this method. 

Once the explicit ACL is deleted from the server, all ACLs will be automatically inherited from the server's 
ancestors.  

HTTP method   
DELETE

Required user role   
See Required Enterprise Manager permissions (page 251).

Request parameters
Request parameters
Location Name Required Example

URL Host [string] Yes computer.network.net

URL ServerName [string] Yes myrepsrv1 

Header EnterpriseManager.APISessionID [string] Yes wCo0_KvjEUFROvfHF5KGrw

API Guide - Qlik Enterprise Manager , November 2021 51


2   Enterprise Manager REST API

cURL example
Request   
CURL.EXE -i -k -X DELETE --header "EnterpriseManager.APISessionID: wCo0_KvjEUFROvfHF5KGr" --
header https://computer.network.net/attunityenterprisemanager/
api/v1/servers/myrepsrv1?action=acl"

Response   
Header:

HTTP/1.1 200 OK
Cache-Control: no-cache, no-store
Content-Length: 38
Content-Type: application/json; charset=utf-8
Server: Microsoft-HTTPAPI/2.0
Date: Mon, 26 Dec 2016 16:31:01 GMT

Error response
All of the general errors as well as the errors listed in the table below.

Error responses
HTTP  Enterprise 
Text Description
Code Manager Code

500 AEM_DELETE_ Failed to delete  Returned if Qlik Enterprise Manager 


SERVER_ACL_ ACL of server " encounters an error/exception when trying to 
INNER_ERR {server}".  delete the server's ACL.

Error: "{message}".

500 AEM_SERVER_ ACL for server " Returned when the specified server has no 


HAS_NO_ACL {server}" could not  explicit ACL defined. 
be found.  

2.16   GetTaskList
General
URL
https://{host}/attunityenterprisemanager/api/v1/servers/{ServerName}/tasks

Description   
Receive a list of tasks per selected and authorized server. For each task, the API returns a few parameters.

Method   
GET

API Guide - Qlik Enterprise Manager , November 2021 52


2   Enterprise Manager REST API

Required user role   
See Required Enterprise Manager permissions (page 251).

Request parameters
Request parameters
Location Name Required Example

URL host [string] Yes computer.network.net

URL ServerName [string] Yes myrepsrv1

Header EnterpriseManager.APISessionID [string] Yes wCo0_KvjEUFROvfHF5KGrw

Response body
{

"taskList": [{

"name": "{string}",

"state": "{enum task_state}",

"stop_reason": "{enum stop_reason}",

"message": "{string}",
"assigned_tags": ["string", "string", "string", …]
}, {

"name": "{string}",

"state": "{enum task_state}",

"stop_reason": "{enum stop_reason }",

"message": "{string}",

"assigned_tags": ["string", "string", "string", …]


}, {

"name": "{string}",

"state": "{enum task_state}",

"stop_reason": "{enum stop_reason}",

"message": "{string}",

"assigned_tags": ["string", "string", "string", …]

API Guide - Qlik Enterprise Manager , November 2021 53


2   Enterprise Manager REST API

Response parameters
Response parameters
Name Description

name  l Replicate: - The name of the task.
 l Compose: - The name of the task or workflow appended with a double 
underscore and the project name.

Example:  

mytask__myproject

state The current state of the task.

stop_reason The reason the task has stopped. For Compose tasks, this will always be NONE.

message The message if the task stopped due to an error.

assigned_ Returns the custom tags assigned to the task. If no tags are assigned to the task, an 
tags empty array will be returned.

cURL example
Request   
curl -i -k --header "EnterpriseManager.APISessionID: wCo0_KvjEUFROvfHF5KGrw"
https://computer.network.net/attunityenterprisemanager/
api/v1/servers/myrepsrv1/tasks

Response 

For Compose tasks, the task"name" response will be in the following format: taskName__
projectName.

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
{

"taskList": [{

"name": "Task1",

API Guide - Qlik Enterprise Manager , November 2021 54


2   Enterprise Manager REST API

"state": "RUNNING",

"stop_reason": "NONE",

"message": "NONE",

"assigned_tags": ["MyTag1", "MyTag2", "MyTag3"]

}, {

"name": " Task2",

"state": "STOPPED",

"stop_reason": "FULL_LOAD_ONLY_FINISHED",

"message": "NONE,

"assigned_tags": ["MyTag5"]

}, {

"name": "Task3",

"state": "RUNNING",

"stop_reason": "NONE",

"message": "NONE",

"assigned_tags": []

Errors
See general errors.

2.17   GetTaskDetails
General
URL

 Enterprise Manager May 2021:

https://{host}/attunityenterprisemanager/api/v1/servers/{ServerName}/tasks/{TaskName}

From Enterprise Manager May 2021 SR1:   

Replicate:

https://{host}/attunityenterprisemanager/api/v1/servers/{ServerName}/tasks/{TaskName}

API Guide - Qlik Enterprise Manager , November 2021 55


2   Enterprise Manager REST API

Compose:

https://{host}/attunityenterprisemanager/api/v1/servers/{ServerName}/tasks/{TaskName__
ProjectName|WorkflowName__ProjectName}

Description   
Retrieves details about a selected and authorized task. The API returns full monitoring information related 
to the selected task.

HTTP method   
GET

Required user role   
See Required Enterprise Manager permissions (page 251).

Request parameters
Request parameters
Location Name Description Required Example

URL host [string] The  Yes computer.network.net


Hostname of 
the 
Enterprise 
Manager 
machine.

URL ServerName [string] The display  Yes myserver1


name of the 
Replicate or 
Compose 
Server 
defined in 
Enterprise 
Manager.

API Guide - Qlik Enterprise Manager , November 2021 56


2   Enterprise Manager REST API

Location Name Description Required Example

URL May 2021: May 2021: Yes SalesDBBackup

TaskName [string] The name of 


the Replicate 
From Enterprise Manager May  or Compose 
2021 SR1:    task.

For Replicate: From 
Enterprise 
TaskName
Manager 
For Compose: May 2021 
SR1:   
TaskName__
ProjectName|WorkflowNam The name of 
e__ProjectName[string] the Replicate 
task or the 
 
name of the 
Compose 
task or 
workflow 
appended 
with a double 
underscore 
and the 
project name.

Compose 
task 
example:

mytask__
myproject

Header EnterpriseManager.APISessionID    Yes wCo0_


[string] KvjEUFROvfHF5KGrw

Response body for a Replicate task
{

"type":"{string}",
"name":"{string}",
"description":"{string}",
"state":"{enum task_state}",
"message": "{string}",
"source_endpoint":{
"name":"{string}",

API Guide - Qlik Enterprise Manager , November 2021 57


2   Enterprise Manager REST API

"type":"{string}"
},
"target_endpoint":{
"name":"{string}",
"type":"{string}"
},
"cdc_event_counters":{
"applied_insert_count":”{int64}”,
"applied_update_count":”{int64}”,
"applied_delete_count":”{int64}”,
"applied_ddl_count":”{int64}”
},
"full_load_counters":{
"tables_completed_count":”{int64}”,
"tables_loading_count":”{int64}”,
"tables_queued_count":”{int64}”,
"tables_with_error_count":”{int64}”,
"records_completed_count":”{int64}”,
"estimated_records_for_all_tables_count":”{int64}”
},
{
"full_load_completed":”{bool}”,
"full_load_start":"{string}",
"full_load_end":"{string}",
},{
"full_load_throughput":{
"source_throughput_records_count":"{int32}”,
"source_throughput_volume":"{int32}”,
"target_throughput_records_count":"{int32}”,
"target_throughput_volume":"{int32}”
},{
"cdc_throughput": {
"source_throughput_records_count": {
"current": “{int32}”
},
"source_throughput_volume": {
"current": “{int32}”
},
"target_throughput_records_count": {
"current": “{int32}”
},
"target_throughput_volume": {
"current": “{int32}”
}
},{
"cdc_transactions_counters":{

API Guide - Qlik Enterprise Manager , November 2021 58


2   Enterprise Manager REST API

"commit_change_records_count":"{int64”,
"rollback_transaction_count":"{int64}”,
"rollback_change_records_count":"{int64}”,
"rollback_change_volume_mb":"{int64}”,
"applied_transactions_in_progress_count":"{int64}”,
"applied_records_in_progress_count":"{int64}”,
"applied_comitted_transaction_count":"{int64}”,
"applied_records_comitted_count":"{int64}”,
"applied_volume_comitted_mb":"{int64}”,
"incoming_accumulated_changes_in_memory_count":"{int64}”,
"incoming_accumulated_changes_on_disk_count":"{int64}”,
"incoming_applying_changes_in_memory_count":"{int64}”,
"incoming_applying_changes_on_disk_count":"{int64}”,
},{
"cdc_latency":{
"source_latency":"{int32}",
"total_latency":"{int32}",
},{
"profile":"{string}",
"task_stop_reason":"{enum task_stop_reason}",
"memory_mb":{int64},
"cpu_percentage":"{int32}",
"disk_usage_mb":"{int64}",
"data_error_count":"{int64}",
"options":"full_load_enabled"":”{bool}”,"apply_changes_enabled":”
{bool}”,"store_changes_enabled":”{bool}”,"audit_changes_enabled":”{bool}”},
"log_stream_staging":"{string}",
"assigned_tags": ["string", "string", "string", …]
}

Response parameters for Replicate tasks
General parameters
Name Description

type  The task type: ReplicateTaskInfoDetailed

name The name of the task.

description The task description. If there is no description, an empty string will be returned.

State The current state of the task.

message The message returned if the task stopped due to error.

Source endpoint    parameters
Name Description

name The name of the source endpoint.

type The source endpoint type.

API Guide - Qlik Enterprise Manager , November 2021 59


2   Enterprise Manager REST API

Target endpoint parameters
Name Description

name The name of the target endpoint.

type The target endpoint type.

cdc_event_counters parameters
Name Description

applied_insert_count The number of records added in total for all tables.

applied_update_count The number of records updated in total for all tables.

applied_delete_count The number of records deleted in total for all tables.

applied_ddl_count The total number of metadata changes, such as add column.

full_load_counters parameters
Name Description

tables_completed_count The number of tables that have been loaded into the target 
endpoint.

tables_loading count The number of tables that are currently being loaded into the target 
endpoint.

tables_queued_count The number of tables that are waiting to be loaded due to an error.

tables_with_error_count The number of tables that could not be loaded due to an error.

records_completed_count The total number of records that have completed loading into the 
target endpoint.

estimated_records_for_all_ The estimated number of records remaining to be loaded into the 
tables_count target endpoint.

full_load_completed Indicates whether the full load process has ended.

full_load_start The start time of the full load process.

Format: YYY MM DD

Timezone: UTC

full_load_throughput indicates how fast the table records are being replicated to the target endpoint (by 
number or volume of records).

full_load_throughput parameters
Name Description

full_load_throughput Indicates how fast the table records are being replicated to the target endpoint 
(by number or volume of records).

API Guide - Qlik Enterprise Manager , November 2021 60


2   Enterprise Manager REST API

Name Description

source_throughput_ The current source throughput, in rec/sec.
records_count

source_throughput_ The current source throughput, in kbyte/sec.
volume

target_throughput_ The current target throughput, in rec/sec.
records_count

target_throughput_ The current target throughput, in kbyte/sec.
volume

cdc_throughput indicates how fast the table records are being replicated to the target endpoint (by number 
or volume of records). Refers only to the current/last CDC.

cdc_throughput parameters
Name Description

source_throughput_records_count The current source throughput, in rec/sec.

source_throughput_volume The current source throughput, in kbyte/sec.

target_throughput_records_count The current target throughput, in rec/sec.

target_throughput_volume The current target throughput, in kbyte/sec.

cdc_transaction_counters contains all numeric data concerning CDC transactions.

cdc_transaction_counters parameters
Name Description

commit_change_records_count The number of COMMIT change records.

rollback_tranaction_count The number of ROLLBACK transactions.

rollback_change_records_count The number of ROLLBACK change records.

rollback_change_volume_mb The volume of ROLLBACK change, in MB.

applied_transactions_in_progress_count The number of transactions in progress.

applied_records_in_progress_count The sum of all records/events in all In-Progress 
transactions.

applied_committed_transaction_count The number of transactions committed.

applied_records_committed_count The sum of all records/events in all Completed 
transactions.

applied_volume_committed_mb The sum of all volume/events in all Completed 
transactions, in MB.

API Guide - Qlik Enterprise Manager , November 2021 61


2   Enterprise Manager REST API

Name Description

incoming_accumulated_changes_in_ The number of changes accumulated in memory until 
memory_count source commit.

incoming_accumulated_changes_on_ The number of changes accumulated on disk until source 
disk_count commit.

incoming_applying_changes_in_memory_ The number of changes in memory during apply and until 
count target commit.

incoming_applying_changes_on_disk_ The number of changes on disk during apply and until 
count target commit

cdc_latency parameters
Name Description

source_latency The time gap between the original change in the source 
endpoint and capturing it, in hh:mm:ss.

total_latency The overall latency (source latency + target latency + apply 
latency), in hh:mm:ss.

profile See Profile Parameters.

task_stop_reason The reason the task stopped.

memory_mb The current utilization of memory, in MB. A task's memory 
utilization is sampled every 10 seconds. When the task is 
not running, the value is set to zero (0).

cpu_percentage The current CPU usage of the Replicate task process.

Only available for Replicate 
tasks  running on Replicate 
6.2 and above. When not 
available, this parameter will 
be returned  as -1.

disk_usage_mb The current utilization of disk space, in MB. A task's disk 
utilization is sampled every minute.

data_error_count The total number of data errors in all tables involved in the 
task. The count is affected by data errors and the Reset 
Data Errors option available when you drill down to a task.

full_load_enabled See Task Options.

apply_changes_enabled See Task Options.

API Guide - Qlik Enterprise Manager , November 2021 62


2   Enterprise Manager REST API

Name Description

store_changes_enabled See Task Options.

audit_changes_enabled See Task Options.

log_stream_staging If the task is writing to/reading from the Log Stream staging 
folder, the name of the associated Log Stream Staging task 
will be returned. Otherwise, an empty string will be 
returned.

assigned_tags Returns the custom tags assigned to the task. If no tags are 
assigned to the task, an empty array will be returned.

Response body for a Compose task
{
"$type": "{string}",
"project": "{string}",
"profile": "{string}",
"loading_completed": "{bool}",
"loading_start": "{string}",
"loading_end": "{string}",
"options": {
"full_load_enabled": "{bool}",
"apply_changes_enabled": "{bool}"
},
"loading_counters": {
"tables_total_count": "{int64}",
"tables_completed_count": "{int64}",
"tables_loading_count": "{int64}",
"tables_queued_count": "{int64}",
"tables_with_error_count": "{int64}",
"commands_total_count": "{int64}",
"commands_completed_count": "{int64}"
},
"name": "{string}",
"message": "{string}",
"state": "{enum task_state}",
"description": "{string}",
"source_endpoint": {
"name": "{string}",
"type": "{string}"
},
"target_endpoint": {
"name": "{string}"
"type": "{string}"
},

API Guide - Qlik Enterprise Manager , November 2021 63


2   Enterprise Manager REST API

"assigned_tags": ["string", "string", "string", …]


}

Response parameters for Compose tasks
General parameters
Name    Description   

type  One of the following:

 l AemComposeDWTaskInfoDetailed (for Data 
Warehouse tasks)
 l AemComposeDMTaskInfoDetailed (for Data Mart 
tasks)
 l AemComposeDLTaskInfoDetailed (for Data Lake 
tasks)

project The name of the Compose project.

profile See Profile Parameters.

name Enterprise Manager May 2021:

The name of the task.

From Enterprise Manager May 2021 SR1:   

The name of the task appended with a double underscore 
and the project name.

Example:  

mytask__myproject

description The task description. If there is no description, an empty 
string will be returned.

state The current task state.

message The message returned if the task stopped due to error.

options:

 l full_load_enabled - Indicates whether the Full Load option is enabled. Can be "true" or "false".

 l apply_changes_enabled - Indicates whether the Change Processing option is enabled. Can be 
"true" or "false".

API Guide - Qlik Enterprise Manager , November 2021 64


2   Enterprise Manager REST API

source_endpoint   parameters
Name    Description   

name The logical name of the landing database.

type The landing database type.

target_endpoint parameters
Name    Description   

name The logical name of the storage database.

type The storage database type.

loading_completed Indicates whether the loading process has completed. Can be "true" or "false"

loading_start The start time of the loading  process.

Format: YYY MM DD

Timezone: UTC

loading_end The end time of the loading  process.

Format: YYY MM DD

Timezone: UTC

loading_counters parameters
Name    Description   

tables_total_count The total number of tables.

tables_completed_ The number of tables that have been loaded into the target endpoint.
count

tables_loading  The number of tables that are currently being loaded into the target endpoint.
count

tables_queued_ The number of tables that are waiting to be loaded due to an error.
count

tables_with_error_ The number of tables that could not be loaded due to an error.
count

commands_total_ The total number of commands executed.
count

commands_ The total number of commands completed.
completed_count

assigned_tags Returns the custom tags assigned to the task. If no tags are assigned to the task, 
an empty array will be returned.

API Guide - Qlik Enterprise Manager , November 2021 65


2   Enterprise Manager REST API

cURL example for Replicate tasks
Request   
CURL.EXE -i -k --header "EnterpriseManager.APISessionID: {SessionID}" https://
{host}/attunityservices/api/v1/servers/
myrepsrv1/tasks/SalesDBBackup

Response 

For Compose tasks, from Enterprise Manager May 2021 SR1, the task"name" response will be 
in the following format: taskName__projectName.

Headers:

HTTP/1.1 200 OK

Cache-Control: no-cache, no-store

Content-Length: 1658

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

Server: Microsoft-HTTPAPI/2.0

Date: Mon, 26 Dec 2016 13:18:27 GMT

Payload
{

"name":"SalesDBBackup",

"description":"Backs up annual sales",

"state":"RUNNING",

"message":"NONE",

"source_endpoint":{

"name":"Customer Management",

"type":"Oracle",

},

"target_endpoint":{

"name":"Business Management",

"type":"Microsoft SQL Server",

},

"cdc_event_counters":

{"applied_insert_count":0,

API Guide - Qlik Enterprise Manager , November 2021 66


2   Enterprise Manager REST API

"applied_update_count":0,

"applied_delete_count":0,

"applied_ddl_count":0

},{

"full_load_counters":{

"tables_completed_count":3,

"tables_loading_count":0,

"tables_queued_count":0,

"tables_with_error_count":0,

"records_completed_count":177446,

"estimated_records_for_all_tables_count":177446,

"full_load_completed":true,

"full_load_start":"2016-12-18T02:23:30",

"full_load_end":"2016-12-18T02:23:35",

},{

"full_load_throughput":{

"source_throughput_records_count":0,

"source_throughput_volume":0,

"target_throughput_records_count":0,

"target_throughput_volume":0},

},{

"cdc_throughput":{

"source_throughput_records_count": {

"current": 0

},

"source_throughput_volume": {

"current": 0

},

"target_throughput_records_count": {

"current": 0

},

"target_throughput_volume": {

API Guide - Qlik Enterprise Manager , November 2021 67


2   Enterprise Manager REST API

"current": 0

},{

"cdc_transactions_counters":{

"commit_change_records_count":0,

"rollback_transaction_count":0,

"rollback_change_records_count":0,

"rollback_change_volume_mb":0,

"applied_transactions_in_progress_count":0,

"applied_records_in_progress_count":0,

"applied_comitted_transacion_count":0,

"applied_records_comitted_ count":0,

"applied_volume_comitted_mb":0,

"incoming_accumulated_changes_in_memory_count":0,

"incoming_accumulated_changes_on_disk_count":0,

"incoming_applying_changes_in_memory_count":0,

"incoming_applying_changes_on_disk_count":0},

},{

"cdc_latency":{

"source_latency":"00:00:00",

"total_latency":"00:00:00"},

},{

"profile":"UNIDIRECTIONAL",

"task_stop_reason":"NORMAL",

"memory_mb":57,

"cpu_percentage":30,

"disk_usage_mb":0,

"data_error_count":0,

"options":{"full_load_enabled":true,"apply_changes_enabled":true,"store_changes_
enabled":false,"audit_changes_enabled":false}

"log_stream_staging":"MyLogStreamTask",

"assigned_tags": ["MyTag1", "MyTag2", "MyTag3"]

API Guide - Qlik Enterprise Manager , November 2021 68


2   Enterprise Manager REST API

Error response
All of the general errors as well as the errors listed in the table below.

Error responses
HTTP  Qlik Enterprise 
Text Description
Code Manager Code

500 AEM_TASK_ Replicate task {task} on server  The task name is unknown to 


NOT_FOUND {server} could not be found. Enterprise Manager.

2.18   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 (page 251).

Request parameters
Request parameters
Location Name Required Description

URL host [string] Yes The host name of the Qlik 


Enterprise Manager server.

Example: computer.network.net

API Guide - Qlik Enterprise Manager , November 2021 69


2   Enterprise Manager REST API

Location Name Required Description

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 or letters included in the 
schema name will retrieve all tables 
from schemas that match the 
pattern or that include the specified 
letters. For example, specifying 
"ad" will retrieve tables from the 
"adventure" and "trademark" 
schemas.

URL TableName [string] No The default is all source tables. 


Specifying a specific table name 
will retrieve the specified table. 
Specifying a pattern or letters 
included in the table name will 
retrieve all tables that match the 
pattern or that include the specified 
letters. For example, specifying 
"em" will retrieve the "employees" 
and "temp" tables.

URL includequeued [boolean] No Whether to retrieve tables in a 


queued state. Default is false. 

URL includeloading [boolean] No Whether  to retrieve tables in a 


loading state. Default is false. 

URL includecompleted [boolean] No Whether  to retrieve tables in a 


completed state. Default is false. 

URL includechangeprocessing [boolean] No Whether  to retrieve tables in a 


Change Processing state (that is, 
tables that are having changes 
applied to them). Default is false. 

URL includeerror [boolean] No Whether  to retrieve tables in an 


error state. Default is false. 

Header EnterpriseManager.APISessionID  Yes wCo0_KvjEUFROvfHF5KGrw


[string]

API Guide - Qlik Enterprise Manager , November 2021 70


2   Enterprise Manager REST API

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

API Guide - Qlik Enterprise Manager , November 2021 71


2   Enterprise Manager REST API

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.

Error responses
HTTP  Enterprise 
Text Description
Code Manager Code

500 AEM_TABLE_ Failed to retrieve table list for replication task " Returned when the 


LIST_INNER_ {task}" on server "{server}". Error: "{message}"  table list cannot be 
ERR    retrieved.

500 AEM_TASK_ Replicate task {task} on server {server} could  The task name is 


NOT_FOUND not be found. unknown to Enterprise 
Manager.

API Guide - Qlik Enterprise Manager , November 2021 72


2   Enterprise Manager REST API

2.19   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 statuses of a specific Replicate task for all tables 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 (for example, suspended) and then perform an operation on them (for 
example, ReloadTable). 

Method   
GET

Required user role   
See Required Enterprise Manager permissions (page 251).

Request parameters
Request parameters
Location Name Required Description

URL host [string] Yes The host name of the Qlik 


Enterprise Manager server.

Example: computer.network.net

URL server [string] Yes The Replicate Server name as 


defined on Qlik Enterprise 
Manager.

Example: myrepsrv1

URL task [string] Yes The Replicate task name.

API Guide - Qlik Enterprise Manager , November 2021 73


2   Enterprise Manager REST API

Location Name Required Description

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 or letters included in the 
schema name will retrieve all tables 
from schemas that match the 
pattern or that include the specified 
letters. For example, specifying 
"ad" will retrieve tables from the 
"adventure" and "trademark" 
schemas.

URL table [string] No The default is all source tables. 


Specifying a specific table name 
will retrieve the specified table. 
Specifying a pattern or letters 
included in the table name will 
retrieve all tables that match the 
pattern or that include the specified 
letters. For example, specifying 
"em" will retrieve the "employees" 
and "temp" tables.

URL includequeued [boolean] No Whether to retrieve tables in a 


queued state. Default is false. 

URL includeloading [boolean] No Whether  to retrieve tables in a 


loading state. Default is false. 

URL includecompleted [boolean] No Whether  to retrieve tables in a 


completed state. Default is false. 

URL includechangeprocessing [boolean] No Whether  to retrieve tables in a 


Change Processing state (that is, 
tables that are having changes 
applied to them). Default is false. 

URL includeerror [boolean] No Whether  to retrieve tables in an 


error state. Default is false. 

Header EnterpriseManager.APISessionID  Yes wCo0_KvjEUFROvfHF5KGrw


[string]

Response body
{
"table_details":[

API Guide - Qlik Enterprise Manager , November 2021 74


2   Enterprise Manager REST API

{
"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 schema name. 
source  

table_on_source    Source table name. 

schema_on_ Target schema name. If this information not available, an empty string will be 
target    returned.

table_on_target    Target table name. If this information not available, an empty string will be returned.

state    An enum reflecting the table state.

See state (page 248).

API Guide - Qlik Enterprise Manager , November 2021 75


2   Enterprise Manager REST API

Name Description

data_errors_ The number of data errors encountered when replicating the table.
count   

table_full_load_ -
info 

start_time    Date-time of when the table full load started.   Timezone: UTC ; Style: ISO8601 
(consistent with GetTaskDetails). 

end_time    Date-time of when the table full load started.   Timezone: UTC ; Style: ISO8601 
(consistent with GetTaskDetails). 

estimated_row_ Relevant only if table in certain states (loading/queued).  
count   

estimated_end_ Relevant only if table in certain states (loading/queued).   Timezone: UTC ; Style: 
time    ISO8601 (consistent with GetTaskDetails). 

transferred_row_ The number of rows transferred to the target, after the source filtering, but before 
count    the target filtering. 

transferred_ The amount of bytes transferred to the target, after the source filtering, but before 
volume_mb    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.  T
  imezone: UTC ; Style: 
ISO8601 (consistent with GetTaskDetails). 

cached_insert_ INSERT operations that were cached during Full Load.
count   

cached_update_ UPDATE operations that were cached during Full Load.
count   

cached_delete_ DELETE operations that were cached during Full Load.
count   

End of table_ -
cdc_info

API Guide - Qlik Enterprise Manager , November 2021 76


2   Enterprise Manager REST API

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   
{
"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

API Guide - Qlik Enterprise Manager , November 2021 77


2   Enterprise Manager REST API

}
},
{
"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 as well as the errors listed in the table below.

Error responses
Qlik Enterprise 
HTTP Code Text Description
Manager Code

500 AEM_SERVER_ Replicate server {server} could not be  Server name 


NOT_FOUND found. unknown to Qlik 
Enterprise Manager.

500 AEM_TASK_ Replicate task {task} on server {server}  The task name is 


NOT_FOUND could not be found. unknown to 
Enterprise Manager.

API Guide - Qlik Enterprise Manager , November 2021 78


2   Enterprise Manager REST API

Qlik Enterprise 
HTTP Code Text Description
Manager Code

500 AEM_TABLE_ Failed to retrieve table statuses for  Returned when the 


STATUSES_ replication task "{task}" on server " table statuses cannot 
INNER_ERR    {server}". Error: "{message}"  be retrieved.

2.20   DeleteTask
General
URL
https[host]/attunityenterprisemanager/api/v1/servers/[server]/tasks/[task]?action=delete&deletetasklogs=
[deletetasklogs]

Description   
Deletes the specified task. The task's logs will be deleted only if deletetasklogs=true is specified in the 
URL. 

HTTP method   
POST

Required user role   
See Required Enterprise Manager permissions (page 251).

Request parameters
Request parameters
Location Name Required Example

URL host [string] Yes computer.network.net

URL ServerName [string] Yes myrepsrv1

URL TaskName [string] Yes SalesDBBackup

URL deletetasklogs [bool] Optional (default  deletetasklogs=true


is false)

Header EnterpriseManager.APISessionID  Yes wCo0_


[string] KvjEUFROvfHF5KGrw

Header Content-Length:  Yes "Content-Length: 0"

Note: The specified value 
must be "0".

API Guide - Qlik Enterprise Manager , November 2021 79


2   Enterprise Manager REST API

cURL example
Request   
curl -i -k -X POST --header "EnterpriseManager.APISessionID: wCo0_KvjEUFROvfHF5KGrw" --header
"Content-Length: 0"
https:// computer.network.net/attunityenterprisemanager/api/v1/
servers/myrepsrv1/tasks/ SalesDBBackup?action=delete&deletetasklogs=true

Response   
Header:

HTTP/1.1 200 OK

Cache-Control: no-cache, no-store

Content-Length: 38

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

Server: Microsoft-HTTPAPI/2.0

Date: Mon, 26 Dec 2016 16:31:01 GMT

Error response
Error responses
Enterprise 
HTTP 
Manager  Text Description
Code
Code

500 AEM_TASK_ Replication task {task] on server  Returned if the task name is unknown 


NOT_FOUND {server} could not be found.   to Qlik Enterprise Manager.

500 AEM_ Replication task {task] on server  Returned if Enterprise Manager 


DELETE_ {server} could not be deleted due  encounters an error/exception when 
TASK_ to an error. trying to delete the task.
INNER_ERR

500 AEM_ Replication task {task] on server  Returned if Enterprise Manager 


DELETE_ {server} could not be deleted due  encounters an error when trying to 
TASK_ERR to an error. {2} delete the task.

500 AEM_TASK_ Replication task {task] on server  Returned if the replication  task was 


NOT_ {server} must be stopped before it  running when DeleteTask attempted 
STOPPED can be deleted. to delete it.

API Guide - Qlik Enterprise Manager , November 2021 80


2   Enterprise Manager REST API

2.21   ExportTask
General
URL
https://{Host}/attunityenterprisemanager/api/v1/servers/{ServerName}/tasks/
{TaskName}?action=export&withendpoints={withendpoints}

Description   
Export definitions from the selected task on the selected server. The definitions always include task 
settings, tables/table patterns (include/exclude), table settings and global transformations. The endpoint 
definition is exported with the task definition. 

Supported only from Replicate 5.2 and later.

HTTP method   
GET

Required user role   
See Required Enterprise Manager permissions (page 251).

Request parameters
Request parameters
Location Name Required Example

URL Host [string] Yes computer.network.net

URL ServerName [string] Yes myrepsrv1

URL TaskName [string] Yes SalesDBBackup

URL withendpoints [bool] No true/false

Header EnterpriseManager.APISessionID [string] Yes wCo0_KvjEUFROvfHF5KGrw

Response
JSON File (stream)

cURL example
Request   
CURL.EXE -i -k --header "EnterpriseManager.APISessionID: wCo0_KvjEUFROvfHF5KGrw"
https://computer.network.net/attunityenterprisemanager/api/v1/servers/
myrepsrv1/tasks/SalesDBBackup?action=export

Response   
JSON file (stream)

API Guide - Qlik Enterprise Manager , November 2021 81


2   Enterprise Manager REST API

Error response
Error responses
HTTP  Enterprise 
Text Description
Code Manager Code

500 - ExportTask is only supported on  -
Replicate 5.2 or above.

500 AEM_EXPORT_ Failed to export task {task} from  Export all cannot be carried 


TASK_NO_ Replicate server {server} as the logged in  out because the user does 
PERMISSION_ user does not have permission to access  not have permissions on 
ON_ENDPOINT one or both of the task's endpoints. one or more endpoints.

2.22   ImportTask
General
URL
https://{Host}/attunityenterprisemanager/api/v1/servers/{ServerName}/tasks/{task}?action=import

Description   
Import a single task's JSON definitions provided in the request body into the requested server repository on 
the selected server.

The ImportTask method enables importing all valid JSON definitions provided in the request body. This 
includes task settings, tables/table patterns (include/exclude), table settings and global transformations. 
Information about endpoints is included if it was included in the JSON file.

When you import a task, Items that existed in the target server before the import and have no new JSON 
definition in the request body are not modified and not removed. This means that  ImportTask provides no 
way of removing old definitions that are no longer needed.

Supported only with Replicate 5.2 and later.

HTTP method   
POST

Required user role   
See Required Enterprise Manager permissions (page 251).

Request parameters
Request parameters
Location Name Required Example

URL Host [string] Yes computer.network.net

API Guide - Qlik Enterprise Manager , November 2021 82


2   Enterprise Manager REST API

Location Name Required Example

URL ServerName [string] Yes myrepsrv1

URL TaskName [string] Yes SalesDBBackup

URL overridetask [bool] Yes true/false

Header EnterpriseManager.APISessionID [string] Yes wCo0_


KvjEUFROvfHF5KGrw

Header Content-Length:  Yes "Content-Length: 3986"

This is the number of bytes in the content 
body.

Note that the number of bytes that you specify 
must be exactly the same as the number of 
bytes in the JSON file. This number can be 
ascertained by copy-pasting the text into a text 
editor such as Notepad ++ (which shows the 
number of bytes as "Length" at the bottom of 
its console).

Body A JSON document to import [stream] Yes localServer1.json

Response
JSON File

cURL example
cURL Example

CURL.EXE -i -k -X POST --header "EnterpriseManager.APISessionID: wCo0_KvjEUFROvfHF5KGrw " --


header "Content-Length: 3986" --header "Content-Type: application/json" "
https://computer.network.net/attunityenterprisemanager/api/v1/servers/
myrepsrv1/tasks/SalesDBBackup?action=import" -T "C:\exports\ SalesDBBackup.json"

Response

HTTP/1.1 100 Continue

HTTP/1.1 200 OK

Cache-Control: no-cache, no-store

Content-Length: 0

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

Server: Microsoft-HTTPAPI/2.0

Date: Tue, 28 Feb 2017 17:45:41 GMT

API Guide - Qlik Enterprise Manager , November 2021 83


2   Enterprise Manager REST API

Error response
Error responses
HTTP  Enterprise 
Text Description
Code Manager Code

500 AEM_IMPORT_ Failed to import task {task} to  The task cannot be imported 


TASK_NO_ replication server {server} as the  because it includes endpoint 
PERMISSION_ logged in user does not have  definitions, and the user does not 
ON_ENDPOINT permission to add or modify  have permissions to insert 
endpoints. endpoints.

500 AEM_IMPORT_ Failed to import task {task} to  The task cannot be imported 


TASK_ replication server {server} as the  because the stream contains 
CONTAIN_ JSON file contains unsupported  items that cannot be imported 
ALIEN_ITEMS objects. (such as remote machines).

500 AEM_IMPORT_ Failed to import task {task} to  The task cannot be imported 


TASK_NAME_ replication server {server} as the  because the stream contains 
DIFFER JSON file  contains conflicting  conflicting tasks.
tasks.

500 AEM_IMPORT_ Failed to import task to replication  The task cannot be imported 


TASK_ server {server} as the JSON file   since the stream contains 
CONTAINS_ contains multiple tasks. To import  multiple tasks, and the method 
MULTIPLE_ multiple tasks, use ImportAll  can only import a single task.
TASKS instead.

500 AEM_TASK_ Failed to import task {task} as the  Occurs when trying to import a 


NOT_ task is running on server {server}.  running task.
IMPORTABLE Stop the task and then try again.

500 AEM_IMPORT_ Failed to import task {task} to  The task cannot be imported as 


TASK_ replication server {server} as the  the specified JSON file is empty.
CONTENT_ JSON file is empty.
EMPTY

500 AEM_IMPORT_ Failed to import task {task} to  The task cannot be imported as 


TASK_ server {server} as the endpoint  the endpoint names in the 
ENDPOINT_ names in the JSON file’s “task” and  specified JSON file's “task” and 
DIFFER “databases” sections are not the  “databases” sections are 
same. different.

500 AEM_IMPORT_ Failed to import task {task} to  The task cannot be imported as 


TASK_NO_ replication server {server} as the  one of the endpoints specified in 
ENDPOINT_IN_ {role} endpoint {endpoint} does not  the exported JSON file does not 
SERVER exist on the target server. exist on the target server.

500 AEM_IMPORT_ Replicate (server '{0}') import  The task cannot be imported 


TASK_CANNOT_ unable to delete task. Error  since the task that it was 
OVERRIDE_ message '{2} supposed to override cannot be 
TASK deleted.

API Guide - Qlik Enterprise Manager , November 2021 84


2   Enterprise Manager REST API

2.23   ExportAuditTrail
General
URL
https://{Host}/attunityenterprisemanager/api/v1/security/audit_trail

Description   
Export  audit trail data from all servers. 

Supported only from Replicate November 2020.

HTTP method   
GET

Required user role   
See Required Enterprise Manager permissions (page 251).

Request parameters
Request parameters
Location Name Required Example

URL Host [string] Yes computer.network.net

URL start_timestamp  Yes 2020-06-30T16:15:00Z (UTC format)

[UTC format or Ticks] 637410358250082194 (Ticks)

URL end_timestamp  No 2020-06-30T16:15:00Z (UTC format)

[UTC format or Ticks] 637410358250082194 (Ticks)

Default : latest audit trail record

Response
JSON File (stream)

cURL example
Request   
CURL.EXE -i -k --header "EnterpriseManager.APISessionID: wCo0_KvjEUFROvfHF5KGrw"
https://computer.network.net/attunityenterprisemanager/api/v1/security/audit_trail?start_
timestamp={start_timestamp}&end_timestamp={end_timestamp}

Response   
JSON file (stream)

API Guide - Qlik Enterprise Manager , November 2021 85


2   Enterprise Manager REST API

Error response
Error responses
HTTP Error Message Description

500 AEM_INVALID_ Timestamp is not a timestamp. Timestamp is not valid.


TIMESTAMP_
Timestamp format should be 
FORMAT
'yyyy'-'MM'-'dd'T'HH':'mm':'ss'Z 
or Ticks.

500 AEM_EXPORT_ Failed to export audit trail. Time range is not valid.


INNER_ERR
AUDIT-E-INVRANGE. The end 
time is before the start time.

401 UNAUTHORIZED_ Unauthorized Request. request:  User does not have 


REQUEST AemExportAuditTrail  permission to access the audit 
trail information.

2.24   StopTask
General
URL
https://{host}/attunityenterprisemanager/api/v1/servers/{ServerName}/tasks/
{TaskName}?action=stop&timeout={timeout}

Description   
Stop the selected task.

HTTP method   
POST

Required user role   
See Required Enterprise Manager permissions (page 251).

Request parameters
Request parameters
Location Name Required Description/Example

URL host [string] Yes computer.network.net

URL ServerName [string] Yes myrepsrv1

API Guide - Qlik Enterprise Manager , November 2021 86


2   Enterprise Manager REST API

Location Name Required Description/Example

URL TaskName [string] Yes  l Replicate: - The name of 


the task.
 l Compose: - The name of 
the task or workflow 
appended with a double 
underscore and the project 
name.

Example:  

mytask__myproject

URL Timeout [int32] Optional  60 (seconds)


(default is 
60 
seconds)

Header EnterpriseManager.APISessionID  Yes wCo0_KvjEUFROvfHF5KGrw


[string]

Header Content-Length Yes Content-Length: 0

Note that the Content-Length value 
must be "0".

Response body
{

"state":"{enum task_state}",

"error_message":""

Response parameters
Response parameters
Name Description

state [enum task_state] The current state of the task.

error_message The description of the error.

cURL example
Request   
curl -i -k -X POST --header "EnterpriseManager.APISessionID: wCo0_KvjEUFROvfHF5KGrw" --header
"Content-Length: 0" https:// computer.network.net/attunityenterprisemanager/api/
v1/servers/myrepsrv1/tasks/SalesDBBackup/

API Guide - Qlik Enterprise Manager , November 2021 87


2   Enterprise Manager REST API

?action=stop

Response   
Header:

HTTP/1.1 200 OK

Cache-Control: no-cache, no-store

Content-Length: 38

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

Server: Microsoft-HTTPAPI/2.0

Date: Mon, 26 Dec 2016 16:31:01 GMT

Payload
{

"state":"STOPPED",

"error_message":""

Error response
Error responses
HTTP  Enterprise 
Text Description
Code Manager Code

500 AEM_TASK_ Replicate task {task} on server {server}  Cannot stop a task that is 


ALREADY_ is already stopped. in Stopped state.
STOPPED

500 AEM_STOP_ Failed to stop Replicate task {0} on  An error occurred while 


TASK_INNER_ERR server {1}: <{2}> trying to stop the task.

500 AEM_STOP_ A timeout occurred when trying to stop  A timeout occurred while 


TASK_TIMEOUT Replicate task {0} on server {1} trying to stop the task.

2.25   RunTask
General
Replicate URL   
https://{host}/attunityenterprisemanager/api/v1/servers/{ServerName}/tasks/
{TaskName}?action=run&option={option}&timeout={timeout}

API Guide - Qlik Enterprise Manager , November 2021 88


2   Enterprise Manager REST API

Compose URL   
https://{host}/attunityenterprisemanager/api/v1/servers/{ServerName}/tasks/
{TaskName}?action=run&timeout={timeout}

Description   
Run the selected task according to the specified option.

HTTP method   
POST

Required user role   
See Required Enterprise Manager permissions (page 251).

Request parameters
Request parameters
Location Name Required Description/Example

URL host [string] Yes computer.network.net

URL ServerName [string] Yes myrepsrv1

URL TaskName [string] Yes  l Replicate: - The 


name of the task.
 l Compose: - The 
name of the task 
or workflow 
appended with a 
double 
underscore and 
the project name.

Example:  

mytask__
myproject

URL option [enum run_options] This is required for  RELOAD_TARGET


Replicate tasks, but is 
not relevant for 
Compose tasks.

URL Timeout [int32] Optional (default is  60 (seconds)


60 seconds)

Header EnterpriseManager.APISessionID  Yes wCo0_


[string] KvjEUFROvfHF5KGrw

API Guide - Qlik Enterprise Manager , November 2021 89


2   Enterprise Manager REST API

Location Name Required Description/Example

Header Content-Type: [Type] Yes if the run option =  "Content-Type: 


RESUME_ application/json"
PROCESSING_
 
FROM_TIMESTAMP 
or RECOVER_ You can either specify 
USING_ the Content-Type 
CHECKPOINT_ payload inline or by 
STORED_ON_ referencing a JSON file. 
TARGET The payload format 
differs slightly according 
to whether it is specified 
inline or by referencing a 
JSON file. 

For more information, 
see Body below.

Header Content-Length:  Yes if the option =  "Content-Length: 37"


RESUME_
This is the number of bytes in the   
PROCESSING_
content body.
FROM_TIMESTAMP  For example commands, 
Note that the number of bytes that  or RECOVER_ see Resume processing 
you specify must be exactly the  USING_ from timestamp cURL 
same as the number of bytes in the  CHECKPOINT_ examples  for Replicate 
JSON file. This number can be  STORED_ON_ tasks (page 92).
ascertained by copy-pasting the text  TARGET
into a text editor such as Notepad ++ 
(which shows the number of bytes as 
"Length" at the bottom of its 
console).

Body cdcposition  Yes  The cdcposition 


parameter can either be 
specified inline or in an 
external JSON file. The 
format for both is 
described in Request 
body format (page 90) 
below.

Request body format
If the task option is RESUME_PROCESSING_FROM_TIMESTAMP, then the format should be:

API Guide - Qlik Enterprise Manager , November 2021 90


2   Enterprise Manager REST API

JSON File Format:

{"cdcposition":"timestamp"}

Example:  

{"cdcposition":"2017-03-07T11:19:03"}

Inline Format:

"{\"cdcposition\":\"timestamp\"}"

Example:  

"{\"cdcposition\":\"2017-03-07T11:19:03\"}"

For example commands, see cURL Resume Processing from Timestamp Examples.

If the task option is RECOVER_USING_CHECKPOINT_STORED_ON_TARGET, then the format  should 
be:

JSON File Format:

{"cdcposition":"target_checkpoint"}

Example:  

{"cdcposition":"Checkpoint:V1#1#timestamp:2017-02-14T12:34:44#0#0#*#0#0"}

Inline Format:

"{\"cdcposition\":\"target_checkpoint\"}"

Example:  

"{\"cdcposition\":\"Checkpoint:V1#1#timestamp:2017-02-14T12:34:44#0#0#*#0#0\"}"

Response body
{

"state":"{enum task_state}",

"error_message":""

API Guide - Qlik Enterprise Manager , November 2021 91


2   Enterprise Manager REST API

Response parameters
Response parameters
Name Description

state {enum task_state] The current state of the task.

error_message The description of the error.

Reload target cURL example for Replicate tasks
cURL   
curl -i -k -X POST --header "EnterpriseManager.APISessionID: wCo0_KvjEUFROvfHF5KGrw" --header
"Content-Length: 0" https://
computer.network.net/attunityenterprisemanager/api/
v1/servers/myrepsrv1/tasks/SalesDBBackup?action=run&option=RELOAD_TARGET

Response   
Headers:

HTTP/1.1 200 OK

Cache-Control: no-cache, no-store

Content-Length: 38

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

Server: Microsoft-HTTPAPI/2.0

Date: Mon, 26 Dec 2016 16:28:25 GMT

Payload   
{

"state":"RUNNING",

"error_message":""

Resume processing from timestamp cURL examples  for Replicate 
tasks
cURL - When the payload content is in a JSON file
curl -i -k -X POST --header "EnterpriseManager.APISessionID: wCo0_KvjEUFROvfHF5KGrw" --header
"Content-Type: application/json" -T @"C:\exports\run.json" --header "Content-Length: 37"
https://
computer.network.net/attunityenterprisemanager/api/
v1/servers/rep2008r2gs7.qa.int/tasks/SalesDBBackup?action=run&option=RESUME_PROCESSING_FROM_
TIMESTAMP"

API Guide - Qlik Enterprise Manager , November 2021 92


2   Enterprise Manager REST API

cURL - When the payload content  is inline
curl -i -k -X POST --header "EnterpriseManager.APISessionID: wCo0_KvjEUFROvfHF5KGrw" --header
"Content-Length: 0" -d "{\"cdcposition\":\"2017-03-07T11:19:03\"} "https://
computer.network.net/attunityenterprisemanager/api/
v1/servers/rep2008r2gs7.qa.int/tasks/SalesDBBackup?action=run&option=RESUME_PROCESSING_FROM_
TIMESTAMP

Response
Headers:
HTTP/1.1 200 OK
Cache-Control: no-cache, no-store
Content-Length: 38
Content-Type: application/json; charset=utf-8
Server: Microsoft-HTTPAPI/2.0
Date: Tue, 07 Mar 2017 16:57:27 GMT

Payload
{"state":"RUNNING","error_message":""}
{"error_code":"INVALID_SESSION_ID","error_message":"Session expired or invalid"}

Error response
Error responses
HTTP  Enterprise 
Text Description
Code Manager Code

500 AEM_TASK_ Replicate task {task} on server  The task cannot be run because 


ALREADY_ {server} is already running. it is already running.
RUNNING

500 AEM_TASK_IN_ Replicate task {task} on server  The task cannot be run because 


RECOVERY {server} cannot be run as it is in a  it is in Recovery state.
recovery state.

500 AEM_WRONG_ Replicate task {task] on server  When the option Tables are 


OPTION_FOR_ {server} cannot be run with  already loaded. Start 
CDCPOSITION cdcposition {position} and option  processing changes from 
{option}. Change the option to  Timestamp is selected in the 
RESUME_PROCESSING_ Advanced Run Options dialog 
FROM_TIMESTAMP or  box for a task, the option sent to 
RECOVER_USING_ the API must be RESUME_
CHECKPOINT_STORED_ON_ PROCESSING_FROM_TIMESTAMP.
TARGET.

500 AEM_CDC_ The cdcposition parameter value  The cdcPosition parameter must 


POSITION_ERR_ for Replicate task {task} on server  follow this format: YYYY-MM-
FORMAT {server} is not in the correct format  DDThh:mm:ssZ
('YYYY-MM-DDThh:mm:ssZ').
Parameters: task name and 
server name.

API Guide - Qlik Enterprise Manager , November 2021 93


2   Enterprise Manager REST API

HTTP  Enterprise 
Text Description
Code Manager Code

500 AEM_RUN_ Replicate task {task} on server  The task does not assume a 


TASK_TIMEOUT {server} timed out when requested  Running state or any other 
to “Run”. steady state (error o stopped).

500 AEM_RUN_ Replicate task {task} on server  Replicate experienced an 


TASK_INNER_ {server} encountered an error  error/exception when trying to 
ERR when requested to run. run the task.

500 AEM_RUN_ Replicate task {task} on server  Task validation revealed that the 


TASK_NO_SRC_ {server} has no source or target  task is missing a source and a 
NO_TRG endpoints. target.

500 AEM_RUN_ Replicate task {task} on server  Task validation revealed that the 


TASK_NO_SRC {server} has no source endpoint. task is missing a source.

500 AEM_RUN_ Replicate task {task} on server  Task validation revealed that the 


TASK_TRG {server} has no target endpoint. task is missing a target.

500 AEM_RUN_ Replicate task {task} on server  Task validation of a unidirectional 


TASK_NOT_FL_ {server} cannot be run without at  task revealed that the replication 
NOR_CDC least one of the replication options  option definition for the task is 
enabled (Full Load, Apply  missing (Full Load, Apply 
Changes, or Store Changes). Changes, or Store Changes).

500 AEM_RUN_BIDI_ Replicate task {task} on server  Task validation of a unidirectional 


TASK_NO_FL_ {server} cannot be run without at  task revealed that the replication 
NOR_CDC least one of the replication options  option definition for the task is 
enabled (Full Load or Apply  missing (Full Load, Apply 
Changes). Changes, or Store Changes).

2.26   GetEndpointList
General
URL
https://[host]/attunityenterprisemanager/api/v1/servers/[server]/endpoints  

Description

Retrieves a list of endpoints and their properties for the specified server.

Method   
GET

Required user role   
See Required Enterprise Manager permissions (page 251).

API Guide - Qlik Enterprise Manager , November 2021 94


2   Enterprise Manager REST API

Request parameters
Request parameters
Location Name Required Example

URL host [string] Yes computer.network.net

URL ServerName [string] Yes myrepsrv1

Header EnterpriseManager.APISessionID [string] Yes wCo0_KvjEUFROvfHF5KGrw

Response body
{

"endpointList": [{

"name": "{string}",

"description": "{string}",

"role": "{enum endpoint_role}",

"type": "{string}",

"is_licensed": "{bool}"

},...

Response parameters
Response parameters
Name Description

name The endpoint name.

description The endpoint description.

role The endpoint role: SOURCE or TARGET

type The endpoint type - for example, Oracle.

is_licensed Indicates whether the endpoint is licensed on this server.

cURL example
Request   
curl -i -k --header "EnterpriseManager.APISessionID: wCo0_KvjEUFROvfHF5KGrw"
https://computer.network.net/attunityenterprisemanager/
api/v1/servers/myrepsrv1/endpoints

Response   
Headers:

API Guide - Qlik Enterprise Manager , November 2021 95


2   Enterprise Manager REST API

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   
{

"endpointList": [{

"name": "Shopping",

"description": "Customers and purchases",

"role": "SOURCE"

"type": "ORACLE"

"is_licensed": true

}, {

"name": "Management",

"description": "Managers and Employees",

"role": "SOURCE"

"type": "ORACLE"

"is_licensed": true

}, {

"name": "Business Management",

"description": "Shopping + Management",

"role": "TARGET"

"type": "HADOOP"

"is_licensed": true

API Guide - Qlik Enterprise Manager , November 2021 96


2   Enterprise Manager REST API

Error response
Error responses
HTTP  Enterprise 
Text Description
Code Manager Code

500 AEM_ Failed to retrieve endpoints  Replicate experienced an 


ENDPOINT_ list from Replicate server  error/exception when trying to retrieve 
LIST_INNER_ {name}. the endpoint list.
ERR

403 See Error  - -
handling (page 
17).

440 See Error  - -
handling (page 
17).

2.27   DeleteEndpoint
General
URL
https://[host]/attunityenterprisemanager/api/v1/servers/[server]/endpoints/[endpoint]?action=delete

Description   
Deletes the specified endpoint. Note than an endpoint can only be deleted if it is not in use by any task.

HTTP method   
DELETE

Required user role   
See Required Enterprise Manager permissions (page 251).

Request parameters
Request parameters
Location Name Required Example

URL host [string] Yes computer.network.net

URL ServerName [string] Yes myrepsrv1

URL EndpointName [string]  Yes Shopping

Header EnterpriseManager.APISessionID  Yes wCo0_KvjEUFROvfHF5KGrw


[string]

API Guide - Qlik Enterprise Manager , November 2021 97


2   Enterprise Manager REST API

Location Name Required Example

Header Content-Length Yes Content-Length: 0

Note that the Content-Length value 
must be "0".

cURL example
Request   
curl -i -k -X POST --header "EnterpriseManager.APISessionID: wCo0_KvjEUFROvfHF5KGrw" --header
"Content-Length: 0"

https://computer.network.net/attunityenterprisemanager/api/v1/

servers/myrepsrv1/endpoints/Shopping?action=delete

Response   
Header:
HTTP/1.1 200 OK
Cache-Control: no-cache, no-store
Content-Length: 38
Content-Type: application/json; charset=utf-8
Server: Microsoft-HTTPAPI/2.0
Date: Mon, 26 Dec 2016 16:31:01 GMT

Error response
Error responses
HTTP  Enterprise 
Text Description
Code Manager Code

500 AEM_ Replicate endpoint {endpoint} on  Endpoint name unknown to Qlik 


ENDPOINT_ server {server} could not be found. Enterprise Manager.
NOT_FOUND

500 AEM_ Failed to delete Replicate endpoint  Replicate encountered an 


DELETE_ {endpoint} from server {server}. error/exception when trying to 
ENDPOINT_ delete the endpoint.
INNER_ERR

500 AEM_ Replicate endpoint {endpoint} on  The Replicate endpoint must be 


ENDPOINT_ server {server} cannot be deleted as it  removed from its associated 
IS_IN_USE is currently in use by one or more tasks. tasks before it can be deleted.

403 See Error  - -
handling (page 
17).

API Guide - Qlik Enterprise Manager , November 2021 98


2   Enterprise Manager REST API

HTTP  Enterprise 
Text Description
Code Manager Code

440 See Error  - -
handling (page 
17).

2.28   ReconfigureEndpointNoWait 
 l Supported with the Oracle source endpoint only.
 l Using this method, requires you to set up relevant Qlik Replicate task(s) with three 
separate source endpoints - two inactive source endpoints defined with the primary and 
secondary database connection settings, and one active source endpoint (initially 
defined with the primary database connection settings). 
For detailed instructions, see Reconfiguring endpoints (page 249).

General
URL
https://[host]/attunityenterprisemanager/api/v1/servers/{server}/endpoints/
{endpoint}/?action=reconfigure&configuration={configuration}&recycle={true|false}  

Description   
Call this method to override the source endpoint settings with settings from another endpoint of the same 
type. This method also supports automatically stopping and then resuming all tasks that are using the 
source endpoint (which is required for unplanned switchovers).

HTTP method   
PUT

Required user role   
See Required Enterprise Manager permissions (page 251).

API Guide - Qlik Enterprise Manager , November 2021 99


2   Enterprise Manager REST API

Request parameters
Request parameters
Location Name Required Description Example

URL Host [string] Yes The host name  computer.network.net


of the 
computer on 
which the 
Replicate 
Server is 
running.

URL ServerName [string] Yes The name of  myrepsrv1


the Replicate 
server (as 
defined in Qlik 
Enterprise 
Manager) on 
which the task
(s) are 
running.

URL EndpointName [string] Yes The name of  MyOracle


the source 
endpoint 
defined for the 
Replicate task
(s).

URL ConfigurationName [string] Yes The name of  SecondaryOracle


the secondary 
endpoint (or 
the primary 
endpoint when 
reverting the 
settings).

API Guide - Qlik Enterprise Manager , November 2021 100


2   Enterprise Manager REST API

Location Name Required Description Example

URL Recycle [bool] Optional  Whether to  true


(default is  stop and 
true) resume the 
Replicate task
(s) 
automatically. 
The default is 
"true", that is, 
when an 
unanticipated 
switchover 
occurs, tasks 
using the 
source 
endpoint will 
be 
automatically 
stopped and 
then resumed 
after the 
source 
endpoint is 
updated with 
the settings 
from the 
secondary 
endpoint.

Set to "false" 
for planned 
switchovers 
(such as 
migrating to a 
production 
database or 
switching back 
to the primary 
database).

Header EnterpriseManager.APISessionI Yes - wCo0_


D [string]
KvjEUFROvfHF5KGrw

API Guide - Qlik Enterprise Manager , November 2021 101


2   Enterprise Manager REST API

cURL example
CURL.EXE -i -k -X PUT --header "Content-Length:0" --header "EnterpriseManager.APISessionID:
wCo0_KvjEUFROvfHF5KGrw"
"https://computer.network.net/attunityenterprisemanager/api/v1/servers/myrepsrv1/endpoints/MyO
racle?action=reconfigure&configuration=SecondaryOracle&recycle=true"

Response
HTTP/1.1 200 OK

Cache-Control: no-cache, no-store

Content-Length: 0

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

Server: Microsoft-HTTPAPI/2.0

Application-Status: 200

Application-Message: OK

Date: Sun, 19 Feb 2019 16:42:11 GMT

Error response
All of the general errors as well as the errors listed in the table below.

Error responses
HTTP  Enterprise 
Text Description
Code Manager Code

500 AEM_ENDPOINT_ Replicate endpoint " The specified endpoint could not be 


NOT_FOUND {endpoint}" on server " found.
{server}" could not be found.

500 AEM_ Failed to reconfigure endpoint  Qlik Enterprise Manager failed to 


RECONFIGURE_ "{endpoint}" on server " reconfigure the endpoint with the 
ENDPOINT_ {server}". Error: "{message}" settings of the failover endpoint.
INNER_ERR

2.29   ExportAll
General
URL
https://{host}/attunityenterprisemanager/api/v1/servers/{ServerName}?action=export

Description   
Export all definitions from the requested server repository on the selected server (server settings, tasks, 
endpoints, and so on). The definitions are exported to a JSON file.

API Guide - Qlik Enterprise Manager , November 2021 102


2   Enterprise Manager REST API

Supported only with Replicate 5.2 and later.

HTTP method   
GET

Required user role   
See Required Enterprise Manager permissions (page 251).

Request parameters
Request parameters
Location URL Param Name Required Example

URL Host [string] Yes computer.network.net

URL ServerName [string] Yes myrepsrv1

Header EnterpriseManager.APISessionID [string] Yes wCo0_KvjEUFROvfHF5KGrw

Response
JSON File 

cURL example
Request   
CURL.EXE -i -k --header "EnterpriseManager.APISessionID: wCo0_KvjEUFROvfHF5KGrw"  
https://computer.network.net/attunityenterprisemanager/api/v1/servers/ myrepsrv1?action=export

Response   
JSON file (stream)

Error response
Error responses
HTTP  Enterprise 
Text Description
Code Manager Code

500 AEM_METHOD_ ExportAll is only supported on Replicate  The method requires 


NOT_ 5.2 or above. Replicate 5.2 or above.
SUPPORTED_
VERSION

500 AEM_EXPORT_ Failed to export all tasks from Replicate  Export all cannot be carried 


NO_ server {server} as the logged in user  out because the user does 
PERMISSION_ does not have permission to export one  not have permissions on 
ON_TASK or more of the defined tasks. one or more tasks.

API Guide - Qlik Enterprise Manager , November 2021 103


2   Enterprise Manager REST API

HTTP  Enterprise 
Text Description
Code Manager Code

500 AEM_EXPORT_ Failed to export all tasks from server  Export all cannot be carried 


NO_ {server} as the logged in user does not  out because the user does 
PERMISSION_ have permission to export one or more  not have permissions on 
ON_ENDPOINT of the defined endpoints. one or more endpoints.

2.30   ImportAll
General
URL
https://{Host}/attunityenterprisemanager/api/v1/servers/{ServerName}?action=import

Description   
Import the JSON definitions provided in the request body into the requested server repository on the 
selected server.

Supported only with replicate 5.2 and later.

The ApiImportAll method uses "merge" semantics. In particular:

 l All valid JSON definitions provided in the request body will be imported. This includes server 
settings, task settings, endpoints, and other definitions.
 l Items that existed in the target server before the import and have no new JSON definition in the 
request body will not be modified and in particular will not be removed. This means that ApiImportAll 
provides no way of removing old definitions that are no longer needed.

HTTP method   
POST

Required user role   
See Required Enterprise Manager permissions (page 251).

Request parameters
Request parameters
Location Name Required Example

URL Host [string] Yes computer.network.net

URL ServerName [string] Yes myrepsrv1

Header EnterpriseManager.APISessionID [string] Yes wCo0_


KvjEUFROvfHF5KGrw

API Guide - Qlik Enterprise Manager , November 2021 104


2   Enterprise Manager REST API

Location Name Required Example

Header Content-Length:  Yes  "Content-Length: 


110952"
This is the number of bytes in the content 
body.  

Note that the number of bytes that you specify   
must be exactly the same as the number of 
bytes in the JSON file. This number can be 
ascertained by copy-pasting the text into a text 
editor such as Notepad ++ (which shows the 
number of bytes as "Length" at the bottom of 
its console).

Body A JSON document to import [stream] Yes localServer1.json

Response
JSON File (stream)

cURL example
Request
CURL.EXE -i -k -X POST --header "EnterpriseManager.APISessionID: wCo0_KvjEUFROvfHF5KGrw" --
header "Content-Length: 110952" --header "Content-Type: application/json" " 
https://computer.network.net/attunityenterprisemanager/api/v1/servers/ myrepsrv1?action=import" -T 
"C:\exports\localServer1.json"

Response   
HTTP/1.1 100 Continue

HTTP/1.1 200 OK

Cache-Control: no-cache, no-store

Content-Length: 0

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

Server: Microsoft-HTTPAPI/2.0

Date: Tue, 28 Feb 2017 19:05:12 GMT

API Guide - Qlik Enterprise Manager , November 2021 105


2   Enterprise Manager REST API

Error response
Error responses
HTTP  Enterprise 
Text Description
Code Manager Code

500 AEM_METHOD_ ImportAll is only supported on  The method requires 


NOT_ Replicate 5.2 or above. Replicate 5.2 or above.
SUPPORTED_
VERSION

500 AEM_IMPORT_ Failed to import all tasks to replication  Stream cannot be imported 


NO_ server {server} as the logged in user  because the user does not 
PERMISSION_ does not have permission to add  have the permissions to add 
ON_TASK tasks. tasks.

500 AEM_IMPORT_ Failed to import all tasks to replication  Stream cannot be imported 


NO_ server {server} as the logged in user  because the user does not 
PERMISSION_ does not have permission to add  have the permissions to add 
ON_ENDPOINT endpoints. endpoints

500 AEM_IMPORT_ Failed to import all tasks to replication  Stream cannot be imported 


CONTENT_ server {server} as the JSON file is  because it contains no 
EMPTY empty. content.

500 AEM_IMPORT_ Failed to import all tasks to replication  Stream cannot be imported 


INVALID_ server {server} as the JSON file   because it contains invalid 
CONTENT contains invalid content. content.

2.31   ReloadTable
General
URL
https://{host}/attunityenterprisemanager/api/v1/servers/{server}/tasks/
{task}/tables?action=reload&schema={schema}&table={table}

Description   
Reload a specific table.

HTTP method   
POST

Required user role   
See Required Enterprise Manager permissions (page 251).

API Guide - Qlik Enterprise Manager , November 2021 106


2   Enterprise Manager REST API

Request parameters
Request parameters
Location Name Required Example

URL Host [string] Yes computer.network.net

URL ServerName [string] Yes myrepsrv1

URL TaskName [string] Yes SalesDBBackup

URL Schema [string] Yes dbo

URL Table [string] Yes employeelist

Header EnterpriseManager.APISessionID  Yes wCo0_KvjEUFROvfHF5KGrw


[string]

Header  Content-Length Yes Content-Length: 0

Note: The specified value must be 
"0".

cURL example
CURL.EXE -i -k -X POST --header "EnterpriseManager.APISessionID: wCo0_KvjEUFROvfHF5KGrw" --
header "Content-Length: 0"
"https://computer.network.net/attunityenterprisemanager/api/v1/servers/
myrepsrv1/tasks/SalesDBBackup/tables?action=reload&schema=dbo&table= employeelist"

Response   
HTTP/1.1 200 OK

Cache-Control: no-cache, no-store

Content-Length: 0

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

Server: Microsoft-HTTPAPI/2.0

Date: Tue, 24 Jan 2017 13:34:38 GMT

Error response
Error responses
Enterprise 
HTTP 
Manager  Text Description
Code
Code

500 AEM_ Failed to reload table {table} as Full  The table could not be reloaded 


INVALID_ Load is not enabled for task {task}. because the task's Full Load 
TASK_NOT_ replication option is not enabled.
FL

API Guide - Qlik Enterprise Manager , November 2021 107


2   Enterprise Manager REST API

Enterprise 
HTTP 
Manager  Text Description
Code
Code

500 AEM_ Failed to reload table  as this  The table could not be reloaded 


INVALID_ operation is not supported with the  because the task's source endpoint 
TASK_NT_ File Channel source endpoint. is File Channel.
NTSUPPEP

500 AEM_ Failed to reload table {schema}. An error was encountered while 


RELOAD_ {table} for replication task {task} on  trying to reload the specified table.
TABLE_ERR server {server}: {message}

2.32   TestEndpoint
General
URL
https://{host}/attunityenterprisemanager/api/v1/servers/{server} endpoints/
{endpoint}?action=test&timeout={timeout}

Description   
Contact an endpoint to test connectivity and configuration (permissions, CDC configuration).

HTTP method   
GET

Required user role   
See Required Enterprise Manager permissions (page 251).

Request parameters
Request parameters
Location Name Required Example

URL Host [string] Yes computer.network.net

URL ServerName [string] Yes myrepsrv1

URL EndpointName [string] Yes TargetSQL1

URL Timeout [int32] Optional (default is 60  60 (seconds)


sec)

Header EnterpriseManager.APISessionID  Yes wCo0_


[string] KvjEUFROvfHF5KGrw

API Guide - Qlik Enterprise Manager , November 2021 108


2   Enterprise Manager REST API

Response body
{

"requeststate":"{enum requeststate_state}",

"message":""

"detailed_message":""

Response parameters
Response parameters
Name Description

state {enum endpoint_state] The current state of the endpoint

message Short description of the error

detailed message Elaborate description of the error

cURL example
Request   
c:\Tools\curl>CURL.EXE -i -k --header "EnterpriseManager.APISessionID: wCo0_KvjEUFROvfHF5KGrw"
"https://computer.network.net /attunityenterprisemanager/api/v1/servers/
myrepsrv1/endpoints/TargetSQL1c?action=test&timeout=60"

Response   
HTTP/1.1 200 OK

Cache-Control: no-cache, no-store

Content-Length: 61

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

Server: Microsoft-HTTPAPI/2.0

Date: Sun, 19 Feb 2017 16:42:11 GMT

Payload   
{

"state":"CONNECTED",

"error_message":""

API Guide - Qlik Enterprise Manager , November 2021 109


2   Enterprise Manager REST API

Error response
Error responses
HTTP  Enterprise Manager 
Text Description
Code Code

500 AEM_TEST_ A timeout occurred while testing the  Connection was not 


ENDPOINT_ connection for endpoint {endpoint} on  established within 60 
CONNECTION_ Replicate server {server}. seconds.
TIMEOUT

500 AEM_ENDPOINT_ Replicate endpoint {0} on server {1} could  The specified 


NOT_FOUND not be found. endpoint could not 
be found.

2.33   DeleteOldChangeData
General
Description 
The method can be called on an ad-hoc basis to delete processed Change Data Partitions created on the 
target database by a Replicate task. 

 l Partitions will only be deleted if the Change Data Partitioning and Partition Retention 
options are enabled in the Replicate console. 
For more information, refer to the Qlik Replicate Setup and User Guide.
 l Partitions will only be deleted if the task is running. If the task is not running, the 
partitions will be deleted the next time the task runs.
 l Only partitions that are not locked by a consuming application will be deleted.

URL
https://{host:port}/attunityenterprisemanager/api/v1/servers/{server}/tasks/ {task}?action=delete_old_
change_data

HTTP method   
POST 

Required user role   
See Required Enterprise Manager permissions (page 251).

API Guide - Qlik Enterprise Manager , November 2021 110


2   Enterprise Manager REST API

Request parameters
Request parameters
Location Name Required Description/Example

URL host [string] Yes The host name of the Enterprise Manager machine.

Example:  

computer.network.net

URL server Yes The Replicate server name, as defined in Enterprise 


[string] Manager.

Example:  

myrepsrv1

URL task [string] Yes The Replicate task name.

Example:  

TargetAWSEMR

Request body
The point in time after which partitions can be deleted, which can either be specified as a timestamp or as 
an offset. If a retention barrier is set, partitions will be deleted up to the retention barrier date, regardless of 
the specified timestamp/offset.

Timestamp format
[Date]

(yyyy'-'MM'-'dd'T'HH':'mm':'ss'Z')

Example:  

2020-06-30T16:15:00Z

Offset format
[Period]

Format ISO 8601 duration

Example:  

P1M3DT1H2M

API Guide - Qlik Enterprise Manager , November 2021 111


2   Enterprise Manager REST API

cURL example
POST  attunityenterprisemanager/api/v1/servers/myemserver/tasks/Oracle2NULL?action=delete_old_
change_data

Parameters:

"timestamp_or_offset":"2020-07-30T16:15:00Z"

Error response
Error responses
HTTP  Enterprise 
Text Description
Code Manager Code

500 AEM_TASK_ Replication task {task] on server {server} could  Returned when an 


NOT_FOUND not be found.  unknown task name is 
encountered.

500 AEM_INVALID_ The specified deletion age does not conform to  Returned when the 


TIMESTAMP_ the expected timestamp or offset format.  specified deletion age 
OR_OFFSET_ Timestamp format should be yyyy'-'MM'- does not conform to 
FORMAT 'dd'T'HH':'mm':'ss'Z'. Offset format should  the expected 
conform to ISO 8601 duration. timestamp or offset 
format.

500 AEM_DELETE_ Failed to request deletion of old change data  Returned when an 


OLD_CHANGE_ for task {task} on server {server}.  error is encountered 
DATA_INNER_ during partition 
Message: {error_message}
ERR deletion.

2.34   SetChangeDataRetentionBarrier
General
Description 
The method can be used to:   

 l Set a retention barrier for deleting consumed partitions. Setting a retention barrier will initiate 
periodic deletion of consumed Change Data Partitions from the target database defined for the 
specified task. Partitions will be deleted according to the Allow consuming applications to delete 
partitions every interval set on Replicate Server, and up to the specified "retention_point".
 l Remove the retention barrier, thereby stopping periodic deletion of consumed Change Data 
Partitions.

API Guide - Qlik Enterprise Manager , November 2021 112


2   Enterprise Manager REST API

 l Partitions will only be deleted if the Change Data Partitioning and Partition Retention 
options are enabled in the Replicate console. 
 l Partitions will only be deleted if the task is running. If the task is not running, the 
partitions will be deleted the next time it runs.
 l Only partitions that are not locked by a consuming application will be deleted.

URL
https://{host:port}/attunityenterprisemanager/api/v1/servers/{server}/tasks/ {task}?action=set_change_
data_retention_barrier

HTTP method   
PUT

Required user role   
See Required Enterprise Manager permissions (page 251).

Request parameters
Request parameters
Location Name Required Description/Example

URL host [string] Yes The host name of the Enterprise Manager machine.

Example:  

computer.network.net

URL server Yes The Replicate server name, as defined in Enterprise 


[string] Manager.

Example:  

myrepsrv1

URL task [string] Yes The Replicate task name.

Example:  

TargetAWSEMR

Request body
Body for setting a retention barrier
retention_point=timestamp

application=application_name

API Guide - Qlik Enterprise Manager , November 2021 113


2   Enterprise Manager REST API

Where:

 l timestamp is the date up to which partitions can be deleted. The timestamp must be in the following 
format: (yyyy'-'MM'-'dd'T'HH':'mm':'ss'Z'). 
 l application_name is the name of the consuming application.

Example:  

retention_point=2020-06-30T16:15:00Z

application=Compose

Body for removing the retention barrier
retention_point=

application=application_name

Where application_name is the name of the consuming application.

cURL example
PUT  a
  ttunityenterprisemanager/api/v1/servers/roni-2012/tasks/Oracle2NULL?action=set_change_data_
retention_barrier

Parameters:

"retention_point":"2020-06-30T16:15:00Z",

"application": "xxx"

Error response
Error responses
HTTP  Enterprise 
Text Description
Code Manager Code

500 AEM_TASK_ Replication task {task] on server {server}  Returned when an unknown 


NOT_FOUND could not be found.  task name is encountered.

500 AEM_INVALID_ The specified partition retention barrier  Returned when the 


TIMESTAMP_ does not conform to the expected  specified partition retention 
FORMAT timestamp  format. Timestamp format  barrier does not conform to 
should be yyyy'-'MM'- the expected timestamp  
'dd'T'HH':'mm':'ss'Z'. format.

500 AEM_SET_ Failed to set change data retention  Returned when an error is 


CHANGE_ barrier for task {task} on server {server}.  encountered during 
DATA_ partition deletion.
Message: {error_message}
RETENTION_
BARRIER_
INNER_ERR

API Guide - Qlik Enterprise Manager , November 2021 114


2   Enterprise Manager REST API

2.35   GetChangeDataRetentionBarrier
General
Description 
Returns the date of the earliest partition retention barrier when multiple partition retention barriers have 
been set.

When different retention barriers have been set by multiple consuming applications, Replicate will delete 
old Change Data partitions up to the   earliest partition retention barrier.

For information on setting a partition retention barrier, see SetChangeDataRetentionBarrier (page 112).

URL
https://{host:port}/attunityenterprisemanager/api/v1/servers/{server}/tasks/ {task}?action=get_change_
data_retention_barrier

HTTP method   
GET

Required user role   
See Required Enterprise Manager permissions (page 251).

Request parameters
Request parameters
Location Name Required Description/Example

URL host [string] Yes The host name of the Enterprise Manager machine.

Example:  

computer.network.net

URL server Yes The Replicate server name, as defined in Enterprise 


[string] Manager.

Example:  

myrepsrv1

URL task [string] Yes The Replicate task name.

Example:  

TargetAWSEMR

API Guide - Qlik Enterprise Manager , November 2021 115


2   Enterprise Manager REST API

Response body
Response parameters
Name Type Description

application string The name of the consuming application that set the 


earliest partition retention barrier.

retention_ datetime The date of the earliest partition retention barrier.


point
Format: yyyy'-'MM'-
'dd'T'HH':'mm':'ss'Z'

cURL example
GET   attunityenterprisemanager/api/v1/servers/roni-2012/tasks/Oracle2NULL?action=get_change_data_
retention_barrier

Response:

{"application":"xxx","retention_point":"2020-06-30T16:15:00Z"}

Error response
Error responses
HTTP  Enterprise 
Text Description
Code Manager Code

500 AEM_TASK_ Replication task {task] on server  Returned when an unknown task 


NOT_FOUND {server} could not be found.  name is encountered.

2.36   Parameters
The following table lists all parameters used in the response body, along with their values.

Parameters
Parameter 
Value / Description
Name

Server State  l MONITORED: The server is being monitored, the Qlik Enterprise Manager is 
connected and synchronized successfully.
 l ERROR: Qlik Enterprise Manager fails to connect and monitor the server.
 l NOT_MONITORED: The server is not being monitored.

Server Platform  l WINDOWS
 l LINUX

API Guide - Qlik Enterprise Manager , November 2021 116


2   Enterprise Manager REST API

Parameter 
Value / Description
Name

License State  l LICENSE_VALID
 l LICENSE_INVALID_CHECKSUM
 l LICENSE_EXPIRED NO_LICENSE
 l MACHINE_NOT_LICENSED
 l INVALID_LICENSE

Endpoint Role Specifies whether an endpoint is being used as a source or a target in a Replicate 
task.

 l SOURCE
 l TARGET

Task State  l RUNNING: The task is running.
 l STOPPED: The task has not been run yet or has stopped running at some 
point during the replication.
 l ERROR: The task has stopped due to a fatal error.
 l RECOVERING: The task has detected an error and is trying to recover. After 
a limited number of attempts, the task either recovers and the state returns to 
RUNNING, or the task fails and the state turns to ERROR.

Task options  l full_load_enabled [bool]: Creates all files or tables at the target endpoint, 
automatically defines the metadata that is required at the target, and 
populates the tables with data from the source.
 l apply_changes_enabled [bool]: Updates all changes made to files and 
tables that were created during the full load. Applied changes include inserts, 
updates, and removal of items.
 l store_changes_enabled [bool]: Stores changes in Change tables. This value 
and the audit_changes_enabled value are mutually exclusive.
 l audit_changes_enabled [bool]: Stores changes in a single audit table. This 
value and the store_changes_enabled_value are mutually exclusive.

API Guide - Qlik Enterprise Manager , November 2021 117


2   Enterprise Manager REST API

Parameter 
Value / Description
Name

Task Stop   l NONE: Indicates that a task is running and no Stop reason is prevalent.
reason  l NORMAL: Indicates that the task was stopped by the user.
 l RECOVERABLE_ERROR: Indicates that the task is still active, but that there 
is a temporary problem, such as a missing connection. As soon as the error 
state is resolved, Replicate restarts the task.
 l FATAL ERROR: Indicates that the task stopped and the error must be 
resolved manually. The task cannot be started again until the error has been 
resolved.
 l FULL_LOAD_ONLY_FINISHED: Indicates that the task only finished full 
load.
 l STOPPED_AFTER_FULL_LOAD: Indicates that the task stopped after full 
load. Cached changes may or may not have been applied.
 l STOPPED_AFTER_CACHED_EVENTS: Indicates that the task stopped 
after cached changes were applied.
 l EXPRESS_LICENSE_LIMITS_REACHED: The task definition includes 
actions that are not included with Express license privileges.
 l STOPPED AFTER_DDL_APPLY: Indicates that the task stopped after 
DDL statements were applied.
 l STOPPED_LOW_MEMORY: Indicates that the task stopped due to low 
memory.
 l STOPPED_LOW_DISK: Indicates that the task stopped due to low disk 
space.

Source/target   l RUNNING: The endpoint is running.
status  l ERROR: File channel only. Cannot send files to another endpoint. Indicated 
by an asterisk (*) in the user interface.
 l DISCONNECTED: Information that is provided by all targets and Oracle 
sources that cannot establish a successful connection. Other sources stop the 
task. Indicated by an asterisk (*) in the user interface.
 l WARNING: The target is applying changes one by one instead of bulk to find 
the problem. Indicatedby an asterisk (*) in the user interface.

API Guide - Qlik Enterprise Manager , November 2021 118


2   Enterprise Manager REST API

Parameter 
Value / Description
Name

Profile  l Unidirectional: A Replicate task that replicates  from a source endpoint to a 
target endpoint.
 l Bidirectional: A Replicate task that replicates changes from the source  to the 
target, and vice versa.
 l Log Stream: A Replicate task that captures changes from a single source and 
stores them on Replicate Server for replication to one or more targets.
 l Qlik Cloud: A Qlik Cloud Landing task in Replicate. For more information, see 
Hybrid Data Delivery.
 l Data Storage: A data storage task in a Compose Data Lake project.
 l Data Warehouse: A data warehouse task in a Compose Data Warehouse 
project.
 l Data Mart: A data mart task in a Compose Data Warehouse project.
 l Compactor: A Compose system task that merges the changes (i.e. history) 
from the delta_hds folder with the hds folder and then deletes the delta_hds 
folder.
 l Workflow: A workflow task in Compose.
 l Provisioning: A provisioning task in Compose for Data Lakes 6.6.

Source type Source and target endpoint types should be specified in the same format that they 
appear in the Type drop-down list (when adding a new endpoint in Enterprise 
Manager). For information on how to add an endpoint in Enterprise Manager, refer to 
the Enterprise Manager Setup and User Guide.

Target type -

API Guide - Qlik Enterprise Manager , November 2021 119


2   Enterprise Manager REST API

Parameter 
Value / Description
Name

Run options  l RESUME_PROCESSING: Resumes task execution from the point that it was 
stopped. 
 l RELOAD_TARGET: Re-starts the full-load replication process if the task was 
previously run.
 l RESUME_PROCESSING_FROM_TIMESTAMP: Starts the CDC replication 
task from a specific point.
 l RECOVER_USING_LOCALLY_STORED_CHECKPOINT: Recovers a task 
using the recovery state stored locally in the task folder (located under the 
Data folder).
 l RECOVER_USING_CHECKPOINT_STORED_ON_TARGET: Recovers a 
task using the CHECKPOINT value from the attrep_txn_state table 
(created in the target database).   

This option is only available if the Store task recovery data in 
target database option is enabled in the Changes Processing 
Tuning tab of the Task Settings dialog box.

 l METADATA_ONLY_RECREATE_ALL_TABLES: Recreates the target 
tables defined for full load.
 l METADATA_ONLY_CREATE_MISSING_TABLES: Creates missing target 
tables, including Change Tables.

Request state  l SUCCESS: Connection to endpoint is valid
 l FAILURE: Connection to endpoint is not valid

state Represented as enum values:

 l TABLE_QUEUED = 0: A table awaiting loading. 
 l TABLE_LOADING = 1: A table being loaded to the target. 
 l TABLE_COMPLETED = 2: A table that has been loaded to the target.
 l TABLE_CHANGE_PROCESSING = 3: A table that has been loaded to the 
target and is being updated according to changes on the source. 
 l TABLE_ERROR = 4: An error occurred while processing the table.

API Guide - Qlik Enterprise Manager , November 2021 120


3   Enterprise Manager .NET API

3    Enterprise Manager .NET API
This section explains how to use the Enterprise Manager .NET API and lists the available methods.

In this section:

 l Prerequisites (page 122)
 l Getting started - Login (page 122)
 l Authentication and authorization (page 123)
 l Error handling (page 123)
 l PutServerLicense (page 125)
 l GetServerDetails (page 126)
 l PutServer (page 130)
 l PutServerAcl (page 133)
 l GetServer (page 137)
 l GetServerAcl (page 138)
 l GetServerList (page 139)
 l DeleteServer (page 140)
 l DeleteServerAcl (page 141)
 l GetTaskList (page 142)
 l GetTaskDetails (page 144)
 l GetTableList (page 155)
 l GetTableStatuses (page 157)
 l DeleteTask (page 160)
 l ExportTask (page 161)
 l ImportTask (page 162)
 l ExportAuditTrail (page 174)
 l RunTask (page 165)
 l StopTask (page 163)
 l GetEndpointList (page 168)
 l DeleteEndpoint (page 170)
 l ReconfigureEndpointNoWait  (page 170)
 l ExportAll (page 172)
 l ImportAll (page 173)
 l ReloadTable (page 175)
 l TestEndpoint (page 176)
 l DeleteOldChangeData (page 177)
 l SetChangeDataRetentionBarrier (page 179)
 l GetChangeDataRetentionBarrier (page 181)
 l Parameters (page 182)

API Guide - Qlik Enterprise Manager , November 2021 121


3   Enterprise Manager .NET API

3.1   Prerequisites
General prerequisites
Before using the Enterprise Manager .NET SDK, make sure that:

 l Qlik Enterprise Manager has been installed.
 l The Qlik Enterprise Manager service is active.
 l The relevant permissions have been granted.

.NET SDK prerequisites
The <Enterprise Manager_Installation_Folder>/clients/dotnet> folder contains the following required files:

 l AemRestClient.dll 
 l Newtonsoft.Json.dll 

3.2   Getting started - Login
This section describes how to get started with the Enterprise Manager .NET SDK. To help you better 
understand how to implement the available methods, a code sample and a readme file that describes the 
code are located in the <Enterprise Manager_Installation_Folder>/clients/dotnet folder.

To be able to use the Enterprise Manager .NET SDK:

 1.  Create a project that references the AemRestClient.dll and Newtonsoft.Json.dll files
 2.  Create the AemRestClient object using one of the following constructors:
 1.  public AemRestClient(ICredentials credentials, string url =
"https://localhost/attunityenterprisemanager", bool verifyCertificate = true);
 l credentials – See below.
 l url – The URL to the Qlik Enterprise Manager server. The URL must begin with 
"https".
 l verifyCertificate – See below.
 2.  public AemRestClient(ICredentials credentials, string host, int port, string
urlSuffix = "attunityenterprisemanager", bool verifyCertificate = true);
 l credentials – See below.
 l host – The machine on which Enterprise Manager is installed.
 l port – The Enterprise Manager server port (usually 443).
 l urlSuffix – The part of the Enterprise Manager URL that follows the host and port 
(usually attunityenterprisemanager).
 l verifyCertificate – See below.

When verifyCertificate is set to true there must be a valid certificate on the Enterprise 
Manager machine. When set to false, the Enterprise Manager client will not validate the server 
certificate.

API Guide - Qlik Enterprise Manager , November 2021 122


3   Enterprise Manager .NET API

Example 1: Connecting to Enterprise Manager using Active Directory

var credentials = new NetworkCredential


{
UserName = "USERNAME",
Password = "PASSWORD",
Domain = "DOMAIN"
};
_client = new AemRestClient(credentials, "localhost", 443, false);

Example 2: Connecting to Enterprise Manager using SAML

This must be specified without a username.

var credentials = new NetworkCredential


{
Password=<saml_assertion>
};
_client = new AemRestClient(credentials, "localhost", 443, false);

Where <saml_assertion>  is  the SAML assertion from a SAML IDP. This must be a URL encoded string 
containing the SAMLResponse parameter  with a base64 encoded SAML assertion as its value. The string 
may also contain other parameters (for example, RelayState), but these parameters are ignored.

Syntax:  
“SAMLResponse=<long_base_64_string>”

Example 3: Using client methods to Get/Set data on Qlik Enterprise Manager

After creating credentials and a client object, you can call the client methods to get/set data from Enterprise 
Manager using the public APIs.

Syntax:  
_client.GetServerList()
_client.GetServerDetails(serverName)
_client.ExportTask(serverName, taskName);

3.3   Authentication and authorization
The AemRestClient user and password need to be the user and password that are defined in users or 
groups in Qlik Enterprise Manager ACLs in at least one level (for example, Qlik Enterprise Manager level, 
All Servers level, and so on) with at least Viewer role.

3.4   Error handling
When a REST request fails, the HTTP response code is set to an error code. Information about the error is 
returned in the payload as an error response.

An error response has the following structure:

Class: AemClientException that inherits from Exception class and has the following fields:

ErrorCode

API Guide - Qlik Enterprise Manager , November 2021 123


3   Enterprise Manager .NET API

Message
This section lists the generic messages that apply to most of the API functions. Errors that are specific to a 
particular API function appear in the section for that API function.

Error responses
Error Message Description

UNAUTHORIZED_ Unauthorized Request. The user is not 


REQUEST authorized to perform 
the requested action 
(for example, deleting a 
task).

INVALID_SESSION_ The session has expired or the session ID is not  Session expired or 


ID  valid. invalid. 

DESERIALIZE_TO_ Failed to deserialize json to type {type}: {message} Returned when the 


TYPE JSON format is invalid. 

AEM_SERVER_ The requested server {server} could not be found. The requested server 


NOT_FOUND cannot be found.

AEM_SERVER_ The requested server {server} is not monitored. The requested  server 


NOT_MONITORED is not being monitored 
and thus the 
information is not 
accessible.

AEM_SERVER_ The requested server "{server}" cannot be reached  The desired 


NOT_CONNECTED at this time.  information cannot be 
retrieved as the 
Message: {message}
requested  server is not 
connected.

AEM_SERVER_ The license for requested  server {server} has  The requested  server 


LICENSE_EXPIRED expired. license has expired.

AEM_SERVER_ The license for requested server {server} is not valid. The requested  server 


INVALID_LICENSE license is not valid.

LICENSE_NOT_ You need to register a Replication Management  Replication 


FOUND license in order to use Qlik Enterprise Manager. To  Management license 
register or obtain a license, open the Qlik Enterprise  was not found. 
Manager console and follow the instructions. Returned when a user 
is permitted to Register 
Qlik Enterprise 
Manager license.

API Guide - Qlik Enterprise Manager , November 2021 124


3   Enterprise Manager .NET API

Error Message Description

LICENSE_NOT_ An Enterprise Manager Admin needs to register a  Replication 


FOUND_CONTACT_ Replication Management license before you can use  Management license 
ADMIN the product. To obtain a license, contact your Qlik  was not found. 
Sales Representative with the Enterprise Manager  Returned when a user  
machine name (which is displayed when you open  is NOT permitted to 
the Enterprise Manager console). Register Qlik 
Enterprise Manager 
license.

LICENSE_ {Module} evaluation license has expired. {Module} is one of the 


EVALUATION_ following: 
EXPIRED 
 l Replication 
Management 
 l Replication 
Analytics

LICENSE_TERM_ {Module} license has expired. {Module} is one of the 


EXPIRED  following: 

 l Replication 
Management 
 l Replication 
Analytics

LICENSE_INVALID_ The {Module} license signature is invalid. {Module} is one of the 


SIGNATURE  following: 

 l Replication 
Management 
 l Replication 
Analytics

LICENSE_HOST_ The host name in the {Module} license does not  {Module} is one of the 


MISMATCH match the Enterprise Manager machine name. following: 

 l Replication 
Management 
 l Replication 
Analytics 

AEM_MISSING_ The "{fieldName}" field is missing from the request. When a mandatory 


FIELD field is missing from the 
request or appears 
empty.

3.5   PutServerLicense
Registers a license on a specific server via Qlik Enterprise Manager.

API Guide - Qlik Enterprise Manager , November 2021 125


3   Enterprise Manager .NET API

Required User Role: See Required Enterprise Manager permissions (page 251).

Syntax
public void PutServerLicense(
string payload,
string server
);

Parameters
Parameters
Parameter    Type    Description   

payload  string The license to register on the server [stream]. 

This is the license that was provided by your Qlik Sales Representative.

Expected format: Text or JSON.
Currently refers to the Replicate license only.

server string The name of the server.

Return values
N/A

Errors
All of the general errors as well as the errors listed in the table below.

Error responses
Error    Message    Description   

AEM_PUT_ Failed to put  Returned if Qlik Enterprise Manager encounters an 


SRV_LIC_ license for server " error/exception when trying to register the license on the 
INNER_ERR {server}".  specified server.

Error: "{message}"

AEM_SRV_LIC_ The license file  Returned when the contents of the license file are invalid.


INVALID_ format is corrupt.
FORMAT

3.6   GetServerDetails
Retrieves details about the specified server.

Required User Role: See Required Enterprise Manager permissions (page 251).

Syntax
public AemGetServerDetailsResp GetServerDetails(

API Guide - Qlik Enterprise Manager , November 2021 126


3   Enterprise Manager .NET API

string server
);

Parameters
Parameters
Parameter    Type    Description   

server string The specified server name in Qlik Enterprise Manager.

Return values
AemGetServerDetailsResp

Return values
Parameter    Type    Description   

ServerDetails AemServerDetails ReplicateServerDetails or 


ComposeServerDetails that are inherited from 
AemServerDetails.

Configuration  - -

Host  string The host name or IP address of the 


Replicate/Compose Server machine.

Platform AemPlatform  The platform on which the Replicate/Compose 


{ Server machine is installed.  
UNKNOWN = 0,

WINDOWS = 1, 

LINUX = 2 

Port  string The port through which the Replicate/Compose 


Server machine is accessed.

UserName  string The user name for connecting to the 


Replicate/Compose Server machine.

Description  string The server description.

LastConnection  string The date and time of the last successful 


sync/retrieval of tasks and messages.

License ApiLicense  -

DaysToExpiration int The number of days left before the license 


expires.

Expiration  string The expiration date of the server license.

API Guide - Qlik Enterprise Manager , November 2021 127


3   Enterprise Manager .NET API

Parameter    Type    Description   

IssueDate  string When the license was issued.

State AemLicenseState The current license state (for example, valid, 


expired, and so on).
{

VALID_LICENSE = 0,

INVALID_LICENSE_
CHECKSUM = 1,

EXPIRED_LICENSE = 
2,

NO_LICENSE = 3,

MACHINE_NOT_
LICENSED = 4,

INVALID_LICENSE = 5

Message  string  The error message if Qlik Enterprise Manager 


fails to connect to the Replicate/Compose 
Server machine.

Name string  The name of the server in Qlik Enterprise 


Manager.

ResourceUtilization AemServerUtilization  -

AttunityCpuPercentage int The sum of CPU percentage of Replicate 


server and all running tasks processes.

DiskUsageMb long  The amount of disk space that the server is 


currently consuming, in MB. This is the sum of 
disk usage for all tasks on this server.

MachineCpuPercentage  int  The CPU percentage of the machine where 


Replicate is installed.

MemoryMb  long  The amount of memory that the server is 


currently consuming, in MB. This is the sum of 
memory usage for all active tasks on this 
server, excluding stopped tasks.

API Guide - Qlik Enterprise Manager , November 2021 128


3   Enterprise Manager .NET API

Parameter    Type    Description   

State AemServerState  The state of the server.

NOT_MONITORED = 
0,

MONITORED = 1,

ERROR = 2

AemTasksSummary  TaskSummary -

Error int The number of tasks that encountered a fatal 


error.

Recovering int The number of recovering tasks.

Running int The number of running tasks.

Stopped int The number of stopped tasks.

Total int The total number of tasks, regardless of state.

Version string The Replicate/Compose Server version.

 l The return value -1 means N/A.
 l Parameters related to Disk, Memory, Qlik CPU, and Machine CPU usage are not 
available for Compose servers. For Compose servers, these parameters will be 
returned as -1.
 l Parameters related to Qlik CPU and Machine CPU usage are only available for 
Replicate 6.2 and above. For earlier Replicate versions, these parameters will be 
returned  as -1.
 l For servers that are in an error state or not monitored, parameters related to Disk and 
Memory usage will be returned  as -1.

Errors
Error responses
Error    Message    Description   

AEM_SERVER_NOT_ Replicate server {server} could not  Server name unknown to Qlik 


FOUND be found. Enterprise Manager.

See Error handling (page 123).

API Guide - Qlik Enterprise Manager , November 2021 129


3   Enterprise Manager .NET API

3.7   PutServer
Adds a new Replicate/Compose Server or updates the server definition (Connection Properties) if the 
specified server already exists. This method can be used together with AemGetServer in order to update 
the connection properties of an existing server.

First call AemGetServer, then edit the returned properties as required, and finally, call AemPutServer.

Required User Role: See Required Enterprise Manager permissions (page 251).

Syntax
public void PutServer(
AemServer payload,
string server
);

Parameters
Parameters
Parameter Type Description

payload AemServer  AemReplicateServer or AemComposeServer that is 


inherited from AemServer.

Name  string  The name of the server.

Description  string The server description.

Host string  The host name or IP address of the server.

Port  string The port through which the server is accessed.

Username string The user name to connect to the Replicate/Compose 


Server.

Password string The password to connect to the Replicate/Compose 


Server. 

The password identifier (GUID) that is returned 
by GetServer is valid only for the session in 
which it was generated. Using it in another 
session (for example as input for PutServer) 
will result in exception.

API Guide - Qlik Enterprise Manager , November 2021 130


3   Enterprise Manager .NET API

Parameter Type Description

VerifyServerCertificate bool Set  to "true" to ensure the Server certificate is trusted. As a 


rule, to reduce the chance of "man-in-the-middle" attacks, 
this option should always be set to "true". 

 l When connecting directly to an Qlik Replicate 
replication server (default port 3552) with its 
automatically generated self-signed certificate, Qlik 
Enterprise Manager is able to validate the certificate 
without requiring any additional setup.  

 l When connecting to a Replicate Server via the 
Replicate UI Server (typically using port 443) or to 
the Replicate replication server with a user-installed 
certificate, you must make sure that the SSL/TLS 
certificate used by the server is trusted by the Qlik 
Enterprise Manager machine. The same applies 
when connecting to a Compose Server with a user-
installed certificate.  Y
  ou can easily verify whether 
the certificate is trusted by opening a Chrome 
browser window on the Qlik Enterprise Manager 
machine and connecting to Replicate. If there are no 
security warnings, the certificate is trusted.  

For information on the different ways of connecting to Qlik 
Replicate, see Qlik Replicate Server Requirements in the 
Qlik Enterprise Manager Help.

Monitored bool  Whether to retrieve tasks and messages from this server or 


not.

server string The name of the server.

Return values
N/A

Errors 
All of the general errors as well as the errors listed in the table below.

API Guide - Qlik Enterprise Manager , November 2021 131


3   Enterprise Manager .NET API

Error responses
Error Message Description

DESERIALIZE_ "Failed to deserialize json to type AemServer: {message}"  Returned when the 


TO_TYPE JSON format is 
invalid. For 
example, such an 
error will be 
returned if the 
JSON contains an 
unknown role.

AEM_PUT_ Failed to put server "{server}".  Returned if Qlik 


SERVER_ Enterprise Manager 
Error: "{message}".
INNER_ERR encounters an 
error/exception 
when trying to PUT 
the server.

AEM_INVALID_ Server type {ServerType} for server "{ServerName}" is not  Returned when an 


SERVER_TYPE valid. invalid server type 
is specified.

AEM_NAME_ The name of the server in the request does not match the  Returned when the 


URL_MISMATCH one that is specified in the URL. name of the server 
in the request does 
not match the one 
that is specified in 
the URL.

AEM_EMPTY_ The host is missing from the request. Returned when the 


HOST host is missing from 
the request.

AEM_EMPTY_ The port is missing from the request. Returned when the 


PORT port is missing from 
the request.

AEM_EMPTY_ The username is missing from the request.  Returned when the 


USERNAME user name is 
missing from the 
request.

AEM_EMPTY_ The password is missing from the request.  Returned when the 


PASSWORD password is 
missing from the 
request. 

API Guide - Qlik Enterprise Manager , November 2021 132


3   Enterprise Manager .NET API

Error Message Description

AEM_INVALID_ The port is invalid. Returned when the 


PORT  specified port is not 
valid.

AEM_INVALID_ The user name is invalid.  Returned when the 


USERNAME specified user 
User names cannot exceed 104 characters and can contain 
name is not valid.
all Unicode characters except for the following characters: 
Forward slash (/), Left square bracket ([), Right square 
bracket (]), Colon (:), Semicolon (;), Vertical bar (|), Equal 
sign (=), Plus sign (+), Asterisk (*), Question mark (?), Left 
angle bracket (<), Right angle bracket (>), Double quote (\").

AEM_INVALID_ The description is invalid.  Returned when the 


DESC description exceeds 
Descriptions cannot exceed 250 characters.
250 characters.

AEM_INVALID_ The host is invalid.  Returned when the 


HOST  server host name 
Hosts cannot exceed 64 characters and can only contain 
exceeds 64 
letters (a-z or A-Z), digits, spaces, dots (.), dashes (-), and 
characters or 
underscores (_).
contains invalid 
characters.

AEM_INVALID_ The name of the server is invalid.  Returned when the 


NAME  server name 
Server names cannot exceed 64 characters and can only 
exceeds 64 
contain letters (a-z or A-Z), digits, spaces, dots (.), dashes 
characters or 
(-), and underscores (_). 
contains invalid 
characters.

AEM_HOST_ Host {name/IP} and port {number} are already in use by  Returned when 


PORT_ another server. both the server host 
ALREADY_EXIST name/IP address 
  and the server port 
are already in use  
by another server.

3.8   PutServerAcl
Puts an explicit ACL for a specific server in Qlik Enterprise Manager. The method will replace any existing 
explicit ACL with the ACL in the request. The request also includes a Boolean flag for specifying whether or 
not the server  should  inherit ACLs from its ancestors (in addition to its explicitly defined ACLs).

The inherited ACLs (that is, the ACLs of the server's ancestors) are not affected by this method.

API Guide - Qlik Enterprise Manager , November 2021 133


3   Enterprise Manager .NET API

The AemPutServerAcl can be used together with the AemGetServerAcl method in order to update an 


existing server's ACL. First call AemGetServerAcl, then edit the returned roles as required, and finally, call 
AemPutServerAcl.

Behavior when putting a partial request: 

When the request body  includes only some of the roles (as opposed to all four of them), only the roles 
specifically defined in the request body will be set on the server; roles that are missing or empty will be 
inherited, but only if the following are true:

 l The disable_inheritance flag is set to "True".
 l The  roles that are missing/empty in the request are defined for the ancestors.

Behavior on conflicts: 

If the disable_inheritance flag is set to "False" and the explicit roles in the request conflict with existing 
inherited roles, then the explicit roles will take precedence. For example, if the request defines user A as a 
Viewer on MyServer and user A is also defined as an Admin on All Servers, then user A will be defined as 
an Admin on All Servers but as a Viewer on MyServer.

The user permissions in Enterprise Manager are completely independent of the user 
permissions in Replicate. Consequently, AemPutServerAcl will affect the server's Enterprise 
Manager user permissions, but will not affect Replicate's user permissions. 

Moreover, when performing an operation via Enterprise Manager, the user permissions 
defined for the server entity in Enterprise Manager apply, whereas when performing an 
operation directly via the Replicate Console, the user permissions defined in  Replicate apply. 

Defining the same user/group in different roles is not allowed. However, if the same user or 
group is defined in different roles but with a different case (for example, Mike vs. mike or 
Analysts vs. ANALYSTS), no error will be returned and the strongest role will take precedence.

Required User Role: See Required Enterprise Manager permissions (page 251).

Syntax
public void PutServerAcl(
AemAuthorizationAcl payload,
string server
);

API Guide - Qlik Enterprise Manager , November 2021 134


3   Enterprise Manager .NET API

Parameters
Parameters
Parameter Type  Description

payload AemAuthorizationAcl  -

DisableInheritance bool If set to "true", the server does not inherit ACLs from 


its ancestors (in addition to its explicit ACLs). If set to 
"false", the server inherits ACLs from its ancestors, in 
addition to any explicit ACLs.

AdminRole AemRoleDef  Users and/or groups assigned as Admin role.

DesignerRole AemRoleDef  Users and/or groups assigned as Designer role.

OperatorRole AemRoleDef  Users and/or groups assigned as Operator role.

ViewerRole AemRoleDef  Users and/or groups assigned as Viewer role.

Groups List<AemGroupRef>  Groups assigned as the role.

Name string The group name.

Users List<AemUserRef>  Users assigned as the role.

Name string The user name.

server string The name of the server.

Return values
N/A

Errors
All of the general errors as well as the errors listed in the table below.

Error responses
Error Message Description

DESERIALIZE_ "Failed to deserialize json to type  Returned when the JSON format is invalid. 


TO_TYPE AemAuthorizationAcl: {message}"  For example, such an error will be returned 
if the JSON contains an unknown role.

AEM_PUT_ Failed to put ACL of server " Returned if Qlik Enterprise Manager 


SERVER_ACL_ {server}".  encounters an error/exception when trying 
INNER_ERR to put the server's ACL.
Error: "{message}".

API Guide - Qlik Enterprise Manager , November 2021 135


3   Enterprise Manager .NET API

Error Message Description

AEM_NO_  User "{userName}" must be  Returned when the domain is missing from 


DOMAIN_IN_ preceded by a domain name,  the user name.
USER separated by a backslash.  

Example: 

domain_name\user_name. 

AEM_NO_  Group "{groupName}" must be  Returned when the domain is missing from 


DOMAIN_IN_ preceded by a domain name,  the group name.
GROUP separated by a backslash.  

Example: 

domain_name\group_name. 

AEM_NO_ Requested server "{serverName}"  Returned when there is no admin on the 


ADMIN_ON_ has no admin user.  server. 
SERVER 
At least one user or group must be  Possible reasons:
assigned to the "admin" role.
 l The request JSON is set to 
disable_inheritance=true and the 
explicit admin role in the JSON is 
empty.
 l The JSON is set to disable_
inheritance =true, the explicit 
admin role in the JSON is empty, 
and the parent levels do not have 
an admin user to inherit.

AEM_USER_ User "{userName}" is assigned to  Returned when a user is assigned to 


ASSIGNED_TO_ multiple roles. Users can only be  multiple roles.
MULTIPLE_ assigned to a single role. 
ROLES 

AEM_GROUP_ Group "{groupName}" is assigned to  Returned when a group is assigned to 


ASSIGNED_TO_ multiple roles. Groups can only be  multiple roles.
MULTIPLE_ assigned to a single role.  
ROLES  

AEM_USER_ "{userName/groupName}" is  Returned either when the specified user 


GROUP_ assigned to multiple roles or to the  already exists as a group in the 
MULTIPLE_ same role twice. Users/groups can  same/another role, or the specified group 
ASSIGNED only be assigned once, and to a  already exists as a user in the 
single role. same/another role.

API Guide - Qlik Enterprise Manager , November 2021 136


3   Enterprise Manager .NET API

3.9   GetServer
Retrieves the definition (Connection Properties) of the specified server. This method can be used together 
with PutServer in order to update the connection properties of an existing server. First, call GetServer, then 
edit the returned properties as required, and finally, call PutServer.

Required User Role: See Required Enterprise Manager permissions (page 251).

Syntax
public AemServer GetServer(
string server
);

Parameters
Parameters
Parameter Type  Description

server string The name of the server to retrieve.

Return values
AemServer (AemReplicateServer or AemComposeServer that inherited from AemServer)

Return values
Parameter Type  Description

Host string  The host name or IP address of the server.

Port  string The port through which the server is accessed.

Name  string  The name of the server.

Description  string The server description.

Username string The user name to connect to the Replicate/Compose Server.

Password string The password to connect to the Replicate/Compose Server.

The password identifier (GUID) that is returned by 
GetServer is valid only for the session in which it was 
generated. Using it in another session (for example 
as input for PutServer) will result in exception.

VerifyServerCertificate bool When "true", Qlik Enterprise Manager verifies that the Server 


certificate is trusted, thereby reducing the chance of "man-in-the-
middle" attacks.

For details on setting this option, see PutServer (page 130).

Monitored bool  Whether to retrieve tasks and messages from this server or not.

API Guide - Qlik Enterprise Manager , November 2021 137


3   Enterprise Manager .NET API

Errors
See general errors.

3.10   GetServerAcl
Retrieves the explicit ACL defined in Qlik Enterprise Manager for the specified server, including a Boolean 
indication if ACL inheritance is disabled or enabled for the server. 

The method returns the explicit ACL only. In other words, it does not return inherited ACLs.

If all of the server ACLs are inherited (i.e. no ACL was explicitly defined for the server), an error will be 
returned indicating that no ACL was found.

This method can be used together with AemPutServerAcl in order to update an existing server's ACL. First, 
call AemGetServerAcl, then edit the returned roles as required, and finally, call AemPutServerAcl.

Required User Role: See Required Enterprise Manager permissions (page 251).

Syntax
public AemAuthorizationAcl GetServerAcl(
string server
);

Parameters
Parameters
Parameter    Type    Description   

server string The name of the server where the ACL is located.

Return values
AemAuthorizationAcl

Return values
Parameter    Type    Description   

DisableInheritance bool If set to "true", the server does not inherit ACLs from 


its ancestors (in addition to its explicit ACLs). If set to 
"false", the server inherits ACLs from its ancestors, in 
addition to any explicit ACLs.

AdminRole AemRoleDef  Users and/or groups assigned as Admin role.

DesignerRole AemRoleDef  Users and/or groups assigned as Designer role.

OperatorRole AemRoleDef  Users and/or groups assigned as Operator role.

ViewerRole AemRoleDef  Users and/or groups assigned as Viewer role.

Groups List<AemGroupRef>  Groups assigned as the role.

API Guide - Qlik Enterprise Manager , November 2021 138


3   Enterprise Manager .NET API

Parameter    Type    Description   

Name string The group name.

Users List<AemUserRef>  Users assigned as the role.

Name string The user name.

Errors
All of the general errors as well as the errors listed in the table below.

Error responses
Error    Message    Description   

AEM_GET_ Failed to get ACL  Returned if Qlik Enterprise Manager encounters an 


SERVER_ACL_ of server "{server}".  error/exception when trying to get the server ACL.
INNER_ERR
Error: "{message}".

AEM_SERVER_ ACL for server " Returned if no explicit ACL is defined for the server. 


HAS_NO_ACL {server}" could not 
be found.
A server that does not have its own explicit ACL  
inherits the ACL from its ancestors. Inherited 
ACLs are not returned by this method. 

3.11   GetServerList
Retrieves a list of servers under Qlik Enterprise Manager management as well as each server's properties.

Required User Role: See Required Enterprise Manager permissions (page 251).

Syntax
public AemGetServerListResp GetServerList(
);

Parameters
N/A

Return values
AemGetServerListResp 

Return values
Value Type  Description

ServerList  List<AemServerInfo> ReplicateServerInfo or ComposeServerInfo that 


inherit from AemServerInfo.

API Guide - Qlik Enterprise Manager , November 2021 139


3   Enterprise Manager .NET API

Value Type  Description

Description string  The description of the server.

Host string The host name or IP address of the server.

LastConnection  string The date and time of the last successful 


sync/retrieval of tasks and messages.

Message string The error message if Qlik Enterprise Manager fails 


to connect to the server.

Name string The name of the server. 

Platform  AemPlatform AemPlatform

{   

UNKNOWN = 0,   WINDOWS 
= 1,   LINUX = 2 

Port string  The port through which the server is accessed. 

State AemServerState  AemServerState   

NOT_MONITORED = 0,   

MONITORED = 1,   

ERROR = 2   

Version  string  The Replicate/Compose Server version.

Errors
All of the general errors as well as the errors listed in the table below.

Error responses
Error  Message Description

AEM_SERVER_NOT_ Replicate server {server} could not  Server name unknown to Qlik 


FOUND be found. Enterprise Manager.

3.12   DeleteServer
Description
When this method is called, Qlik Enterprise Manager will:

API Guide - Qlik Enterprise Manager , November 2021 140


3   Enterprise Manager .NET API

 l Delete the specified server from Qlik Enterprise Manager
 l Stop monitoring any tasks that were defined on the server
 l Delete all messages related to the server from the Message Center
 l Delete all user roles defined for the server, the server tasks, and the server endpoints

The above operations will be performed, regardless of whether the server is currently being 
monitored or in an error state.

Required User Role: See Required Enterprise Manager permissions (page 251).

Syntax
public void DeleteServer(
string server
);

Parameters
Parameters
Parameter Type Description

server string The name of the server to be deleted.

Return values
N/A

Errors
All of the general errors as well as the errors listed in the table below.

Error responses
Error Text Description

AEM_SERVER_ Requested server " The server name is unknown to Qlik Enterprise 


NOT_FOUND {server}" could not be  Manager.
found.

AEM_DELETE_ Failed to delete requested  Qlik Enterprise Manager encountered an 


SERVER_INNER_ server "{server}". error/exception when trying to delete the server.
ERR

3.13   DeleteServerAcl
Deletes the explicit ACL defined in Qlik Enterprise Manager for the specified server. Inherited ACLs are not 
affected by this method. Once the explicit ACL is deleted from the server, all ACLs will be automatically 
inherited from the server's ancestors.

Required User Role: See Required Enterprise Manager permissions (page 251).

API Guide - Qlik Enterprise Manager , November 2021 141


3   Enterprise Manager .NET API

Syntax
public void DeleteServerAcl(
string server
);

Parameters
Parameters
Parameter Type  Description

server string The name of the server whose ACL needs to be deleted.

Return values
N/A

Errors
All of the general errors as well as the errors listed in the table below.

Error responses
Error Message Description

AEM_DELETE_ Failed to delete ACL  Returned if Qlik Enterprise Manager encounters an 


SERVER_ACL_ of server "{server}".  error/exception when trying to delete the server's 
INNER_ERR ACL.
Error: "{message}".

AEM_SERVER_ ACL for server " Returned when the specified server has no explicit 


HAS_NO_ACL {server}" could not be  ACL defined. 
found.  

3.14   GetTaskList
Receive a list of tasks per selected and authorized server. For each task, the API returns a few values.

Required User Role: See Required Enterprise Manager permissions (page 251).

Syntax
public AemGetTaskListResp GetTaskList(
string server
);

Parameters
Parameters
Parameter Type  Description

server string The name of the server on which the tasks reside.

API Guide - Qlik Enterprise Manager , November 2021 142


3   Enterprise Manager .NET API

Return values
AemGetTaskListResp

Return values
Value Type  Description

TaskList List<AemTaskInfo> An array of Endpoint objects.

Name string  l Replicate: - The name of the task.


 l Compose: - The name of the task or workflow 
appended with a double underscore and the 
project name.

Example:  

mytask__myproject

State AemTaskState   -

STOPPED = 0,

RUNNING = 1,

ERROR = 2,

RECOVERY = 3

API Guide - Qlik Enterprise Manager , November 2021 143


3   Enterprise Manager .NET API

Value Type  Description

StopReason AemTaskStopReason  The reason the task stopped.  For Compose tasks, this 


{ will always be NONE.
 
NONE = 0,

NORMAL = 1,

RECOVERABLE_
ERROR = 2,

FATAL_ERROR = 3,

FULL_LOAD_ONLY_
FINISHED = 4,

STOPPED_AFTER_
FULL_LOAD = 5,

STOPPED_AFTER_
CACHED_EVENTS = 6,

EXPRESS_LICENSE_
LIMITS_REACHED = 7,

STOPPED_AFTER_
DDL_APPLY = 8,

STOPPED_LOW_
MEMORY = 9,

STOPPED_LOW_
DISK_SPACE = 10

Message string  The message if the task stopped due to an error.

AssignedTags array Returns the custom tags assigned to the task. If no tags 


are assigned to the task, an empty array will be returned.

Errors
See general errors.

3.15   GetTaskDetails
Retrieves details about a selected and authorized task. The API returns full monitoring information related 
to the selected task.

Required User Role: See Required Enterprise Manager permissions (page 251).

API Guide - Qlik Enterprise Manager , November 2021 144


3   Enterprise Manager .NET API

Syntax
public AemGetTaskDetailsResp GetTaskDetails(
string server,
string task
);
 

Parameters
Parameters
Parameter Type  Description

server string The name of the server.

task string  l Replicate: - The name of the task.


 l Compose: - The name of the task or workflow 
appended with a double underscore and the project 
name.

Example:  

mytask__myproject

Return values for Replicate tasks
AemGetTaskDetailsResp

Return values
Value Type  Description

Task  AemTaskInfoDetailed -

Type string The task type: 


AemTaskInfoDetailed

Name string The name of the task.

Description string The task description. 


If there is no 
description, an empty 
string will be returned.

CdcEventCounters AemTaskCdcEventCounters All numeric data 


concerning 
CDC events.

AppliedDdlCount long  The total number of 


metadata changes, 
such as add column.

API Guide - Qlik Enterprise Manager , November 2021 145


3   Enterprise Manager .NET API

Value Type  Description

AppliedDeleteCount long  The number of 


records deleted in 
total for all tables.

AppliedInsertCount long  The number of 


records added in total 
for all tables.

AppliedUpdateCount long  The number of 


records updated in 
total for all tables.

CdcLatency  AemCdcLatency  CDC latency 


information.

SourceLatency string The time gap 


between the original 
change in the source 
endpoint and 
capturing it, in 
hh:mm:ss.

TotalLatency  string The overall latency 


(source latency + 
target latency + apply 
latency), in hh:mm:ss.

CdcThroughput AemCdcThroughput  Indicates how fast the 


table records are 
being replicated to 
the target endpoint 
(by number or volume 
of records). Refers 
only to the 
current/last CDC.

SourceThroughputRecordsCount AemCdcThroughputItem  The current source 


throughput, in 
rec/sec.

SourceThroughputVolume AemCdcThroughputItem  The current source 


throughput, in 
kbyte/sec.

TargetThroughputRecordsCount AemCdcThroughputItem  The current target 


throughput, in 
rec/sec.

API Guide - Qlik Enterprise Manager , November 2021 146


3   Enterprise Manager .NET API

Value Type  Description

TargetThroughputVolume AemCdcThroughputItem  The current target 


throughput, in 
kbyte/sec

Current long -

CdcTransactionsCounters AemCdcTransactionsCounter All numeric data 


s  concerning 
CDC transactions.

AppliedComittedTransactionCount long The number of 


transactions 
committed.

AppliedRecordsComittedCount long The sum of all 


records/events in all 
Completed 
transactions.

AppliedRecordsInProgressCount long The sum of all 


records/events in all 
In-Progress 
transactions.

AppliedTransactionsInProgressCount long The number of 


transactions in 
progress.

AppliedVolumeComittedMb long The sum of all 


volume/events in all 
Completed 
transactions, in MB.

CommitChangeRecordsCount long The number of 


COMMIT change 
records.

IncomingAccumulatedChangesOnDiskCount long The number of 


changes accumulated 
on disk until source 
commit.

IncomingAccumulatedChangesInMemoryCo long The number of 


unt changes accumulated 
in memory until 
source commit.

API Guide - Qlik Enterprise Manager , November 2021 147


3   Enterprise Manager .NET API

Value Type  Description

IncomingApplyingChangesInMemoryCount long The number of 


changes in memory 
during apply and until 
target commit.

IncomingApplyingChangesOnDiskCount long The number of 


changes on disk 
during apply and until 
target commit.

RollbackChangeRecordsCount long The number of 


ROLLBACK change 
records.

RollbackChangeVolumeMb long The volume of 


ROLLBACK changes, 
in MB.

RollbackTransactionCount long The number of 


changes in memory 
during apply and until 
target commit.

FullLoadCompleted bool -

FullLoadCounters AemTaskFullLoadCounters All numeric data 


concerning Full Load 
events.

EstimatedRecordsForAllTablesCount long The estimated 


number of records 
remaining to be 
loaded into the target 
endpoint.

RecordsCompletedCount long The total number of 


records that have 
completed loading 
into the target 
endpoint.

TablesCompletedCount int The number of tables 


that have been 
loaded into the target 
endpoint.

API Guide - Qlik Enterprise Manager , November 2021 148


3   Enterprise Manager .NET API

Value Type  Description

TablesLoadingCount int The number of tables 


that are currently 
being loaded into the 
target endpoint.

TablesQueuedCount int The number of tables 


that are waiting to be 
loaded due to an 
error.

TablesWithErrorCount int The number of tables 


that could not be 
loaded due to an 
error.

FullLoadEnd string Indicates whether the 


full load process has 
ended.

FullLoadStart string The start time of the 


full load process.

Format: YYY MM DD

Timezone: UTC

FullLoadThroughput AemFullLoadThroughput  -

SourceThroughputRecordsCount int The current source 


throughput, in 
rec/sec.

SourceThroughputVolume int The current source 


throughput, in 
kbyte/sec.

TargetThroughputRecordsCount int The current target 


throughput, in 
rec/sec.

TargetThroughputVolume int The current target 


throughput, in 
kbyte/sec.

API Guide - Qlik Enterprise Manager , November 2021 149


3   Enterprise Manager .NET API

Value Type  Description

MemoryMb long The current utilization 


of memory, in MB. A 
task's memory 
utilization is sampled 
every 10 seconds. 
When the task is not 
running, the value is 
set to zero (0).

CpuPercentage - The current CPU 
usage of the 
Replicate task 
process.

Only 
available 
for 
Replicate 
tasks  
running 
on 
Replicate 
6.2 and 
above. 
When not 
available, 
this 
paramete
r will be 
returned  
as -1.

DiskUsageMb long The current utilization 


of disk space, in MB. 
A task's disk 
utilization is sampled 
every minute.

API Guide - Qlik Enterprise Manager , November 2021 150


3   Enterprise Manager .NET API

Value Type  Description

DataErrorCount long The total number of 


data errors in all 
tables involved in the 
task. The count is 
affected by data 
errors and the Reset 
Data Errors option 
available when you 
drill down to a task.

Options AemCommonSettings  -

ApplyChangesEnabled bool See Task Options.

AuditChangesEnabled bool See Task Options.

FullLoadEnabled bool See Task Options.

StoreChangesEnabled bool See Task Options.

Profile string See Profile 


Parameters.

SourceEndpoint TaskEndpoint  -

Name string The name of the 


source endpoint.

Type string The source endpoint 


type.

TargetEndpoint TaskEndpoint  -

Name string The name of the 


target endpoint.

Type string The target endpoint 


type.

State  AemTaskState The current state of 


the task.
{
STOPPED = 0,
RUNNING = 1,
ERROR = 2,
RECOVERY = 3
}

API Guide - Qlik Enterprise Manager , November 2021 151


3   Enterprise Manager .NET API

Value Type  Description

TaskStopReason AemTaskStopReason  The reason the task 


stopped.
{

NONE = 0,

NORMAL = 1,

RECOVERABLE_ERROR = 
2,

FATAL_ERROR = 3,

FULL_LOAD_ONLY_
FINISHED = 4,

STOPPED_AFTER_FULL_
LOAD = 5,

STOPPED_AFTER_
CACHED_EVENTS = 6,

EXPRESS_LICENSE_
LIMITS_REACHED = 7,

STOPPED_AFTER_DDL_
APPLY = 8,

STOPPED_LOW_MEMORY 
= 9,

STOPPED_LOW_DISK_
SPACE = 10

}
 

LogStreamStaging string If the task is writing 


to/reading from the 
Log Stream staging 
folder, the name of 
the associated Log 
Stream Staging task 
will be returned. 
Otherwise, an empty 
string will be returned.

API Guide - Qlik Enterprise Manager , November 2021 152


3   Enterprise Manager .NET API

Value Type  Description

Message string The message if the 


task stopped due to 
an error.

AssignedTags array Returns the custom 


tags assigned to the 
task. If no tags are 
assigned to the task, 
an empty array will be 
returned.

Return values for Compose tasks
General parameters
Name Type Description

type  string One of the following:

 l AemComposeDWTaskInfoDetailed (for 
Data Warehouse tasks)
 l AemComposeDMTaskInfoDetailed (for 
Data Mart tasks)
 l AemComposeDLTaskInfoDetailed (for 
Data Lake tasks)

project string The name of the Compose project.

profile string See Profile Parameters.

name string The name of the task or workflow appended 


with a double underscore and the project name.

Example:  

mytask__myproject

description string The task description. If there is no description, 


an empty string will be returned.

state string The current task state.

message string The message shown in the event that the task 


ends with an error.

options AemCommonSettings  -

FullLoadEnabled bool Indicates whether the Full Load option is 


enabled. Can be "true" or "false".

ApplyChangesEnabled bool Indicates whether the Change Processing 


option is enabled. Can be "true" or "false".

API Guide - Qlik Enterprise Manager , November 2021 153


3   Enterprise Manager .NET API

Source endpoint parameters
Name Type Description

source_endpoint  TaskEndpoint  -

name string The logical name of the landing database.

type string The landing database type.

target_endpoint parameters
Name Type Description

target_endpoint TaskEndpoint  -

name string The logical name of the storage database.

type string The storage database type.

LoadingCompleted bool Indicates whether the loading process has completed. Can 


be "true" or "false".

LoadingStart string The start time of the loading  process.

Format: YYY MM DD

Timezone: UTC

LoadingEnd string The end time of the loading  process.

Format: YYY MM DD

Timezone: UTC

Loading counters parameters
Name Type Description

LoadingCounters AemTaskFullLoadCounters -

TablesTotalCount int The total number of tables.

TablesCompletedCount int The number of tables that have been 


loaded into the target endpoint.

TablesLoadingCount int The number of tables that are 


currently being loaded into the target 
endpoint.

TablesQueuedCount int The number of tables that are 


waiting to be loaded due to an error.

TablesWithErrorCount int The number of tables that could not 


be loaded due to an error.

CommandsTotalCount int The total number of commands 


executed.

API Guide - Qlik Enterprise Manager , November 2021 154


3   Enterprise Manager .NET API

Name Type Description

CommandsCompletedCount int The total number of commands 


completed.

AssignedTags array Returns the custom tags assigned to 


the task. If no tags are assigned to 
the task, an empty array will be 
returned.

Errors
All of the general errors as well as the errors listed in the table below.

Error responses
Error  Message Description

AEM_TASK_ Replication task{task} on server {server}  The task name is unknown to Qlik 


NOT_FOUND could not be found. Enterprise Manager.

3.16   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 (page 251).

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.

Example: myrepsrv1

API Guide - Qlik Enterprise Manager , November 2021 155


3   Enterprise Manager .NET API

Value Type  Description

schema string The default is all source schemas. Specifying a specific 


schema name will retrieve all tables from the specified 
schema. Specifying a pattern or letters included in the 
schema name will retrieve all tables from schemas that 
match the pattern or that include the specified letters. For 
example, specifying "ad" will retrieve tables from the 
"adventure" and "trademark" schemas.

table string The default is all source tables. Specifying a specific table 


name will retrieve the specified table. Specifying a pattern 
or letters included in the table name will retrieve all tables 
that match the pattern or that include the specified letters. 
For example, specifying "em" will retrieve the "employees" 
and "temp" tables.

includequeued  boolean Whether to retrieve tables in a queued state. Default is 


false.

includeloading  boolean Whether  to retrieve tables in a loading state. Default is 


false.

includecompleted  boolean Whether  to retrieve tables in a completed state. Default is 


false.

includechangeprocessing boolean Whether  to retrieve tables in a Change Processing state 


(that is, tables that are having changes applied to them). 
Default is false.

includeerror boolean Whether  to retrieve tables in an error state. Default is false.

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 enum The current state of the table. 

Errors
All of the general errors as well as the errors listed in the table below.

API Guide - Qlik Enterprise Manager , November 2021 156


3   Enterprise Manager .NET API

Error responses
Error  Message Explanation Description

500 AEM_TABLE_ Failed to retrieve table list for replication task " Returned when the table 


LIST_INNER_ {task}" on server "{server}". Error: "{message}"  list cannot be retrieved.
ERR   

500 AEM_TASK_ Replicate task {task} on server {server} could  The task name is 


NOT_FOUND not be found. unknown to Enterprise 
Manager.

3.17   GetTableStatuses
Retrieves the tables statuses of a specific Replicate task for all tables 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 (for example, suspended) and then perform an operation on them (for 
example, ReloadTable). 

Required User Role: See Required Enterprise Manager permissions (page 251).

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.

Example: myrepsrv1

Task string The Replicate task name.

API Guide - Qlik Enterprise Manager , November 2021 157


3   Enterprise Manager .NET API

Value Type  Description

Schema string The default is all source schemas. Specifying a specific 


schema name will retrieve all tables from the specified 
schema. Specifying a pattern or letters included in the 
schema name will retrieve all tables from schemas that 
match the pattern or that include the specified letters. For 
example, specifying "ad" will retrieve tables from the 
"adventure" and "trademark" schemas.

Table string The default is all source tables. Specifying a specific table 


name will retrieve the specified table. Specifying a pattern 
or letters included in the table name will retrieve all tables 
that match the pattern or that include the specified letters. 
For example, specifying "em" will retrieve the "employees" 
and "temp" tables.

IncludeQueued  boolean Whether to retrieve tables in a queued state. Default is 


false.

IncludeLoading boolean Whether  to retrieve tables in a loading state. Default is 


false.

IncludeCompleted  boolean Whether  to retrieve tables in a completed state. Default is 


false.

IncludeChangeProcessing boolean Whether  to retrieve tables in a Change Processing state 


(that is, tables that are having changes applied to them). 
Default is false.

IncludeError  boolean Whether  to retrieve tables in an error state. Default is false.

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.

API Guide - Qlik Enterprise Manager , November 2021 158


3   Enterprise Manager .NET API

Name Type Description

State    enum An enum reflecting the table state.

See state (page 185).

DataErrorsCount    int64 The number of data errors encountered when replicating the table.

table_full_load_info return values
Name Type Description

StartTime    string Date-time of when the table full load started.  T


  imezone: UTC ; 
Style: ISO8601 (consistent with AemGetTaskDetails). 

EndTime    string Date-time of when the table full load started.  T


  imezone: UTC ; 
Style: ISO8601 (consistent with AemGetTaskDetails). 

EstimatedRowCount    int64 Relevant only if table in certain states (loading/queued).  

EstimatedEndTime    string Relevant only if table in certain states (loading/queued).   


Timezone: UTC ; Style: ISO8601 (consistent with 
AemGetTaskDetails). 

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. 

TableCdcInfo 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.  T


  imezone: 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 as well as the errors listed in the table below.

API Guide - Qlik Enterprise Manager , November 2021 159


3   Enterprise Manager .NET API

Error responses
Error Message Description

AEM_SERVER_ Replicate server {server} could not be found. Server name unknown to 


NOT_FOUND Qlik Enterprise Manager.

AEM_TASK_NOT_ Replicate task {task} on server {server} could not  The task name is unknown 


FOUND be found. to Enterprise Manager.

AEM_TABLE_ Failed to retrieve table statuses for replication task  Returned when the table 


STATUSES_ "{task}" on server "{server}". Error: "{message}"  statuses cannot be 
INNER_ERR    retrieved.

3.18   DeleteTask
Deletes the specified task. The task's logs will be deleted only if deletetasklogs=true is set.

Required User Role: See Required Enterprise Manager permissions (page 251).

Syntax
public void DeleteTask(
string server,
string task,
bool deletetasklogs = false
);

Parameters
Parameters
Parameter Type  Description

server string The server where the task is defined.

task string The task to be deleted.

deletetasklogs bool Whether to delete the task logs or not.

Errors
Error responses
Error  Message Description

AEM_TASK_ Replication task {task] on server  Returned if the task name is unknown to 


NOT_FOUND {server} could not be found.   Qlik Enterprise Manager.

AEM_DELETE_ Replication task {task] on server  Returned if Enterprise Manager encounters 


TASK_INNER_ {server} could not be deleted due to an  an error/exception when trying to delete the 
ERR error. task.

API Guide - Qlik Enterprise Manager , November 2021 160


3   Enterprise Manager .NET API

Error  Message Description

AEM_DELETE_ Replication task {task] on server  Returned if Enterprise Manager encounters 


TASK_ERR {server} could not be deleted due to an  an error when trying to delete the task.
error. {2}

AEM_TASK_ Replication task {task] on server  Returned if the replication  task was running 


NOT_ {server} must be stopped before it can  when AemDeleteTask attempted to delete it.
STOPPED be deleted.

3.19   ExportTask
Export definitions from the selected task on the selected server. The definitions always include task 
settings, tables/table patterns (include/exclude), table settings and global transformations. The endpoint 
definition is only exported along with the task definition if with endpoints=true is set.

Required User Role: See Required Enterprise Manager permissions (page 251).

Syntax
public string ExportTask(
string server,
string task,
bool withendpoints = false
);

Parameters
Parameters
Parameter Type  Description

server string The name of the server on which the task is defined.

task string The task to be exported.

withendpoints bool Whether or not to export the endpoint definitions as well.

Return values
Exported task JSON file as a string

Errors
Error responses
Error Message Description

AEM_METHOD_ AemExportTask is only supported on Replicate  AemExportTask is only 


NOT_ 5.5 or above. supported on Replicate 5.5 or 
SUPPORTED_ above.
VERSION

API Guide - Qlik Enterprise Manager , November 2021 161


3   Enterprise Manager .NET API

Error Message Description

AEM_EXPORT_ Failed to export task {task} from Replicate  Export all cannot be carried out 


TASK_NO_ server {server} as the logged in user does not  because the user does not have 
PERMISSION_ have permission to access one or both of the  permissions on one or more 
ON_ENDPOINT task's endpoints. endpoints.

3.20   ImportTask
Import a single task's JSON definitions provided in the request body into the requested server repository on 
the selected server.

The ImportTask method enables importing all valid JSON definitions provided in the request body.

This includes task settings, tables/table patterns (include/exclude), table settings and global 
transformations.

Information about endpoints is included if it was included in the JSON file.

When you import a task, Items that existed in the target server before the import and have no new JSON 
definition in the request body are not modified and not removed. This means that ImportTask provides no 
way of removing old definitions that are no longer needed.

Required User Role: See Required Enterprise Manager permissions (page 251).

Syntax
public void ImportTask(
string payload,
string server,
string task
);

Parameters
Parameters
Parameter Type  Description

payload  string A JSON document to import.

server string The name of the server to import to.

task string Name of the task to import.

Return values
N/A

API Guide - Qlik Enterprise Manager , November 2021 162


3   Enterprise Manager .NET API

Errors
Error responses
Error Message Description

AEM_IMPORT_ Failed to import task {task} to replication  The task cannot be imported because 


TASK_NO_ server {server} as the logged in user does  it includes endpoint definitions, and 
PERMISSION_ not have permission to add or modify  the user does not have permissions to 
ON_ENDPOINT endpoints. insert endpoints.

AEM_IMPORT_ Failed to import task {task} to replication  The task cannot be imported because 


TASK_ server {server} as the JSON file contains  the stream contains items that cannot 
CONTAIN_ unsupported objects. be imported (such as remote 
ALIEN_ITEMS machines).

AEM_IMPORT_ Failed to import task {task} to replication  The task cannot be imported because 


TASK_NAME_ server {server} as the JSON file  contains  the stream contains conflicting tasks.
DIFFER conflicting tasks.

AEM_IMPORT_ Failed to import task to replication server  The task cannot be imported since the 


TASK_ {server} as the JSON file  contains multiple  stream contains multiple tasks, and 
CONTAINS_ tasks. To import multiple tasks, use  the method can only import a single 
MULTIPLE_ AemImportAll instead. task.
TASKS

AEM_TASK_ Failed to import task {task} as the task is  Occurs when trying to import a 


NOT_ running on server {server}. Stop the task  running task.
IMPORTABLE and then try again.

AEM_IMPORT_ Failed to import task {task} to replication  The task cannot be imported as the 


TASK_ server {server} as the JSON file is empty. specified JSON file is empty.
CONTENT_
EMPTY

AEM_IMPORT_ Failed to import task {task} to server  The task cannot be imported as the 


TASK_ {server} as the endpoint names in the  endpoint names in the specified 
ENDPOINT_ JSON file’s “task” and “databases”  JSON file's “task” and “databases” 
DIFFER sections are not the same. sections are different.

AEM_IMPORT_ Failed to import task {task} to replication  The task cannot be imported as one of 


TASK_NO_ server {server} as the {role} endpoint  the endpoints specified in the 
ENDPOINT_IN_ {endpoint} does not exist on the target  exported JSON file does not exist on 
SERVER server. the target server.

AEM_IMPORT_ Replicate (server '{0}') import unable to  The task cannot be imported since the 


TASK_CANNOT_ delete task. Error message '{2} task that it was supposed to override 
OVERRIDE_ cannot be deleted.
TASK

3.21   StopTask
Stop the selected task.

API Guide - Qlik Enterprise Manager , November 2021 163


3   Enterprise Manager .NET API

Required User Role: See Required Enterprise Manager permissions (page 251).

Syntax
public AemStopTaskResp StopTask(
string server,
string task,
int timeout = 30
);

Parameters
Parameters
Parameter Type  Description

server string The name of the server.

task string  l Replicate: - The name of the task.


 l Compose: - The name of the task or workflow appended with a 
double underscore and the project name.

Example:  

mytask__myproject

timeout int Time in seconds to wait until getting a response.

Return values
AemStopTaskResp

Return values
Parameter Type  Description

State AemTaskState The current state of the task.

  {

STOPPED = 0,

RUNNING = 1,

ERROR = 2,

RECOVERY = 3

ErrorMessage string The description of the error.

API Guide - Qlik Enterprise Manager , November 2021 164


3   Enterprise Manager .NET API

Errors
Error responses
Error Message Description

AEM_TASK_ Replicate task {task} on server {server} is  Cannot stop a task that is in 


ALREADY_STOPPED already stopped. Stopped state.

AEM_STOP_TASK_ Failed to stop Replicate task {0} on server  An error occurred while trying 


INNER_ERR {1}: <{2}> to stop the task.

AEM_STOP_TASK_ A timeout occurred when trying to stop  A timeout occurred while 


TIMEOUT Replicate task {0} on server {1} trying to stop the task.

3.22   RunTask
Run the selected task according to the specified option.

Required User Role: See Required Enterprise Manager permissions (page 251).

Syntax
public AemRunTaskResp RunTask(
AemRunTaskReq payload,
string server,
string task,
AemRunTaskOptions option = AemRunTaskOptions.RESUME_PROCESSING,
int timeout = 30
);

Parameters
Parameters
Parameter Type  Description

payload AemRunTaskReq -

Cdcposition string  The cdcposition parameter can either be specified 


inline or in an external JSON file. The format for both 
is described in Request body format (page 166) 
below.

Mandatory for all AemRunTask options.

server string  The name of the server on which to run the task.

API Guide - Qlik Enterprise Manager , November 2021 165


3   Enterprise Manager .NET API

Parameter Type  Description

task  string   l Replicate: - The name of the task.


 l Compose: - The name of the task or workflow 
appended with a double underscore and the 
project name.

Example:  

mytask__myproject

option AemRunTaskOptions  For replication tasks, any of the options (except 


NONE) can be specified. For Compose tasks, only 
{
NONE = 0, NONE can be specified.
RESUME_PROCESSING = 1,
RELOAD_TARGET = 2,
RESUME_PROCESSING_FROM_
TIMESTAMP = 3,
METADATA_ONLY_RECREATE_
ALL_TABLES = 4,
METADATA_ONLY_CREATE_
MISSING_TABLES = 5,
RECOVER_USING_LOCALLY_
STORED_CHECKPOINT = 6,
RECOVER_USING_CHECKPOINT_
STORED_ON_TARGET = 7
}

timeout int The time in seconds to wait for a response.

Request body format
If the task option (see above) is RESUME_PROCESSING_FROM_TIMESTAMP, then use the following 
format:

JSON File Format:

{"cdcposition":"timestamp"}

Example:  

{"cdcposition":"2017-03-07T11:19:03"}

Inline Format:

"{\"cdcposition\":\"timestamp\"}"

Example:  

"{\"cdcposition\":\"2017-03-07T11:19:03\"}"

API Guide - Qlik Enterprise Manager , November 2021 166


3   Enterprise Manager .NET API

If the task option (see above) is RECOVER_USING_CHECKPOINT_STORED_ON_TARGET, then use 
the following format:

JSON File Format:

{"cdcposition":"target_checkpoint"}

Example:  

{"cdcposition":"Checkpoint:V1#1#timestamp:2017-02-14T12:34:44#0#0#*#0#0"}

Inline Format:

"{\"cdcposition\":\"target_checkpoint\"}"

Example:  

"{\"cdcposition\":\"Checkpoint:V1#1#timestamp:2017-02-14T12:34:44#0#0#*#0#0\"}"

Return value
AemRunTaskResp

Return value parameters
Parameter Type  Description

ErrorMessage string The description of the error.

State AemTaskState The current state of the task.

STOPPED = 0,  R
  UNNING = 1,

ERROR = 2,

RECOVERY = 3

Errors
Error responses
Error Message Description

AEM_TASK_ Replicate task {task} on server {server} is  The task cannot be run because it is 


ALREADY_ already running. already running.
RUNNING

AEM_TASK_IN_ Replicate task {task} on server {server}  The task cannot be run because it is in 


RECOVERY cannot be run as it is in a recovery state. Recovery state.

API Guide - Qlik Enterprise Manager , November 2021 167


3   Enterprise Manager .NET API

Error Message Description

AEM_WRONG_ Replicate task {task] on server {server}  When the option Tables are already 


OPTION_FOR_ cannot be run with cdcposition {position}  loaded. Start processing changes 
CDCPOSITION and option {option}. Change the option to  from Timestamp is selected in the 
RESUME_PROCESSING_FROM_ Advanced Run Options dialog box for 
TIMESTAMP or RECOVER_USING_ a task, the option sent to the API must 
CHECKPOINT_STORED_ON_ be RESUME_PROCESSING_FROM_
TARGET. TIMESTAMP.

AEM_CDC_ The cdcposition parameter value for  The cdcPosition parameter must follow 


POSITION_ERR_ Replicate task {task} on server {server} is  this format: YYYY-MM-
FORMAT not in the correct format ('YYYY-MM- DDThh:mm:ssZ
DDThh:mm:ssZ').
Parameters: task name and server 
name

AEM_RUN_ Replicate task {task} on server {server}  The task does not assume a Running 


TASK_TIMEOUT timed out when requested to “Run”. state or any other steady state (error o 
stopped).

AEM_RUN_ Replicate task {task} on server {server}  Replicate experienced an 


TASK_INNER_ encountered an error when requested to  error/exception when trying to run the 
ERR run. task.

AEM_RUN_ Replicate task {task} on server {server}  Task validation revealed that the task 


TASK_NO_SRC_ has no source or target endpoints. is missing a source and a target.
NO_TRG

AEM_RUN_ Replicate task {task} on server {server}  Task validation revealed that the task 


TASK_NO_SRC has no source endpoint. is missing a source.

AEM_RUN_ Replicate task {task} on server {server}  Task validation revealed that the task 


TASK_TRG has no target endpoint. is missing a target

AEM_RUN_ Replicate task {task} on server {server}  Task validation of a unidirectional task 


TASK_NOT_FL_ cannot be run without at least one of the  revealed that the replication option 
NOR_CDC replication options enabled (Full Load,  definition for the task is missing (Full 
Apply Changes, or Store Changes). Load, Apply Changes, or Store 
Changes).

AEM_RUN_BIDI_ Replicate task {task} on server {server}  Task validation of a unidirectional task 


TASK_NO_FL_ cannot be run without at least one of the  revealed that the replication option 
NOR_CDC replication options enabled (Full Load or  definition for the task is missing (Full 
Apply Changes). Load, Apply Changes, or Store 
Changes).

3.23   GetEndpointList
Retrieves a list of endpoints and their properties for the specified server.

Required User Role: See Required Enterprise Manager permissions (page 251).

API Guide - Qlik Enterprise Manager , November 2021 168


3   Enterprise Manager .NET API

Syntax
public AemGetEndpointListResp GetEndpointList(
string server
);

Parameters
Parameters
Parameter Type  Description

server string The name of the server on which the endpoints are defined.

Return values
AemGetEndpointListResp

Return values
Parameter Type  Description

EndpointList List<Endpoint> An array of Endpoint objects.

Description  string The endpoint description

IsLicensed  bool  Indicates whether the endpoint is licensed on this server.

Name  string The endpoint name.

Role EndpointRole  The endpoint role: SOURCE or TARGET.

ALL = 0,

SOURCE = 1,

TARGET = 2,

BOTH = 3

Type  string The endpoint type - for example, Oracle.

Errors
Error responses
Error Message Description

AEM_ENDPOINT_ Failed to retrieve endpoints list  Replicate experienced an error/exception 


LIST_INNER_ERR from Replicate server {name}. when trying to retrieve the endpoint list.

API Guide - Qlik Enterprise Manager , November 2021 169


3   Enterprise Manager .NET API

3.24   DeleteEndpoint
Description
Deletes the specified endpoint. Note that an endpoint can only be deleted if it is not in use by any task.

Required User Role: See Required Enterprise Manager permissions (page 251).

Syntax
public void DeleteEndpoint(
string server,
string endpoint
);

Parameters
Parameters
Parameter Type  Description

server - The server where the endpoint is defined.

endpoint - The name of the endpoint to be deleted. 

Return values
N/A

Errors
Error responses
Error Message Description

AEM_ Replicate endpoint {endpoint} on server  Endpoint name unknown to Qlik 


ENDPOINT_ {server} could not be found. Enterprise Manager.
NOT_FOUND

AEM_DELETE_ Failed to delete Replicate endpoint  Replicate encountered an 


ENDPOINT_ {endpoint} from server {server}. error/exception when trying to delete 
INNER_ERR the endpoint.

AEM_ Replicate endpoint {endpoint} on server  The Replicate endpoint must be 


ENDPOINT_ {server} cannot be deleted as it is currently in  removed from its associated tasks 
IS_IN_USE use by one or more tasks. before it can be deleted.

3.25   ReconfigureEndpointNoWait 
Call this method to override the source endpoint settings with settings from another endpoint of the same 
type. This method also supports automatically stopping and then resuming all tasks that are using the 
source endpoint (which is required for unplanned switchovers).

API Guide - Qlik Enterprise Manager , November 2021 170


3   Enterprise Manager .NET API

 l Supported with the Oracle source endpoint only.
 l Using this method, requires you to set up relevant Qlik Replicate task(s) with three 
separate source endpoints - two inactive source endpoints defined with the primary and 
secondary database connection settings, and one active source endpoint (initially 
defined with the primary database connection settings). 
For detailed instructions, see Reconfiguring endpoints (page 249).

Required User Role: See Required Enterprise Manager permissions (page 251).

Syntax
public void ReconfigureEndpointNoWait(
string server,
string endpoint,
string configuration = null,
bool recycle = true
);

Parameters
Parameters
Parameter Type  Description

server string The name of the Replicate server (as defined in Qlik Enterprise Manager) 


on which the task(s) are running.

endpoint string  The name of the source endpoint defined for the Replicate task(s).

configuration string  The name of the secondary endpoint (or the primary endpoint when 


reverting the settings).

recycle bool Whether to stop and resume the Replicate task(s) automatically. The 


default is "true", that is, when an unanticipated switchover occurs, tasks 
using the source endpoint will be automatically stopped and then resumed 
after the source endpoint is updated with the settings from the secondary 
endpoint.

Set to "false" for planned switchovers (such as migrating to a production 
database or switching back to the primary database).

Return values
N/A

Errors 
All of the general errors as well as the errors listed in the table below.

API Guide - Qlik Enterprise Manager , November 2021 171


3   Enterprise Manager .NET API

Error responses
Error Message Description

AEM_ENDPOINT_ Replicate endpoint "{endpoint}" on  The specified endpoint could not be found.


NOT_FOUND server "{server}" could not be 
found.

AEM_ Failed to reconfigure endpoint " Qlik Enterprise Manager failed to 


RECONFIGURE_ {endpoint}" on server "{server}".  reconfigure the endpoint with the settings 
ENDPOINT_ Error: "{message}" of the secondary endpoint.
INNER_ERR

3.26   ExportAll
Export all definitions from the requested server repository on the selected server (server settings, tasks, 
endpoints, and so on). The definitions are exported to a JSON file.

Required User Role: See Required Enterprise Manager permissions (page 251).

Syntax
public string ExportAll(
string server
);

Parameters
Parameters
Parameter Type  Description

server  string  The name of the server containing the repository to be exported.

Return values
Export JSON file as a string.

Errors
Error responses
Error Message Description

AEM_METHOD_ AemExportAll is only supported on Replicate  The method requires Replicate 


NOT_ 5.5 or above. 5.5 or above.
SUPPORTED_
VERSION

AEM_EXPORT_ Failed to export all tasks from Replicate server  Export all cannot be carried out 


NO_ {server} as the logged in user does not have  because the user does not have 
PERMISSION_ permission to export one or more of the defined  permissions on one or more 
ON_TASK tasks. tasks.

API Guide - Qlik Enterprise Manager , November 2021 172


3   Enterprise Manager .NET API

Error Message Description

AEM_EXPORT_ Failed to export all tasks from server {server}  Export all cannot be carried out 


NO_ as the logged in user does not have permission  because the user does not have 
PERMISSION_ to export one or more of the defined endpoints. permissions on one or more 
ON_ENDPOINT endpoints.

3.27   ImportAll
Import the JSON definitions provided in the request body into the requested server repository on the 
selected server. The ApiImportAll method uses "merge" semantics. In particular: All valid JSON definitions 
provided in the request body will be imported.

This includes server settings, task settings, endpoints, and other definitions.

Items that existed in the target server before the import and have no new JSON definition in the request 
body will not be modified and in particular will not be removed. This means that ApiImportAll provides no 
way of removing old definitions that are no longer needed.

Required User Role: See Required Enterprise Manager permissions (page 251).

Syntax
public void ImportAll(
string payload,
string server
);

Parameters
Parameters
Parameter Type  Description

payload  string A JSON document to import.

server string The name of the server to import to.

Return values
N/A

Errors
Error responses
Error Message Description

AEM_METHOD_ AemImportAll is only supported on Replicate  The method requires Replicate 5.2 


NOT_ 5.2 or above. or above.
SUPPORTED_
VERSION

API Guide - Qlik Enterprise Manager , November 2021 173


3   Enterprise Manager .NET API

Error Message Description

AEM_IMPORT_ Failed to import all tasks to replication server  Stream cannot be imported 


NO_ {server} as the logged in user does not have  because the user does not have 
PERMISSION_ permission to add tasks. the permissions to add tasks.
ON_TASK

AEM_IMPORT_ Failed to import all tasks to replication server  Stream cannot be imported 


NO_ {server} as the logged in user does not have  because the user does not have 
PERMISSION_ permission to add endpoints. the permissions to add endpoints
ON_ENDPOINT

AEM_IMPORT_ Failed to import all tasks to replication server  Stream cannot be imported 


CONTENT_ {server} as the JSON file is empty. because it contains no content.
EMPTY

AEM_IMPORT_ Failed to import all tasks to replication server  Stream cannot be imported 


INVALID_ {server} as the JSON file  contains invalid  because it contains invalid 
CONTENT content. content.

3.28   ExportAuditTrail
Export  audit trail data from all servers. 

Required User Role: See Required Enterprise Manager permissions (page 251).

Syntax
public string ExportAuditTrail(
string startTimestamp,
string endTimestamp
);

Parameters
Parameters
Parameter Type  Description

start_timestamp string start timestamp: (UTC format or Ticks)

Example: 2020-06-30T16:15:00Z (UTC format)

Example: 637410358250082194 (Ticks)

end_timestamp string end timestamp: (UTC format or Ticks)

Example: 2020-06-30T16:15:00Z (UTC format)

Example: 637410358250082194 (Ticks)

null : latest audit trail record

API Guide - Qlik Enterprise Manager , November 2021 174


3   Enterprise Manager .NET API

Return values
JSON File (stream)

Errors
Error responses
Error Message Description

AEM_INVALID_ Timestamp is not a timestamp. Timestamp is not valid.


TIMESTAMP_
Timestamp format should be 'yyyy'-
FORMAT
'MM'-'dd'T'HH':'mm':'ss'Z or Ticks.

AEM_EXPORT_ Failed to export audit trail. Time range is not valid.


INNER_ERR
AUDIT-E-INVRANGE. The end time is 
before the start time.

UNAUTHORIZED_ Unauthorized Request. request:  User does not have permission to 


REQUEST AemExportAuditTrail  access the audit trail information.

3.29   ReloadTable
Reload a specific table.

Required User Role: See Required Enterprise Manager permissions (page 251).

Syntax
public void ReloadTable(
string server,
string task,
string schema = null,
string table = null
);

Parameters
Parameters
Parameter Type  Description

server string The name of the server.

task string The name of the task.

schema string The name of the table schema to reload.

table string The name of the table to reload.

Return values
N/A

API Guide - Qlik Enterprise Manager , November 2021 175


3   Enterprise Manager .NET API

Errors
Error responses
Error Message Description

AEM_INVALID_ Failed to reload table {table} as Full Load  The table could not be reloaded because 


TASK_NOT_FL is not enabled for task {task}. the task's Full Load replication option is 
not enabled.

AEM_INVALID_ Failed to reload table  as this operation is  The table could not be reloaded because 


TASK_NT_ not supported with the File Channel  the task's source endpoint is File 
NTSUPPEP source endpoint. Channel.

AEM_ Failed to reload table {schema}.{table}  An error was encountered while trying to 


RELOAD_ for replication task {task} on server  reload the specified table.
TABLE_ERR {server}: {message}

3.30   TestEndpoint
Connect to an endpoint to test connectivity and configuration (permissions, CDC configuration, and so on).

Required User Role: See Required Enterprise Manager permissions (page 251).

Syntax
public AemTestEndpointResp TestEndpoint(
string server,
string endpoint,
int timeout = 60
);

Parameters
Parameters
Parameter Type  Description

server string The name of the server on which the endpoint is defined.

endpoint string The name of the endpoint.

timeout int Time in seconds to wait until getting a response.

Return values
AemTestEndpointResp

API Guide - Qlik Enterprise Manager , November 2021 176


3   Enterprise Manager .NET API

Return values
Parameter Type  Description

Status AemEndpointState  -

UNKNOWN = 0,

CONNECTED = 1,

ERROR = 2

Message string Short description of the error.

DetailedMessage string Detailed description of the error.

Errors
Error responses
Error Message Description

AEM_TEST_ A timeout occurred while testing the connection  Connection was not 


ENDPOINT_ for endpoint {endpoint} on Replicate server  established within 60 
CONNECTION_ {server}. seconds.
TIMEOUT

AEM_ENDPOINT_NOT_ Replicate endpoint {0} on server {1} could not be  The specified endpoint 


FOUND found. could not be found.

3.31   DeleteOldChangeData
The method can be called on an ad-hoc basis to delete processed Change Data Partitions created on the 
target database by a Replicate task. 

 l Partitions will only be deleted if the Change Data Partitioning and Partition Retention 
options are enabled in the Replicate console. 
For more information, refer to the Qlik Replicate Setup and User Guide.
 l Partitions will only be deleted if the task is running. If the task is not running, the 
partitions will be deleted the next time the task runs.
 l Only partitions that are not locked by a consuming application will be deleted.

Required User Role: See Required Enterprise Manager permissions (page 251).

Syntax
public void DeleteOldChangeData(
AemDeleteOldChangeDataReq payload,
string server,

API Guide - Qlik Enterprise Manager , November 2021 177


3   Enterprise Manager .NET API

string task
);

Parameters
Parameters
Parameter Type Description

AemDeleteOldChangeDataReq payload The point in time after which partitions can be 


deleted, which can either be specified as a timestamp 
or as an offset. If a retention barrier is set, partitions 
will be deleted up to the retention barrier date, 
regardless of the specified timestamp/offset.

Timestamp Format: 

[Date]

(yyyy'-'MM'-'dd'T'HH':'mm':'ss'Z')

Example:  

2020-06-30T16:15:00Z

Offset Format :

[Period]

Format ISO 8601 duration

Example:  

P1M3DT1H2M

server string The name of the server on which the task is running.

task string  The name of the task.

Error response
Error responses
Message Text Description

AEM_TASK_ Replication task {task] on server {server} could not be  Returned when an 


NOT_FOUND found.  unknown task name is 
encountered.

API Guide - Qlik Enterprise Manager , November 2021 178


3   Enterprise Manager .NET API

Message Text Description

AEM_INVALID_ The specified deletion age does not conform to the  Returned when the 


TIMESTAMP_ expected timestamp or offset format. Timestamp  specified deletion age 
OR_OFFSET_ format should be yyyy'-'MM'-'dd'T'HH':'mm':'ss'Z'.  does not conform to the 
FORMAT Offset format should conform to ISO 8601 duration. expected timestamp or 
offset format.

AEM_DELETE_ Failed to request deletion of old change data for task  Returned when an error is 


OLD_CHANGE_ {task} on server {server}.  encountered during 
DATA_INNER_ partition deletion.
Message: {error_message}
ERR

3.32   SetChangeDataRetentionBarrier
The method can be used to:   

 l Set a retention barrier for deleting consumed partitions. Setting a retention barrier will initiate 
periodic deletion of consumed Change Data Partitions from the target database defined for the 
specified task. Partitions will be deleted according to the Allow consuming applications to delete 
partitions every interval set on Replicate Server, and up to the specified "retention_point".
 l Remove the retention barrier, thereby stopping periodic deletion of consumed Change Data 
Partitions.

 l Partitions will only be deleted if the Change Data Partitioning and Partition Retention 
options are enabled in the Replicate console. 
 l Partitions will only be deleted if the task is running. If the task is not running, the 
partitions will be deleted the next time it runs.
 l Only partitions that are not locked by a consuming application will be deleted.

Required User Role:   See Required Enterprise Manager permissions (page 251).

Syntax
public void SetChangeDataRetentionBarrier(
AemSetChangeDataRetentionBarrierReq payload,
string server,
string task
);

API Guide - Qlik Enterprise Manager , November 2021 179


3   Enterprise Manager .NET API

Parameters
Parameters
Parameter Type Description

payload AemSetChangeDataRetentionBarrierReq Payload for Setting a Retention 


Barrier:

retention_point=timestamp

application=application_name

Where:

 l timestamp is the date up to which 
partitions can be deleted. The 
timestamp must be in the 
following format: (yyyy'-'MM'-
'dd'T'HH':'mm':'ss'Z'). 
 l application_name is the name of 
the consuming application.

Example:  

retention_point=2020-06-30T16:15:00Z

application=Compose

Payload for Removing the Retention 
Barrier:

retention_point=

application=application_name

Where application_name is the name of 
the consuming application.

server string The name of the server on which the 


task is running.

task string  The name of the task.

Error response
Error responses
Error Message Description

AEM_TASK_NOT_ Replication task {task] on server {server} could  Returned when an unknown 


FOUND not be found.  task name is encountered.

API Guide - Qlik Enterprise Manager , November 2021 180


3   Enterprise Manager .NET API

Error Message Description

AEM_INVALID_ The specified partition retention barrier does  Returned when the specified 


TIMESTAMP_ not conform to the expected timestamp  format.  partition retention barrier does 
FORMAT Timestamp format should be yyyy'-'MM'- not conform to the expected 
'dd'T'HH':'mm':'ss'Z'. timestamp  format.

AEM_SET_ Failed to set change data retention barrier for  Returned when an error is 


CHANGE_DATA_ task {task} on server {server}.  encountered when trying to set 
RETENTION_ the retention barrier.
Message: {error_message}
BARRIER_INNER_
ERR

3.33   GetChangeDataRetentionBarrier
Returns the date of the earliest partition retention barrier when multiple partition retention barriers have 
been set.

When different retention barriers have been set by multiple consuming applications, Replicate will delete 
old Change Data partitions up to the   earliest partition retention barrier.

For information on setting a partition retention barrier, see SetChangeDataRetentionBarrier (page 179).

Required User Role: See Required Enterprise Manager permissions (page 251).

Syntax
public AemGetChangeDataRetentionBarrierResp GetChangeDataRetentionBarrier(
string server,
string task
);

Parameters
Parameters
Parameter Type Description

server string The name of the server on which the task is running.

task string  The name of the task.

Response
Response parameters
Name Type Description

application string The name of the consuming application that set the 


earliest partition retention barrier.

retention_ datetime The date of the earliest partition retention barrier.


point
Format: yyyy'-'MM'-
'dd'T'HH':'mm':'ss'Z'

API Guide - Qlik Enterprise Manager , November 2021 181


3   Enterprise Manager .NET API

Error response
Error responses
Error Message Description

AEM_TASK_NOT_FOUND Replication task {task] on  Returned when an unknown task name 


server {server} could not be  is encountered.
found. 

AEM_GET_CHANGE_ Failed to get change data  Returned when an error is encountered 


DATA_RETENTION_ retention barrier for task {task}  while attempting to get the earliest 
BARRIER_INNER_ERR on server {server}.  partition retention barrier.

Message: {error_message}

3.34   Parameters
The following table lists all parameters used in the response body, along with their values.

Parameters
Parameter 
Value / Description
Name

Server State  l MONITORED: The server is being monitored, the Qlik Enterprise Manager is 
connected and synchronized successfully.
 l ERROR: Qlik Enterprise Manager fails to connect and monitor the server.
 l NOT_MONITORED: The server is not being monitored.

Server Platform  l WINDOWS
 l LINUX

License State  l LICENSE_VALID
 l LICENSE_INVALID_CHECKSUM
 l LICENSE_EXPIRED NO_LICENSE
 l MACHINE_NOT_LICENSED
 l INVALID_LICENSE

Endpoint Role Specifies whether an endpoint is being used as a source or a target in a Replicate 
task.

 l SOURCE
 l TARGET

API Guide - Qlik Enterprise Manager , November 2021 182


3   Enterprise Manager .NET API

Parameter 
Value / Description
Name

Task State  l RUNNING: The task is running.
 l STOPPED: The task has not been run yet or has stopped running at some 
point during the replication.
 l ERROR: The task has stopped due to a fatal error.
 l RECOVERING: The task has detected an error and is trying to recover. After 
a limited number of attempts, the task either recovers and the state returns to 
RUNNING, or the task fails and the state turns to ERROR.

Task options  l full_load_enabled [bool]: Creates all files or tables at the target endpoint, 
automatically defines the metadata that is required at the target, and 
populates the tables with data from the source.
 l apply_changes_enabled [bool]: Updates all changes made to files and 
tables that were created during the full load. Applied changes include inserts, 
updates, and removal of items.
 l store_changes_enabled [bool]: Stores changes in Change tables. This value 
and the audit_changes_enabled value are mutually exclusive.
 l audit_changes_enabled [bool]: Stores changes in a single audit table. This 
value and the store_changes_enabled_value are mutually exclusive.

Task Stop   l NONE: Indicates that a task is running and no Stop reason is prevalent.
reason  l NORMAL: Indicates that the task was stopped by the user.
 l RECOVERABLE_ERROR: Indicates that the task is still active, but that there 
is a temporary problem, such as a missing connection. As soon as the error 
state is resolved, Replicate restarts the task.
 l FATAL ERROR: Indicates that the task stopped and the error must be 
resolved manually. The task cannot be started again until the error has been 
resolved.
 l FULL_LOAD_ONLY_FINISHED: Indicates that the task only finished full 
load.
 l STOPPED_AFTER_FULL_LOAD: Indicates that the task stopped after full 
load. Cached changes may or may not have been applied.
 l STOPPED_AFTER_CACHED_EVENTS: Indicates that the task stopped 
after cached changes were applied.
 l EXPRESS_LICENSE_LIMITS_REACHED: The task definition includes 
actions that are not included with Express license privileges.
 l STOPPED AFTER_DDL_APPLY: Indicates that the task stopped after 
DDL statements were applied.
 l STOPPED_LOW_MEMORY: Indicates that the task stopped due to low 
memory.
 l STOPPED_LOW_DISK: Indicates that the task stopped due to low disk 
space.

API Guide - Qlik Enterprise Manager , November 2021 183


3   Enterprise Manager .NET API

Parameter 
Value / Description
Name

Source/target   l RUNNING: The endpoint is running.
status  l ERROR: File channel only. Cannot send files to another endpoint. Indicated 
by an asterisk (*) in the user interface.
 l DISCONNECTED: Information that is provided by all targets and Oracle 
sources that cannot establish a successful connection. Other sources stop the 
task. Indicated by an asterisk (*) in the user interface.
 l WARNING: The target is applying changes one by one instead of bulk to find 
the problem. Indicatedby an asterisk (*) in the user interface.

Profile  l Unidirectional: A Replicate task that replicates  from a source endpoint to a 
target endpoint.
 l Bidirectional: A Replicate task that replicates changes from the source  to the 
target, and vice versa.
 l Log Stream: A Replicate task that captures changes from a single source and 
stores them on Replicate Server for replication to one or more targets.
 l Qlik Cloud: A Qlik Cloud Landing task in Replicate. For more information, see 
Hybrid Data Delivery.
 l Data Storage: A data storage task in a Compose Data Lake project.
 l Data Warehouse: A data warehouse task in a Compose Data Warehouse 
project.
 l Data Mart: A data mart task in a Compose Data Warehouse project.
 l Compactor: A Compose system task that merges the changes (i.e. history) 
from the delta_hds folder with the hds folder and then deletes the delta_hds 
folder.
 l Workflow: A workflow task in Compose.
 l Provisioning: A provisioning task in Compose for Data Lakes 6.6.

Source type Source and target endpoint types should be specified in the same format that they 
appear in the Type drop-down list (when adding a new endpoint in Enterprise 
Manager). For information on how to add an endpoint in Enterprise Manager, refer to 
the Enterprise Manager Setup and User Guide.

Target type -

API Guide - Qlik Enterprise Manager , November 2021 184


3   Enterprise Manager .NET API

Parameter 
Value / Description
Name

Run options  l RESUME_PROCESSING: Resumes task execution from the point that it was 
stopped. 
 l RELOAD_TARGET: Re-starts the full-load replication process if the task was 
previously run.
 l RESUME_PROCESSING_FROM_TIMESTAMP: Starts the CDC replication 
task from a specific point.
 l RECOVER_USING_LOCALLY_STORED_CHECKPOINT: Recovers a task 
using the recovery state stored locally in the task folder (located under the 
Data folder).
 l RECOVER_USING_CHECKPOINT_STORED_ON_TARGET: Recovers a 
task using the CHECKPOINT value from the attrep_txn_state table 
(created in the target database).   

This option is only available if the Store task recovery data in 
target database option is enabled in the Changes Processing 
Tuning tab of the Task Settings dialog box.

 l METADATA_ONLY_RECREATE_ALL_TABLES: Recreates the target 
tables defined for full load.
 l METADATA_ONLY_CREATE_MISSING_TABLES: Creates missing target 
tables, including Change Tables.

Request state  l SUCCESS: Connection to endpoint is valid
 l FAILURE: Connection to endpoint is not valid

state Represented as enum values:

 l TABLE_QUEUED = 0: A table awaiting loading. 
 l TABLE_LOADING = 1: A table being loaded to the target. 
 l TABLE_COMPLETED = 2: A table that has been loaded to the target.
 l TABLE_CHANGE_PROCESSING = 3: A table that has been loaded to the 
target and is being updated according to changes on the source. 
 l TABLE_ERROR = 4: An error occurred while processing the table.

API Guide - Qlik Enterprise Manager , November 2021 185


4   Enterprise Manager Python API

4    Enterprise Manager Python API
This section explains how to use the Enterprise Manager Python API and lists the available methods.

In this section:

 l Prerequisites (page 187)
 l Getting started - Login (page 187)
 l Authentication and authorization (page 188)
 l Error handling (page 188)
 l put_server_license (page 190)
 l get_server_details (page 191)
 l put_server (page 194)
 l put_server_acl (page 197)
 l get_server (page 201)
 l get_server_acl (page 202)
 l get_server_list (page 203)
 l delete_server  (page 204)
 l delete_server_acl (page 206)
 l get_task_list (page 206)
 l get_task_details (page 208)
 l get_table_list (page 217)
 l get_table_statuses (page 219)
 l delete_task (page 222)
 l export_task (page 223)
 l import_task (page 224)
 l export_audit_trail (page 226)
 l run_task (page 228)
 l stop_task (page 227)
 l get_endpoint_list (page 232)
 l delete_endpoint (page 233)
 l reconfigure_endpoint_no_wait  (page 234)
 l export_all (page 235)
 l import_all (page 236)
 l reload_table (page 238)
 l test_endpoint (page 238)
 l delete_old_change_data (page 240)
 l set_change_data_retention_barrier (page 242)
 l get_change_data_retention_barrier (page 244)
 l Parameters (page 245)

API Guide - Qlik Enterprise Manager , November 2021 186


4   Enterprise Manager Python API

4.1   Prerequisites
General Prerequisites
Before using the Enterprise Manager Python SDK, make sure that:

 l Qlik Enterprise Manager has been installed.
 l The Qlik Enterprise Manager service is active.
 l The relevant permissions have been granted.

Python 2.7 Prerequisites
 1.  Add the following files to the Environment Variables folder:
 l C:\python27
 l C:\python27\Scripts
 2.  Open a command prompt and type the following:
pip -v
If an error is returned, it means there is an issue with the "Environment Variables".
If the command is successful, type the following:
pip install enum34

Python 3.7 Prerequisites
Add the following files to Environment Variables:

 l ..\appdata\Local\Programs\Python\Python37'
 l ..\appdata\Local\Programs\Python\Python37\Scripts

4.2   Getting started - Login
This section describes how to get started with the Enterprise Manager Python SDK. To help you better 
understand how to implement the available methods, a code sample and a readme file that describes the 
code are located in the <Enterprise Manager_Installation_Folder>/clients/python folder.

To be able to use the Qlik Enterprise Manager Python API:

 1.  Import the Qlik Enterprise Manager-Client by adding the following code:
from aem_client import *

 2.  Create an aem_client object using the following constructors: (self, b64_username_password,


machine_name, port=443, url="https://{0}/attunityenterprisemanager", verify_
certificate=True,authentication_method=AuthenticationMethod.ACTIVE_DIRECTORY|SAML):
 l  b64_username_password
For authentication using Active Directory:
You need to create a base64 encoding of “domain\\user:password”:
 l domain_username = '{0}\\{1}'.format(domain, username)
 l username_password_str = str.encode('{0}:{1}'.format(username, password))
 l  b64_username_password = b64.b64encode(username_password_ str).decode
('ascii')

API Guide - Qlik Enterprise Manager , November 2021 187


4   Enterprise Manager Python API

For authentication using SAML: 
 l The SAML assertion from an IDP. This should be a string in the following format:
 'SAMLResponse=<long_base_64_string>'
Where <long_base_64_string>  is  the SAML assertion from a SAML IDP. This must be 
a URL encoded string containing the SAMLResponse parameter  with a base64 encoded 
SAML assertion as its value. The string may also contain other parameters (e.g. 
RelayState), but these parameters are ignored.
 l machine_name - The machine on which Qlik Enterprise Manager is installed.
 l port – The Qlik Enterprise Manager server port (usually 443). 
 l url – The URL to the Qlik Enterprise Manager server. If not set then https://
{0}/attunityenterprisemanager is used where {0} is the machine name.
 l verify_certificate – When verify_certificate is set to true, there must be a valid certificate in 
the Qlik Enterprise Manager machine. When set to false, Qlik Enterprise Manager client will 
not validate the server certificate. The default is true.

Example:  

aem_client = AemClient(b64_username_password, machine_name, verify_


certificate=False)
 l authentication_method – The authentication method used by the Enterprise Manager server.
 
For Active Directory, specify AuthenticationMethod.ACTIVE_DIRECTORY
For SAML, specify AuthenticationMethod.SAML
The user can now use the client methods to get/set data from Qlik Enterprise Manager using the 
public APIs. For example: 
 l aem_client. get_server_list()
 l aem_client. get_server_list()
 l aem_client. export_task(server_name, task_name)

4.3   Authentication and authorization
The aem_client user and password need to be the user and password that are defined in users or groups in 
Qlik Enterprise Manager ACLs in at least one level (for example, Qlik Enterprise Manager level, All Servers 
level, and so on) with at least Viewer role.

4.4   Error handling
When a REST request fails, the HTTP response code is set to an error code. Information about the error is 
returned in the payload as an error response.

An error response has the following structure:

Class: AemClientException that inherits from Exception class and has the following fields:

error_code
message

API Guide - Qlik Enterprise Manager , November 2021 188


4   Enterprise Manager Python API

This section lists the generic messages that apply to most of the API functions. Errors that are specific to a 
particular API function appear in the section for that API function.

Error responses
Error    Message    Description   

UNAUTHORIZED_ Unauthorized Request. The user is not 


REQUEST authorized to perform 
the requested action 
(for example, deleting a 
task).

INVALID_SESSION_ The session has expired or the session ID is not  Session expired or 


ID  valid. invalid. 

DESERIALIZE_TO_ Failed to deserialize json to type {type}: {message} Returned when the 


TYPE JSON format is invalid. 

AEM_SERVER_ The requested server {server} could not be found. The requested server 


NOT_FOUND cannot be found.

AEM_SERVER_ The requested server {server} is not monitored. The requested  server 


NOT_MONITORED is not being monitored 
and thus the 
information is not 
accessible.

AEM_SERVER_ The requested server "{server}" cannot be reached  The desired 


NOT_CONNECTED at this time.  information cannot be 
retrieved as the 
Message: {message}
requested  server is not 
connected.

AEM_SERVER_ The license for requested  server {server} has  The requested  server 


LICENSE_EXPIRED expired. license has expired.

AEM_SERVER_ The license for requested server {server} is not valid. The requested  server 


INVALID_LICENSE license is not valid.

LICENSE_NOT_ You need to register a Replication Management  Replication 


FOUND license in order to use Qlik Enterprise Manager. To  Management license 
register or obtain a license, open the Qlik Enterprise  was not found. 
Manager console and follow the instructions. Returned when a user 
is permitted to Register 
Qlik Enterprise 
Manager license.

API Guide - Qlik Enterprise Manager , November 2021 189


4   Enterprise Manager Python API

Error    Message    Description   

LICENSE_NOT_ An Enterprise Manager Admin needs to register a  Replication 


FOUND_CONTACT_ Replication Management license before you can use  Management license 
ADMIN the product. To obtain a license, contact your Qlik  was not found. 
Sales Representative with the Enterprise Manager  Returned when a user 
machine name (which is displayed when you open  is NOT permitted to 
the Enterprise Manager console). Register Qlik 
Enterprise Manager 
license.

LICENSE_ {Module} evaluation license has expired. {Module} is one of the 


EVALUATION_ following: 
EXPIRED 
 l Replication 
Management 
 l Replication 
Analytics

LICENSE_TERM_ {Module} license has expired. {Module} is one of the 


EXPIRED  following: 

 l Replication 
Management 
 l Replication 
Analytics

LICENSE_INVALID_ The {Module} license signature is invalid. {Module} is one of the 


SIGNATURE  following: 

 l Replication 
Management 
 l Replication 
Analytics

LICENSE_HOST_ The host name in the {Module} license does not  {Module} is one of the 


MISMATCH match the Enterprise Manager machine name. following: 

 l Replication 
Management 
 l Replication 
Analytics 

AEM_MISSING_ The "{fieldName}" field is missing from the request. When a mandatory 


FIELD field is missing from the 
request or appears 
empty

4.5   put_server_license
Registers a license on a specific server via Qlik Enterprise Manager.

API Guide - Qlik Enterprise Manager , November 2021 190


4   Enterprise Manager Python API

Required User Role: See Required Enterprise Manager permissions (page 251).

Syntax
def put_server_license(
self,
payload,
server
)

Parameters
Parameters
Parameter Type  Description

payload  string The license to register on the server [stream]. 

This is the license that was provided by your Qlik Sales Representative.

Expected format: Text or JSON.
Currently refers to the Replicate license only.

server string The name of the server.

Return values
N/A

Errors
All of the general errors as well as the errors listed in the table below.

Error responses
Error Message Description

AEM_PUT_ Failed to put  Returned if Qlik Enterprise Manager encounters an 


SRV_LIC_ license for server " error/exception when trying to register the license on the 
INNER_ERR {server}".  specified server.

Error: "{message}"

AEM_SRV_LIC_ The license file  Returned when the contents of the license file are invalid.


INVALID_ format is corrupt.
FORMAT

4.6   get_server_details
Retrieves details about the specified server.

Required User Role: See Required Enterprise Manager permissions (page 251).

API Guide - Qlik Enterprise Manager , November 2021 191


4   Enterprise Manager Python API

Syntax
def get_server_details(
self,
server
)

Parameters
Parameters
Parameter Type  Description

server string The specified server name in Qlik Enterprise Manager.

Return values
AemGetServerDetailsResp

Return values
Value Type  Description

server_details AemServerDetails ReplicateServerDetails or ComposeServerDetails that are 


inherited from AemServerDetails.

configuration  - -

host  string The host name or IP address of the Replicate/Compose 


Server machine.

platform AemPlatform  The platform on which the Replicate/Compose Server 


{ machine is installed.  
UNKNOWN = 0,
WINDOWS = 1,
LINUX = 2
}

port  string The port through which the Replicate/Compose Server 


machine is accessed.

user_name  string The user name for connecting to the Replicate/Compose 


Server machine.

description  string The server description.

last_ string The date and time of the last successful sync/retrieval of 


connection  tasks and messages.

license ApiLicense  -

days_to_ int The number of days left before the license expires.


expiration

expiration  string The expiration date of the server license.

issue_date  string When the license was issued.

API Guide - Qlik Enterprise Manager , November 2021 192


4   Enterprise Manager Python API

Value Type  Description

state AemLicenseState The current license state (for example, valid, expired, and 


so on).
{

VALID_LICENSE = 0,

INVALID_LICENSE_
CHECKSUM = 1,

EXPIRED_LICENSE = 
2,

NO_LICENSE = 3,

MACHINE_NOT_
LICENSED = 4,

INVALID_LICENSE = 5

message  string  The error message if Qlik Enterprise Manager fails to 


connect to the Replicate/Compose Server machine.

name string  The name of the server in Qlik Enterprise Manager.

resource_ AemServerUtilization  -
utilization

attunity_cpu_ int The sum of CPU percentage of Replicate server and all 


percentage running tasks processes.

disk_usage_ long  The amount of disk space that the server is currently 


mb consuming, in MB. This is the sum of disk usage for all 
tasks on this server.

machine_cpu_ int  The CPU percentage of the machine where Replicate is 


percentage  installed.

memory_mb  long  The amount of memory that the server is currently 


consuming, in MB. This is the sum of memory usage for all 
active tasks on this server, excluding stopped tasks.

state AemServerState  The state of the server.

{
NOT_MONITORED = 0,
MONITORED = 1,
ERROR = 2
}

aem_tasks_ TaskSummary -
summary 

API Guide - Qlik Enterprise Manager , November 2021 193


4   Enterprise Manager Python API

Value Type  Description

error int The number of tasks that encountered a fatal error.

recovering int The number of recovering tasks

running int The number of running tasks.

stopped int The number of stopped tasks.

total int The total number of tasks, regardless of state.

version string The Replicate/Compose Server version.

 l The return value -1 means N/A.
 l Parameters related to Disk, Memory, Qlik CPU, and Machine CPU usage are not 
available for Compose servers. For Compose servers, these parameters will be 
returned as -1.
 l Parameters related to Qlik CPU and Machine CPU usage are only available for 
Replicate 6.2 and above. For earlier Replicate versions, these parameters will be 
returned  as -1.
 l For servers that are in an error state or not monitored, parameters related to Disk and 
Memory usage will be returned  as -1.

Errors
Error responses
Error  Message Description

AEM_SERVER_NOT_ Replicate server {server} could not  Server name unknown to Qlik 


FOUND be found. Enterprise Manager.

See Error handling (page 123).

4.7   put_server
Adds a new Replicate/Compose Server or updates the server definition (Connection Properties) if the 
specified server already exists. This method can be used together with AemGetServer in order to update 
the connection properties of an existing server.

First call AemGetServer, then edit the returned properties as required, and finally, call AemPutServer.

Required User Role: See Required Enterprise Manager permissions (page 251).

Syntax
def put_server(
self,
payload,
server
)

API Guide - Qlik Enterprise Manager , November 2021 194


4   Enterprise Manager Python API

Parameters
Parameters
Parameter Type  Description

payload AemServer  AemReplicateServer or AemComposeServer that is inherited from 


AemServer.

host string  The host name or IP address of the server.

name  string  The name of the server.

description  string The server description.

port  string The port through which the server is accessed.

username string The user name to connect to the Replicate/Compose Server.

password string The password to connect to the Replicate/Compose Server.Note  T   he 


password identifier (GUID) that is returned by GetServer is valid only 
for the session in which it was generated. Using it in another session 
(for example as input for PutServer) will result in exception.

verify_ bool Set  to "true" to ensure the Server certificate is trusted. As a rule, to 


server_ reduce the chance of "man-in-the-middle" attacks, this option should 
certificate always be set to "true". 

 l When connecting directly to an Qlik Replicate replication server 
(default port 3552) with its automatically generated self-signed 
certificate, Qlik Enterprise Manager is able to validate the 
certificate without requiring any additional setup.  

 l When connecting to a Replicate Server via the Replicate UI 
Server (typically using port 443) or to the Replicate replication 
server with a user-installed certificate, you must make sure that 
the SSL/TLS certificate used by the server is trusted by the Qlik 
Enterprise Manager machine. The same applies when 
connecting to a Compose Server with a user-installed 
certificate.  Y
  ou can easily verify whether the certificate is trusted 
by opening a Chrome browser window on the Qlik Enterprise 
Manager machine and connecting to Replicate. If there are no 
security warnings, the certificate is trusted.  

For information on the different ways of connecting to Qlik Replicate, 
see Qlik Replicate Server Requirements in the Qlik Enterprise 
Manager Help.

monitored bool  Whether to retrieve tasks and messages from this server or not.

server string The name of the server.

Return values
N/A

API Guide - Qlik Enterprise Manager , November 2021 195


4   Enterprise Manager Python API

Errors 
All of the general errors as well as the errors listed in the table below.

Error responses
Error Message Description

DESERIALIZE_ "Failed to deserialize json to type AemServer: {message}"  Returned when the 


TO_TYPE JSON format is 
invalid format. For 
example, such an 
error will be returned 
if the JSON contains 
an unknown role.

AEM_PUT_ Failed to put server "{server}".  Returned if Qlik 


SERVER_ Enterprise Manager 
Error: "{message}".
INNER_ERR encounters an 
error/exception 
when trying to PUT 
the server.

AEM_INVALID_ Server type {ServerType} for server "{ServerName}" is not  Returned when the 


SERVER_TYPE valid. an invalid server 
type is specified.

AEM_NAME_ The name of the server in the request does not match the  Returned when the 


URL_MISMATCH one that is specified in the URL. name of the server 
in the request does 
not match the one 
that is specified in 
the URL.

AEM_EMPTY_ The host is missing from the request. Returned when the 


HOST host is missing from 
the request.

AEM_EMPTY_ The port is missing from the request. Returned when the 


PORT port is missing from 
the request.

AEM_EMPTY_ The username is missing from the request.  Returned when the 


USERNAME user name is 
missing from the 
request.

AEM_EMPTY_ The password is missing from the request.  Returned when the 


PASSWORD password is missing 
from the request. 

API Guide - Qlik Enterprise Manager , November 2021 196


4   Enterprise Manager Python API

Error Message Description

AEM_INVALID_ The port is invalid. Returned when the 


PORT  specified port is not 
valid.

AEM_INVALID_ The user name is invalid.  Returned when the 


USERNAME specified user name 
User names cannot exceed 104 characters and can 
is not valid.
contain all Unicode characters except for the following 
characters: Forward slash (/), Left square bracket ([), Right 
square bracket (]), Colon (:), Semicolon (;), Vertical bar (|), 
Equal sign (=), Plus sign (+), Asterisk (*), Question mark 
(?), Left angle bracket (<), Right angle bracket (>), Double 
quote (\").

AEM_INVALID_ The description is invalid.  Returned when the 


DESC description exceeds 
Descriptions cannot exceed 250 characters.
250 characters.

AEM_INVALID_ The host is invalid.  Returned when the 


HOST  server host name 
Hosts cannot exceed 64 characters and can only contain 
exceeds 64 
letters (a-z or A-Z), digits, spaces, dots (.), dashes (-), and 
characters or 
underscores (_).
contains invalid 
characters.

AEM_INVALID_ The name of the server is invalid.  Returned when the 


NAME  server name 
Server names cannot exceed 64 characters and can only 
exceeds 64 
contain letters (a-z or A-Z), digits, spaces, dots (.), dashes 
characters or 
(-), and underscores (_). 
contains invalid 
characters.

AEM_HOST_ Host {name/IP} and port {number} are already in use by  Returned when both 


PORT_ another server. the server host 
ALREADY_EXIST name/IP address 
  and the server port 
are already in use  by 
another server.

4.8   put_server_acl
Puts an explicit ACL for a specific server in Qlik Enterprise Manager. The method will replace any existing 
explicit ACL with the ACL in the request. The request also includes a Boolean flag for specifying whether or 
not the server  should  inherit ACLs from its ancestors (in addition to its explicitly defined ACLs).

The inherited ACLs (i.e., the ACLs of the server's ancestors) are not affected by this method.

API Guide - Qlik Enterprise Manager , November 2021 197


4   Enterprise Manager Python API

The AemPutServerAcl can be used together with the AemGetServerAcl method in order to update an 


existing server's ACL. First call AemGetServerAcl, then edit the returned roles as required, and finally, call 
AemPutServerAcl.

Behavior when putting a partial request: 

When the request body  includes only some of the roles (as opposed to all four of them), only the roles 
specifically defined in the request body will be set on the server; roles that are missing or empty will be 
inherited, but only if the following are true:

 l The disable_inheritance flag is set to "True".
 l The  roles that are missing/empty in the request are defined for the ancestors.

Behavior on conflicts: 

If the disable_inheritance flag is set to "False" and the explicit roles in the request conflict with existing 
inherited roles, then the explicit roles will take precedence. For example, if the request defines user A as a 
Viewer on MyServer and user A is also defined as an Admin on All Servers, then user A will be defined as 
an Admin on All Servers but as a Viewer on MyServer.

The user permissions in Enterprise Manager are completely independent of the user 
permissions in Replicate. Consequently, AemPutServerAcl will affect the server's Enterprise 
Manager user permissions, but will not affect Replicate's user permissions. 

Moreover, when performing an operation via Enterprise Manager, the user permissions 
defined for the server entity in Enterprise Manager apply, whereas when performing an 
operation directly via the Replicate Console, the user permissions defined in  Replicate apply. 

Defining the same user/group in different roles is not allowed. However, if the same user or 
group is defined in different roles but with a different case (for example, Mike vs. mike or 
Analysts vs. ANALYSTS), no error will be returned and the strongest role will take precedence.

Required User Role: See Required Enterprise Manager permissions (page 251).

Syntax
def put_server_acl(
self,
payload,
server
)

API Guide - Qlik Enterprise Manager , November 2021 198


4   Enterprise Manager Python API

Parameters
Parameters
Parameter Type  Description

payload AemAuthorizationAcl  -

disable_ bool If set to "true", the server does not inherit ACLs from its 


inheritance ancestors (in addition to its explicit ACLs). If set to "false", the 
server inherits ACLs from its ancestors, in addition to any 
explicit ACLs.

admin_role AemRoleDef  Users and/or groups assigned as Admin role.

designer_ AemRoleDef  Users and/or groups assigned as Designer role.


role

operator_role AemRoleDef  Users and/or groups assigned as Operator role.

viewer_role AemRoleDef  Users and/or groups assigned as Viewer role.

groups List<AemGroupRef>  Groups assigned as the role.

name string The group name.

users List<AemUserRef>  Users assigned as the role.

name string The user name.

server string The name of the server.

Return values
N/A

Errors
All of the general errors as well as the errors listed in the table below.

Error responses
Error Message Description

DESERIALIZE_ "Failed to deserialize json to type  Returned when the JSON format is invalid. 


TO_TYPE AemAuthorizationAcl: {message}"  For example, such an error will be returned 
if the JSON contains an unknown role.

AEM_PUT_ Failed to put ACL of server " Returned if Qlik Enterprise Manager 


SERVER_ACL_ {server}".  encounters an error/exception when trying 
INNER_ERR to put the server's ACL.
Error: "{message}".

API Guide - Qlik Enterprise Manager , November 2021 199


4   Enterprise Manager Python API

Error Message Description

AEM_NO_  User "{userName}" must be  Returned when the domain is missing from 


DOMAIN_IN_ preceded by a domain name,  the user name.
USER separated by a backslash.  

Example: 

domain_name\user_name. 

AEM_NO_  Group "{groupName}" must be  Returned when the domain is missing from 


DOMAIN_IN_ preceded by a domain name,  the group name.
GROUP separated by a backslash.  

Example: 

domain_name\group_name. 

AEM_NO_ Requested server "{serverName}"  Returned when there is no admin on the 


ADMIN_ON_ has no admin user.  server. 
SERVER 
At least one user or group must be  Possible reasons:
assigned to the "admin" role.
 l The request JSON is set to 
disable_inheritance=true and the 
explicit admin role in the JSON is 
empty.
 l The JSON is set to disable_
inheritance =true, the explicit 
admin role in the JSON is empty, 
and the parent levels do not have 
an admin user to inherit.

AEM_USER_ User "{userName}" is assigned to  Returned when a user is assigned to 


ASSIGNED_TO_ multiple roles. Users can only be  multiple roles.
MULTIPLE_ assigned to a single role. 
ROLES 

AEM_GROUP_ Group "{groupName}" is assigned to  Returned when a group is assigned to 


ASSIGNED_TO_ multiple roles. Groups can only be  multiple roles.
MULTIPLE_ assigned to a single role.  
ROLES  

AEM_USER_ "{userName/groupName}" is  Returned either when the specified user 


GROUP_ assigned to multiple roles or to the  already exists as a group in the 
MULTIPLE_ same role twice. Users/groups can  same/another role, or the specified group 
ASSIGNED only be assigned once, and to a  already exists as a user in the 
single role. same/another role.

API Guide - Qlik Enterprise Manager , November 2021 200


4   Enterprise Manager Python API

4.9   get_server
Retrieves the definition (Connection Properties) of the specified server. This method can be used together 
with PutServer in order to update the connection properties of an existing server. First call GetServer, then 
edit the returned properties as required, and finally, call PutServer.

Required User Role: See Required Enterprise Manager permissions (page 251).

Syntax
def get_server(
self,
server
)

Parameters
Parameters
Parameter Type  Description

server string The name of the server to retrieve.

Return values
AemServer (AemReplicateServer or AemComposeServer that are inherited from AemServer)

Return values
Value Type  Description

host string  The host name or IP address of the server.

name  string  The name of the server.

description  string The server description.

port  string The port through which the server is accessed.

username string The user name to connect to the Replicate/Compose Server.

password string The password to connect to the Replicate/Compose Server.Note   The 


password identifier (GUID) that is returned by GetServer is valid only for the 
session in which it was generated. Using it in another session (for example 
as input for PutServer) will result in exception.

verify_ bool When "true", Qlik Enterprise Manager verifies that the Server certificate is 


server_ trusted, thereby reducing the chance of "man-in-the-middle" attacks.
certificate
For details on setting this option, see put_server (page 194).

monitored bool  Whether to retrieve tasks and messages from this server or not.

Errors
See general errors.

API Guide - Qlik Enterprise Manager , November 2021 201


4   Enterprise Manager Python API

4.10   get_server_acl
Retrieves the explicit ACL defined in Qlik Enterprise Manager for the specified server, including a Boolean 
indication if ACL inheritance is disabled or enabled for the server. 

The method returns the explicit ACL only. In other words, it does not return inherited ACLs.

If all of the servers ACLs are inherited (that is, no ACL was explicitly defined for the server), an error will be 
returned indicating that no ACL was found.

This method can be used together with AemPutServerAcl in order to update an existing server's ACL. First, 
call AemGetServerAcl, then edit the returned roles as required, and finally, call AemPutServerAcl.

Required User Role: See Required Enterprise Manager permissions (page 251).

Syntax
def get_server_acl(
self,
server
)

Parameters
Parameters
Parameter Type  Description

server string The name of the server where the ACL is located.

Return values
AemAuthorizationAcl

Return values
Value Type  Description

disable_ bool If set to "true", the server does not inherit ACLs from its 


inheritance ancestors (in addition to its explicit ACLs). If set to "false", the 
server inherits ACLs from its ancestors, in addition to any 
explicit ACLs.

admin_role AemRoleDef  Users and/or groups assigned as Admin role.

designer_ AemRoleDef  Users and/or groups assigned as Designer role.


role

operator_role AemRoleDef  Users and/or groups assigned as Operator role.

viewer_role AemRoleDef  Users and/or groups assigned as Viewer role.

groups List<AemGroupRef>  Groups assigned as the role.

name string The group name.

API Guide - Qlik Enterprise Manager , November 2021 202


4   Enterprise Manager Python API

Value Type  Description

users List<AemUserRef>  Users assigned as the role.

name string The user name.

Errors
All of the general errors as well as the errors listed in the table below.

Error responses
Error Message Description

AEM_GET_ Failed to get ACL  Returned if Qlik Enterprise Manager encounters an 


SERVER_ACL_ of server "{server}".  error/exception when trying to get the server ACL.
INNER_ERR
Error: "{message}".

AEM_SERVER_ ACL for server " Returned if no explicit ACL is defined for the server. 


HAS_NO_ACL {server}" could not 
be found.
A server that does not have its own explicit ACL  
inherits the ACL from its ancestors. Inherited 
ACLs are not returned by this method. 

4.11   get_server_list
Retrieves a list of servers under Qlik Enterprise Manager management as well as each server's properties.

Required User Role: See Required Enterprise Manager permissions (page 251).

Syntax
def get_server_list(
self
)

Parameters
N/A

Return values
AemGetServerListResp 

Return values
Value Type  Description

serverList  List<AemServerInfo> ReplicateServerInfo or ComposeServerInfo that 


inherit from AemServerInfo.

API Guide - Qlik Enterprise Manager , November 2021 203


4   Enterprise Manager Python API

Value Type  Description

description string  The description of the server

host string The host name or IP address of the server.

last_ string The date and time of the last successful sync/retrieval 


connection  of tasks and messages.

message string The error message if Qlik Enterprise Manager fails to 


connect to the server.

name string The name of the server. 

platform  AemPlatform AemPlatform

{   

UNKNOWN = 0,  W   INDOWS = 
1,   LINUX = 2 

port string  The port through which the server is accessed. 

state AemServerState  AemServerState   

NOT_MONITORED = 0,   

MONITORED = 1,   

ERROR = 2   

version  string  The Replicate/Compose Server version

Errors
All of the general errors as well as the errors listed in the table below.

Error responses
Error  Message Description

AEM_SERVER_NOT_ Replicate server {server} could not  Server name unknown to Qlik 


FOUND be found. Enterprise Manager.

4.12   delete_server 
Description
When this method is called, Qlik Enterprise Manager will:

API Guide - Qlik Enterprise Manager , November 2021 204


4   Enterprise Manager Python API

 l Delete the specified server from Qlik Enterprise Manager
 l Stop monitoring any tasks that were defined on the server
 l Delete all messages related to the server from the Message Center
 l Delete all user roles defined for the server, the server tasks, and the server endpoints

The above operations will be performed, regardless of whether the server is currently being 
monitored or in an error state.

Required User Role: See Required Enterprise Manager permissions (page 251).

Syntax
def delete_server(
self,
server
)

Parameters
Parameters
Parameter Type Description

server string The name of the server to be deleted.

Return values
N/A

Errors
All of the general errors as well as the errors listed in the table below.

Error responses
Error Text Description

AEM_SERVER_ Requested server " The server name is unknown to Qlik Enterprise 


NOT_FOUND {server}" could not be  Manager.
found.

AEM_DELETE_ Failed to delete requested  Qlik Enterprise Manager encountered an 


SERVER_INNER_ server "{server}". error/exception when trying to delete the server.
ERR

API Guide - Qlik Enterprise Manager , November 2021 205


4   Enterprise Manager Python API

4.13   delete_server_acl
Deletes the explicit ACL defined in Qlik Enterprise Manager for the specified server. Inherited ACLs are not 
affected by this method. Once the explicit ACL is deleted from the server, all ACLs will be automatically 
inherited from the server's ancestors.

Required User Role: See Required Enterprise Manager permissions (page 251).

Syntax
def delete_server_acl(
self,
server
)

Parameters
Parameters
Parameter Type  Description

server string The name of the server whose ACL needs to be deleted.

Return values
N/A

Errors
All of the general errors as well as the errors listed in the table below.

Error responses
Error Message Description

AEM_DELETE_ Failed to delete ACL  Returned if Qlik Enterprise Manager encounters an 


SERVER_ACL_ of server "{server}".  error/exception when trying to delete the server's 
INNER_ERR ACL.
Error: "{message}".

AEM_SERVER_ ACL for server " Returned when the specified server has no explicit 


HAS_NO_ACL {server}" could not be  ACL defined. 
found.  

4.14   get_task_list
Retrieve a list of tasks per selected and authorized server. For each task, the API returns a few values.

Required User Role: See Required Enterprise Manager permissions (page 251).

Syntax
def get_task_list(
self,
server
)

API Guide - Qlik Enterprise Manager , November 2021 206


4   Enterprise Manager Python API

Parameters
Parameters
Parameter Type  Description

server string The name of the server on which the tasks reside.

Return values
AemGetTaskListResp

Return values
Value Type  Description

taskList List<AemTaskInfo> An array of Endpoint objects.

name string  l Replicate: - The name of the task.


 l Compose: - The name of the task or workflow 
appended with a double underscore and the project 
name.

Example:  

mytask__myproject

state AemTaskState   -

STOPPED = 0,

RUNNING = 1,

ERROR = 2,

RECOVERY = 3

API Guide - Qlik Enterprise Manager , November 2021 207


4   Enterprise Manager Python API

Value Type  Description

stop_reason AemTaskStopReason  The reason the task stopped.  For Compose tasks, this will 


{ always be NONE.
 
NONE = 0,

NORMAL = 1,

RECOVERABLE_
ERROR = 2,

FATAL_ERROR = 3,

FULL_LOAD_ONLY_
FINISHED = 4,

STOPPED_AFTER_
FULL_LOAD = 5,

STOPPED_AFTER_
CACHED_EVENTS = 6,

EXPRESS_LICENSE_
LIMITS_REACHED = 7,

STOPPED_AFTER_
DDL_APPLY = 8,

STOPPED_LOW_
MEMORY = 9,

STOPPED_LOW_
DISK_SPACE = 10

message string  The message if the task stopped due to an error.

assigned_ array Returns the custom tags assigned to the task. If no tags are 


tags assigned to the task, an empty array will be returned.

Errors
See general errors.

4.15   get_task_details
Retrieves details about a selected and authorized task. The API returns full monitoring information related 
to the selected task.

Required User Role: See Required Enterprise Manager permissions (page 251).

API Guide - Qlik Enterprise Manager , November 2021 208


4   Enterprise Manager Python API

Syntax
def get_task_details(
self,
server,
task
)

Parameters
Parameters
Parameter Type  Description

server string The name of the server.

task string  l Replicate: - The name of the task.


 l Compose: - The name of the task or workflow appended with a 
double underscore and the project name.

Example:  

mytask__myproject

Return values for Replicate tasks
AemGetTaskDetailsResp

Return values
Value Type  Description

task  AemTaskInfoDetailed -

type string AemTaskInfoDetailed

name string The task name.

description string The task description. If there is no description, 


an empty string will be returned.

cdc_event_ AemTaskCdcEventCounters All numeric data concerning CDC events


counters

applied_ddl_ long  The total number of metadata changes, such 


count as add column

applied_delete_ long  The number of records deleted in total for all 


count tables

applied_insert_ long  The number of records added in total for all 


count tables

applied_update_ long  The number of records updated in total for all 


count tables

cdc_latency  AemCdcLatency  CDC latency information

API Guide - Qlik Enterprise Manager , November 2021 209


4   Enterprise Manager Python API

Value Type  Description

source_latency string The time gap between the original change in 


the source endpoint and capturing it, in 
hh:mm:ss

total_latency  string The overall latency (source latency + target 


latency + apply latency), in hh:mm:ss

cdc_throughput AemCdcThroughput  Indicates how fast the table records are being 


replicated to the target endpoint (by number or 
volume of records). Refers only to the 
current/last CDC.

source_ AemCdcThroughputItem  The current source throughput, in rec/sec


throughput_
records_count

source_ AemCdcThroughputItem  The current source throughput, in kbyte/sec


throughput_
volume

target_ AemCdcThroughputItem  The current target throughput, in rec/sec


throughput_
records_count

target_ AemCdcThroughputItem  The current target throughput, in kbyte/sec


throughput_
volume

current long -

cdc_ AemCdcTransactionsCounters  All numeric data concerning CDC transactions


transactions_
counters

applied_ long The number of transactions committed.


comitted_
transaction_
count

applied_records_ long The sum of all records/events in all Completed 


comitted_count transactions

applied_records_ long The sum of all records/events in all In-Progress 


in_progress_ transactions
count

applied_ long The number of transactions in progress.


transactions_in_
progress_count

API Guide - Qlik Enterprise Manager , November 2021 210


4   Enterprise Manager Python API

Value Type  Description

applied_volume_ long The sum of all volume/events in all Completed 


comitted_mb transactions, in MB.

commit_change_ long The number of COMMIT change records.


records_count

incoming_ long The number of changes accumulated on disk 


accumulated_ until source commit
changes_on_
disk_count

incoming_ long The number of changes accumulated in 


accumulated_ memory until source commit.
changes_in_
memory_count

incoming_ long The number of changes in memory during 


applying_ apply and until target commit.
changes_in_
memory_count

incoming_ long The number of changes on disk during apply 


applying_ and until target commit.
changes_on_
disk_count

rollback_ long The number of ROLLBACK change records.


change_records_
count

rollback_ long The volume of ROLLBACK changes, in MB.


change_volume_
mb

rollback_ long The number of changes in memory during 


transaction_ apply and until target commit.
count

full_load_ bool -
completed

full_load_ AemTaskFullLoadCounters All numeric data concerning Full Load events.


counters

estimated_ long The estimated number of records remaining to 


records_for_all_ be loaded into the target endpoint.
tables_count

records_ long The total number of records that have 


completed_count completed loading into the target endpoint.

API Guide - Qlik Enterprise Manager , November 2021 211


4   Enterprise Manager Python API

Value Type  Description

tables_ int The number of tables that have been loaded 


completed_count into the target endpoint.

tables_loading_ int The number of tables that are currently being 


count loaded into the target endpoint.

tables_queued_ int The number of tables that are waiting to be 


count loaded due to an error.

tables_with_ int The number of tables that could not be loaded 


error_count due to an error.

full_load_end string Indicates whether the full load process has 


ended.

full_load_start string The start time of the full load process.

Format: YYY MM DD

Timezone: UTC

full_load_ AemFullLoadThroughput  -
throughput

source_ int The current source throughput, in rec/sec.


throughput_
records_count

source_ int The current source throughput, in kbyte/sec.


throughput_
volume

target_ int The current target throughput, in rec/sec.


throughput_
records_count

target_ int The current target throughput, in kbyte/sec.


throughput_
volume

memory_mb long The current utilization of memory, in MB. A 


task's memory utilization is sampled every 10 
seconds. When the task is not running, the 
value is set to zero (0).

API Guide - Qlik Enterprise Manager , November 2021 212


4   Enterprise Manager Python API

Value Type  Description

cpu_percentage - The current CPU usage of the Replicate task 
process.

Only available for Replicate tasks  
running on Replicate 6.2 and 
above. When not available, this 
parameter will be returned  as -1.

disk_usage_mb long The current utilization of disk space, in MB. A 


task's disk utilization is sampled every minute.

data_error_count long The total number of data errors in all tables 


involved in the task. The count is affected by 
data errors and the Reset Data Errors option 
available when you drill down to a task.

options AemCommonSettings  -

apply_changes_ bool See Task Options.


enabled

audit_changes_ bool See Task Options.


enabled

full_load_ bool See Task Options.


enabled

store_changes_ bool See Task Options.


enabled

profile string See Profile Parameters.

source_endpoint TaskEndpoint  -

name string The name of the source endpoint.

type string The source endpoint type.

target_endpoint TaskEndpoint  -

name string The name of the target endpoint.

type string The target endpoint type.

API Guide - Qlik Enterprise Manager , November 2021 213


4   Enterprise Manager Python API

Value Type  Description

state  AemTaskState The current state of the task.

{
STOPPED = 0,
RUNNING = 1,
ERROR = 2,
RECOVERY = 3
}

task_stop_ AemTaskStopReason  The reason the task stopped.


reason
{

NONE = 0,

NORMAL = 1,

RECOVERABLE_ERROR = 2,

FATAL_ERROR = 3,

FULL_LOAD_ONLY_FINISHED 
= 4,

STOPPED_AFTER_FULL_
LOAD = 5,

STOPPED_AFTER_CACHED_
EVENTS = 6,

EXPRESS_LICENSE_LIMITS_
REACHED = 7,

STOPPED_AFTER_DDL_
APPLY = 8,

STOPPED_LOW_MEMORY = 9,

STOPPED_LOW_DISK_SPACE 
= 10

}
 

log_stream_ string If the task is writing to/reading from the Log 


staging Stream staging folder, the name of the 
associated Log Stream Staging task will be 
returned. Otherwise, an empty string will be 
returned.

API Guide - Qlik Enterprise Manager , November 2021 214


4   Enterprise Manager Python API

Value Type  Description

assigned_tags array Returns the custom tags assigned to the task. 


If no tags are assigned to the task, an empty 
array will be returned.

message string The message if the task stopped due to an 


error.

Return Values for Compose Tasks
AemGetTaskDetailsResp

Name Type Description

type  string One of the following:

 l AemComposeDWTaskInfoDetailed (for Data 
Warehouse tasks)
 l AemComposeDMTaskInfoDetailed (for Data 
Mart tasks)
 l AemComposeDLTaskInfoDetailed (for Data 
Lake tasks)

project string The name of the Compose project.

profile string See Profile Parameters.

name string The name of the task or workflow appended with a 


double underscore and the project name.

Example:  

mytask__myproject

description string The task description. If there is no description, an 


empty string will be returned.

state string The current task state

message string The message shown in the event that the task ends 


with an error.

options AemCommonSettings  -

full_load_ bool Indicates whether the Full Load option is enabled. 


enabled Can be "true" or "false"

apply_ bool Indicates whether the Change Processing option is 


changes_ enabled. Can be "true" or "false"
enabled

API Guide - Qlik Enterprise Manager , November 2021 215


4   Enterprise Manager Python API

Name Type Description

source_ TaskEndpoint  -
endpoint 

name string The logical name of the landing database.

type string The landing database type.

target_ TaskEndpoint  -
endpoint

name string The logical name of the storage database.

type string The storage database type.

loading_ bool Indicates whether the loading process has 


completed completed. Can be "true" or "false"

loading_start string The start time of the loading  process

Format: YYY MM DD

Timezone: UTC

loading_end string The end time of the loading  process

Format: YYY MM DD

Timezone: UTC

loading_ AemTaskFullLoadCounters -
counters

tables_total_ int The total number of tables.


count

tables_ int The number of tables that have been loaded into the 


completed_ target endpoint
count

tables_loading  int The number of tables that are currently being loaded 


count into the target endpoint

tables_ int The number of tables that are waiting to be loaded 


queued_count due to an error

tables_with_ int The number of tables that could not be loaded due to 


error_count an error

commands_ int The total number of commands executed


total_count

commands_ int The total number of commands completed


completed_
count

API Guide - Qlik Enterprise Manager , November 2021 216


4   Enterprise Manager Python API

Name Type Description

assigned_tags array Returns the custom tags assigned to the task. If no 


tags are assigned to the task, an empty array will be 
returned.

Errors
All of the general errors as well as the errors listed in the table below.

Error responses
Error  Message Description

AEM_TASK_ Replication task {task} on server {server}  The task name is unknown to Qlik 


NOT_FOUND could not be found. Enterprise Manager.

4.16   get_table_list
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 (e.g. suspended) and then perform an operation on them (e.g. ReloadTable). 

Required User Role: See Required Enterprise Manager permissions (page 251).

Syntax
def get_table_list(
self,
server,
task,
schema = None,
table = None,
includequeued = False,
includeloading = False,
includecompleted = False,
includechangeprocessing = False,
includeerror = False):
""" response payload: AemGetTableListResp

Parameters
Parameters
Value Type  Description

server string The Replicate Server name as defined on Qlik Enterprise 


Manager.

Example: myrepsrv1

API Guide - Qlik Enterprise Manager , November 2021 217


4   Enterprise Manager Python API

Value Type  Description

schema string The default is all source schemas. Specifying a specific 


schema name will retrieve all tables from the specified 
schema. Specifying a pattern or letters included in the 
schema name will retrieve all tables from schemas that 
match the pattern or that include the specified letters. For 
example, specifying "ad" will retrieve tables from the 
"adventure" and "trademark" schemas.

table string The default is all source tables. Specifying a specific table 


name will retrieve the specified table. Specifying a pattern 
or letters included in the table name will retrieve all tables 
that match the pattern or that include the specified letters. 
For example, specifying "em" will retrieve the "employees" 
and "temp" tables.

includequeued  boolean Whether to retrieve tables in a queued state. Default is 


false.

includeloading boolean Whether  to retrieve tables in a loading state. Default is 


false.

includecompleted  boolean Whether  to retrieve tables in a completed state. Default is 


false.

includechangeprocessing boolean Whether  to retrieve tables in a Change Processing state 


(that is, tables that are having changes applied to them). 
Default is false.

includeerror  boolean Whether  to retrieve tables in an error state. Default is false.

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 enum The current state of the table. 

Errors
All of the general errors as well as the errors listed in the table below.

API Guide - Qlik Enterprise Manager , November 2021 218


4   Enterprise Manager Python API

Error responses
Error  Message Description

AEM_TABLE_ Failed to retrieve table list for replication task " Returned when the table 


LIST_INNER_ {task}" on server "{server}". Error: "{message}"  list cannot be retrieved.
ERR   

AEM_TASK_ Replicate task {task} on server {server} could not be  The task name is unknown 


NOT_FOUND found. to Enterprise Manager.

4.17   get_table_statuses
Retrieves the tables statuses of a specific Replicate task for all tables 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 (for example, suspended) and then perform an operation on them (for 
example, ReloadTable). 

Required User Role: See Required Enterprise Manager permissions (page 251).

Syntax
def get_table_statuses(
self,
server,
task,
schema = None,
table = None,
includequeued = False,
includeloading = False,
includecompleted = False,
includechangeprocessing = False,
includeerror = False):
"""
response payload: AemGetTableStatusesResp

Request parameters
Request parameters
Value Type  Description

server string The Replicate Server name as defined on Qlik Enterprise 


Manager.

Example: myrepsrv1

task string The Replicate task name.

API Guide - Qlik Enterprise Manager , November 2021 219


4   Enterprise Manager Python API

Value Type  Description

schema string The default is all source schemas. Specifying a specific 


schema name will retrieve all tables from the specified 
schema. Specifying a pattern or letters included in the 
schema name will retrieve all tables from schemas that 
match the pattern or that include the specified letters. For 
example, specifying "ad" will retrieve tables from the 
"adventure" and "trademark" schemas.

table string The default is all source tables. Specifying a specific table 


name will retrieve the specified table. Specifying a pattern 
or letters included in the table name will retrieve all tables 
that match the pattern or that include the specified letters. 
For example, specifying "em" will retrieve the "employees" 
and "temp" tables.

includequeued  boolean Whether to retrieve tables in a queued state. Default is 


false.

includeloading boolean Whether  to retrieve tables in a loading state. Default is 


false.

includecompleted  boolean Whether  to retrieve tables in a completed state. Default is 


false.

includechangeProcessing boolean Whether  to retrieve tables in a Change Processing state 


(that is, tables that are having changes applied to them). 
Default is false.

includeerror  boolean Whether  to retrieve tables in an error state. Default is false.

Return values
AemGetTableStatusesResp 

General return values
Name Type Description

TableDetails List List of table statuses that matches the specified request parameters.

schema_on_ string Source schema name. 


source  

table_on_source    string Source table name. 

schema_on_ string Target schema name. If this information not available, an empty string 


target    will be returned.

table_on_target    string Target table name. If this information not available, an empty string will 


be returned.

API Guide - Qlik Enterprise Manager , November 2021 220


4   Enterprise Manager Python API

Name Type Description

state    enum An enum reflecting the table state.

See state (page 248).

data_errors_ int64 The number of data errors encountered when replicating the table.


count   

table_full_load_info return values
Name Type Description

start_time    string Date-time of when the table full load started.  T


  imezone: UTC ; Style: 
ISO8601 (consistent with AemGetTaskDetails). 

end_time    string Date-time of when the table full load started.  T


  imezone: UTC ; Style: 
ISO8601 (consistent with AemGetTaskDetails). 

estimated_ int64 Relevant only if table in certain states (loading/queued).  


row_count   

estimated_ string Relevant only if table in certain states (loading/queued).  T


  imezone: UTC ; 
end_time    Style: ISO8601 (consistent with AemGetTaskDetails). 

transferred_ int64 The number of rows transferred to the target, after the source filtering, but 


row_count    before the target filtering. 

transferred_ int64 The amount of bytes transferred to the target, after the source filtering, but 


volume_mb    before the target filtering. 

table_cdc_info return values
Name Type Description

insert_count    int64 The number of records inserted to the target table.

update_count    int64 The number of records updated in the target table.

delete_count    int64 The number of records deleted in the target table.

ddl_count    int64 The number of DDL operations performed on the target table.

last_update_ string The last time that the table was updated on target.  T


  imezone: UTC ; Style: 
time    ISO8601 (consistent with AemGetTaskDetails). 

cached_ int64 INSERT operations that were cached during Full Load.


insert_count   

cached_ int64 UPDATE operations that were cached during Full Load.


update_count   

cached_ int64 DELETE operations that were cached during Full Load.


delete_count   

API Guide - Qlik Enterprise Manager , November 2021 221


4   Enterprise Manager Python API

Errors
All of the general errors as well as the errors listed in the table below.

Error responses
Error  Message Description

AEM_SERVER_ Replicate server {server} could not be found. Server name unknown to 


NOT_FOUND Qlik Enterprise Manager.

AEM_TASK_NOT_ Replicate task {task} on server {server} could not  The task name is unknown 


FOUND be found. to Enterprise Manager.

AEM_TABLE_ Failed to retrieve table statuses for replication task  Returned when the table 


STATUSES_ "{task}" on server "{server}". Error: "{message}"  statuses cannot be 
INNER_ERR    retrieved.

4.18   delete_task
Deletes the specified task. The task's logs will be deleted only if deletetasklogs=true is  specified in the 
URL.

Required User Role: See Required Enterprise Manager permissions (page 251).

Syntax
def delete_task(
self,
server,
task,
deletetasklogs = False
)

Parameters
Parameters
Parameter Type  Description

server string The server where the task is defined.

task string The task to be deleted.

deletetasklogs bool Whether to delete the task logs or not.

Return values
N/A

API Guide - Qlik Enterprise Manager , November 2021 222


4   Enterprise Manager Python API

Errors
Error responses
Error  Message Description

AEM_TASK_ Replication task {task] on server  Returned if the task name is unknown to 


NOT_FOUND {server} could not be found.   Qlik Enterprise Manager.

AEM_DELETE_ Replication task {task] on server  Returned if Enterprise Manager encounters 


TASK_INNER_ {server} could not be deleted due to an  an error/exception when trying to delete the 
ERR error. task.

AEM_DELETE_ Replication task {task] on server  Returned if Enterprise Manager encounters 


TASK_ERR {server} could not be deleted due to an  an error when trying to delete the task.
error. {2}

AEM_TASK_ Replication task {task] on server  Returned if the replication  task was running 


NOT_ {server} must be stopped before it can  when AemDeleteTask attempted to delete it.
STOPPED be deleted.

4.19   export_task
Export definitions from the selected task on the selected server. The definitions always include task 
settings, tables/table patterns (include/exclude), table settings and global transformations. The endpoint 
definition is only exported along with the task definition if with endpoints=true is set.

Required User Role: See Required Enterprise Manager permissions (page 251).

Syntax
def export_task(
self,
server,
task,
withendpoints = False
)

Parameters
Parameters
Parameter Type  Description

server string The name of the server on which the task is defined.

task string The task to be exported.

withendpoints bool Whether or not to export the endpoint definitions as well.

Return values
Exported task JSON file as a string.

API Guide - Qlik Enterprise Manager , November 2021 223


4   Enterprise Manager Python API

Errors
All of the general errors as well as the errors listed in the table below. 

Error responses
Error Message Description

AEM_METHOD_ AemExportTask is only supported on Replicate  AemExportTask is only 


NOT_ 5.5 or above. supported on Replicate 5.5 or 
SUPPORTED_ above.
VERSION

AEM_EXPORT_ Failed to export task {task} from Replicate  Export all cannot be carried out 


TASK_NO_ server {server} as the logged in user does not  because the user does not have 
PERMISSION_ have permission to access one or both of the  permissions on one or more 
ON_ENDPOINT task's endpoints. endpoints.

4.20   import_task
Import a single task's JSON definitions provided in the request body into the requested server repository on 
the selected server.

The ImportTask method enables importing all valid JSON definitions provided in the request body.

This includes task settings, tables/table patterns (include/exclude), table settings and global 
transformations.

Information about endpoints is included if it was included in the JSON file.

When you import a task, items that existed in the target server before the import and have no new JSON 
definition in the request body are not modified and not removed. This means that ImportTask provides no 
way of removing old definitions that are no longer needed.

Required User Role: See Required Enterprise Manager permissions (page 251).

Syntax
def import_task(
self,
payload,
server,
task
)

Parameters
Parameters
Parameter Type  Description

payload  string A JSON document to import.

server string The name of the server to import to.

task string Name of the task to import.

API Guide - Qlik Enterprise Manager , November 2021 224


4   Enterprise Manager Python API

Return values
N/A

Errors
Error responses
Error Message Description

AEM_IMPORT_ Failed to import task {task} to replication  The task cannot be imported because 


TASK_NO_ server {server} as the logged in user does  it includes endpoint definitions, and 
PERMISSION_ not have permission to add or modify  the user does not have permissions to 
ON_ENDPOINT endpoints. insert endpoints.

AEM_IMPORT_ Failed to import task {task} to replication  The task cannot be imported because 


TASK_ server {server} as the JSON file contains  the stream contains items that cannot 
CONTAIN_ unsupported objects. be imported (such as remote 
ALIEN_ITEMS machines).

AEM_IMPORT_ Failed to import task {task} to replication  The task cannot be imported because 


TASK_NAME_ server {server} as the JSON file  contains  the stream contains conflicting tasks.
DIFFER conflicting tasks.

AEM_IMPORT_ Failed to import task to replication server  The task cannot be imported since the 


TASK_ {server} as the JSON file  contains multiple  stream contains multiple tasks, and 
CONTAINS_ tasks. To import multiple tasks, use  the method can only import a single 
MULTIPLE_ AemImportAll instead. task.
TASKS

AEM_TASK_ Failed to import task {task} as the task is  Occurs when trying to import a 


NOT_ running on server {server}. Stop the task  running task.
IMPORTABLE and then try again.

AEM_IMPORT_ Failed to import task {task} to replication  The task cannot be imported as the 


TASK_ server {server} as the JSON file is empty. specified JSON file is empty.
CONTENT_
EMPTY

AEM_IMPORT_ Failed to import task {task} to server  The task cannot be imported as the 


TASK_ {server} as the endpoint names in the  endpoint names in the specified 
ENDPOINT_ JSON file’s “task” and “databases”  JSON file's “task” and “databases” 
DIFFER sections are not the same. sections are different.

AEM_IMPORT_ Failed to import task {task} to replication  The task cannot be imported as one of 


TASK_NO_ server {server} as the {role} endpoint  the endpoints specified in the 
ENDPOINT_IN_ {endpoint} does not exist on the target  exported JSON file does not exist on 
SERVER server. the target server.

AEM_IMPORT_ Replicate (server '{0}') import unable to  The task cannot be imported because 


TASK_CANNOT_ delete task. Error message '{2} the task that it was supposed to 
OVERRIDE_ override cannot be deleted.
TASK

API Guide - Qlik Enterprise Manager , November 2021 225


4   Enterprise Manager Python API

4.21   export_audit_trail
Export  audit trail data from all servers. 

Required User Role: See Required Enterprise Manager permissions (page 251).

Syntax
def export_audit_trail(
self,
start_timestamp,
end_timestamp
)

Parameters
Parameters
Parameter Type  Description Required

start_ string start timestamp: (UTC format or Ticks) Yes


timestamp
Example: 2020-06-30T16:15:00Z (UTC format)

Example: 637410358250082194 (Ticks)

end_ string end timestamp: (UTC format or Ticks) No


timestamp
Example: 2020-06-30T16:15:00Z (UTC format)

Example: 637410358250082194 (Ticks)

Default : latest audit trail record

Return values
JSON File (stream)

Errors
All of the general errors as well as the errors listed in the table below. 

Error responses
Error Message Description

AEM_INVALID_ Timestamp is not a timestamp. Timestamp is not valid.


TIMESTAMP_
Timestamp format should be 'yyyy'-
FORMAT
'MM'-'dd'T'HH':'mm':'ss'Z or Ticks.

AEM_EXPORT_ Failed to export audit trail. Time range is not valid.


INNER_ERR
AUDIT-E-INVRANGE. The end time is 
before the start time.

API Guide - Qlik Enterprise Manager , November 2021 226


4   Enterprise Manager Python API

Error Message Description

UNAUTHORIZED_ Unauthorized Request. request:  User does not have permission to 


REQUEST AemExportAuditTrail  access the audit trail information.

4.22   stop_task
Stops the selected task.

Required User Role: See Required Enterprise Manager permissions (page 251).

Syntax
def stop_task(
self,
server,
task,
int timeout = 30
)

Parameters
Parameters
Parameter Type  Description

server string The name of the server.

task string  l Replicate: - The name of the task.


 l Compose: - The name of the task or workflow appended with a 
double underscore and the project name.

Example:  

mytask__myproject

timeout int Time, in seconds, to wait until getting a response.

Return values
AemStopTaskResp

API Guide - Qlik Enterprise Manager , November 2021 227


4   Enterprise Manager Python API

Return values
Value Type  Description

state AemTaskState The current state of the task.

STOPPED = 0,

RUNNING = 1,

ERROR = 2,

RECOVERY = 3

error_message string The description of the error.

Errors
All of the general errors as well as the errors listed in the table below.

Error responses
Error Message Description

AEM_TASK_ Replicate task {task} on server {server} is  Cannot stop a task that is in 


ALREADY_STOPPED already stopped. Stopped state.

AEM_STOP_TASK_ Failed to stop Replicate task {0} on server  An error occurred while trying 


INNER_ERR {1}: <{2}> to stop the task.

AEM_STOP_TASK_ A timeout occurred when trying to stop  A timeout occurred while 


TIMEOUT Replicate task {0} on server {1} trying to stop the task.

4.23   run_task
Run the selected task according to the specified option.

Required User Role: See Required Enterprise Manager permissions (page 251).

Syntax
def run_task(
self,
payload,
server,
task,
option = AemRunTaskOptions.RESUME_PROCESSING,
timeout = 30
)

API Guide - Qlik Enterprise Manager , November 2021 228


4   Enterprise Manager Python API

Parameters
Parameters
Parameter Type  Description

payload AemRunTaskReq -

cdc_position string  The cdcposition parameter can either be specified inline or 


in an external JSON file. The format for both is described in 
Request Body Format for Replicate tasks (page 229) below.

Mandatory for all AemRunTask options.

server string  The name of the server on which to run the task.

task  string   l Replicate: - The name of the task.


 l Compose: - The name of the task or workflow 
appended with a double underscore and the project 
name.

Example:  

mytask__myproject

option AemRunTaskOptions  For replication tasks, any of the options (except NONE) can 


be specified. For Compose tasks, only NONE can be 
{
NONE = 0, specified.
RESUME_PROCESSING =
1,
RELOAD_TARGET = 2,
RESUME_PROCESSING_
FROM_TIMESTAMP = 3,
METADATA_ONLY_
RECREATE_ALL_TABLES =
4,
METADATA_ONLY_CREATE_
MISSING_TABLES = 5,
RECOVER_USING_
LOCALLY_STORED_
CHECKPOINT = 6,
RECOVER_USING_
CHECKPOINT_STORED_ON_
TARGET = 7
}

timeout int The time, in seconds, to wait for a response.

Request Body Format for Replicate tasks
If the task option (see above) is RESUME_PROCESSING_FROM_TIMESTAMP, then use the following 
format:

API Guide - Qlik Enterprise Manager , November 2021 229


4   Enterprise Manager Python API

JSON File Format:

{"cdcposition":"timestamp"}

Example:  

{"cdcposition":"2017-03-07T11:19:03"}

Inline Format:

"{\"cdcposition\":\"timestamp\"}"

Example:  

"{\"cdcposition\":\"2017-03-07T11:19:03\"}"

If the task option (see above) is RECOVER_USING_CHECKPOINT_STORED_ON_TARGET, then use 
the following format:

JSON File Format:

{"cdcposition":"target_checkpoint"}

Example:  

{"cdcposition":"Checkpoint:V1#1#timestamp:2017-02-14T12:34:44#0#0#*#0#0"}

Inline Format:

"{\"cdcposition\":\"target_checkpoint\"}"

Example:  

"{\"cdcposition\":\"Checkpoint:V1#1#timestamp:2017-02-14T12:34:44#0#0#*#0#0\"}"

Return value
AemRunTaskResp

Return values
Value Type  Description

error_message string The description of the error.

API Guide - Qlik Enterprise Manager , November 2021 230


4   Enterprise Manager Python API

Value Type  Description

state AemTaskState The current state of the task.

STOPPED = 0,   

RUNNING = 1,

ERROR = 2,

RECOVERY = 3

Errors
All of the general errors as well as the errors listed in the table below.

Error responses
Error Message Description

AEM_TASK_ Replicate task {task} on server {server} is  The task cannot be run because it is 


ALREADY_ already running. already running.
RUNNING

AEM_TASK_IN_ Replicate task {task} on server {server}  The task cannot be run because it is in 


RECOVERY cannot be run as it is in a recovery state. Recovery state.

AEM_WRONG_ Replicate task {task] on server {server}  When the option Tables are already 


OPTION_FOR_ cannot be run with cdcposition {position}  loaded. Start processing changes 
CDCPOSITION and option {option}. Change the option to  from Timestamp is selected in the 
RESUME_PROCESSING_FROM_ Advanced Run Options dialog box for 
TIMESTAMP or RECOVER_USING_ a task, the option sent to the API must 
CHECKPOINT_STORED_ON_ be RESUME_PROCESSING_FROM_
TARGET. TIMESTAMP.

AEM_CDC_ The cdcposition parameter value for  The cdcPosition parameter must follow 


POSITION_ERR_ Replicate task {task} on server {server} is  this format: YYYY-MM-
FORMAT not in the correct format ('YYYY-MM- DDThh:mm:ssZ
DDThh:mm:ssZ').
Parameters: task name and server 
name

AEM_RUN_ Replicate task {task} on server {server}  The task does not assume a Running 


TASK_TIMEOUT timed out when requested to “Run”. state or any other steady state (error or 
stopped).

AEM_RUN_ Replicate task {task} on server {server}  Replicate experienced an 


TASK_INNER_ encountered an error when requested to  error/exception when trying to run the 
ERR run. task.

API Guide - Qlik Enterprise Manager , November 2021 231


4   Enterprise Manager Python API

Error Message Description

AEM_RUN_ Replicate task {task} on server {server}  Task validation revealed that the task 


TASK_NO_SRC_ has no source or target endpoints. is missing a source and a target.
NO_TRG

AEM_RUN_ Replicate task {task} on server {server}  Task validation revealed that the task 


TASK_NO_SRC has no source endpoint. is missing a source.

AEM_RUN_ Replicate task {task} on server {server}  Task validation revealed that the task 


TASK_TRG has no target endpoint. is missing a target.

AEM_RUN_ Replicate task {task} on server {server}  Task validation of a unidirectional task 


TASK_NOT_FL_ cannot be run without at least one of the  revealed that the replication option 
NOR_CDC replication options enabled (Full Load,  definition for the task is missing (Full 
Apply Changes, or Store Changes). Load, Apply Changes, or Store 
Changes).

AEM_RUN_BIDI_ Replicate task {task} on server {server}  Task validation of a unidirectional task 


TASK_NO_FL_ cannot be run without at least one of the  revealed that the replication option 
NOR_CDC replication options enabled (Full Load or  definition for the task is missing (Full 
Apply Changes). Load, Apply Changes, or Store 
Changes).

4.24   get_endpoint_list
Retrieves a list of endpoints and their properties for the specified server.

Required User Role: See Required Enterprise Manager permissions (page 251).

Syntax
def get_endpoint_list(
self,
server
)

Parameters
Parameters
Parameter Type  Description

server string The name of the server on which the endpoints are defined.

Return values
AemGetEndpointListResp

API Guide - Qlik Enterprise Manager , November 2021 232


4   Enterprise Manager Python API

Return values
Value Type  Description

endpointList List<Endpoint> An array of Endpoint objects.

description  string The endpoint description.

isLicensed  bool  Indicates whether the endpoint is licensed on this server.

name  string The endpoint name.

role EndpointRole  The endpoint role: SOURCE or TARGET.

{   

ALL = 0,   

SOURCE = 1,   

TARGET = 2,   

BOTH = 3   

}   

type  string The endpoint type, for example, Oracle.

Errors
All of the general errors as well as the errors listed in the table below.

Error responses
Error Message Description

AEM_ENDPOINT_ Failed to retrieve endpoints list  Replicate experienced an error/exception 


LIST_INNER_ERR from Replicate server {name}. when trying to retrieve the endpoint list.

4.25   delete_endpoint
Description
Deletes the specified endpoint. Note that an endpoint can only be deleted if it is not in use by any task.

Required User Role: See Required Enterprise Manager permissions (page 251).   

Syntax
def delete_endpoint(
self,
server,
endpoint
)

API Guide - Qlik Enterprise Manager , November 2021 233


4   Enterprise Manager Python API

Parameters
Parameters
Parameter Type  Description

server string The server where the endpoint is defined.

endpoint string The name of the endpoint to be deleted. 

Return values
N/A

Errors
Error responses
Error Message Description

AEM_ Replicate endpoint {endpoint} on server  Endpoint name unknown to Qlik 


ENDPOINT_ {server} could not be found. Enterprise Manager.
NOT_FOUND

AEM_DELETE_ Failed to delete Replicate endpoint  Replicate encountered an 


ENDPOINT_ {endpoint} from server {server}. error/exception when trying to delete 
INNER_ERR the endpoint.

AEM_ Replicate endpoint {endpoint} on server  The Replicate endpoint must be 


ENDPOINT_ {server} cannot be deleted as it is currently in  removed from its associated tasks 
IS_IN_USE use by one or more tasks. before it can be deleted.

4.26   reconfigure_endpoint_no_wait 
Call this method to override the source endpoint settings with settings from another endpoint of the same 
type. This method also supports automatically stopping and then resuming all tasks that are using the 
source endpoint (which is required for unplanned switchovers).

 l Supported with the Oracle source endpoint only.
 l Using this method, requires you to set up relevant Qlik Replicate task(s) with three 
separate source endpoints - two inactive source endpoints defined with the primary and 
secondary database connection settings, and one active source endpoint (initially 
defined with the primary database connection settings). 
For detailed instructions, see Reconfiguring endpoints (page 249).

Required User Role: see Required Enterprise Manager permissions (page 251).

Syntax
def reconfigure_endpoint_no_wait(
self,
server,

API Guide - Qlik Enterprise Manager , November 2021 234


4   Enterprise Manager Python API

endpoint,
configuration = None,
recycle = True
)

Parameters
Parameters
Parameter Type  Description

server string The name of the Replicate server (as defined in Qlik Enterprise Manager) 


on which the task(s) are running.

endpoint string  The name of the source endpoint defined for the Replicate task(s).

configuration string  The name of the secondary endpoint (or the primary endpoint when 


reverting the settings).

recycle bool Whether to stop and resume the Replicate task(s) automatically. The 


default is "true", that is, when an unanticipated switchover occurs, tasks 
using the source endpoint will be automatically stopped and then resumed 
after the source endpoint is updated with the settings from the secondary 
endpoint.

Set to "false" for planned switchovers (such as migrating to a production 
database or switching back to the primary database).

Return values
N/A

Errors 
All of the general errors as well as the errors listed in the table below.

Error responses
Error Message Description

AEM_ENDPOINT_ Replicate endpoint "{endpoint}" on  The specified endpoint could not be found.


NOT_FOUND server "{server}" could not be 
found.

AEM_ Failed to reconfigure endpoint " Qlik Enterprise Manager failed to 


RECONFIGURE_ {endpoint}" on server "{server}".  reconfigure the endpoint with the settings 
ENDPOINT_ Error: "{message}" of the failover endpoint.
INNER_ERR

4.27   export_all
Export all definitions from the requested server repository on the selected server (server settings, tasks, 
endpoints, and so on). The definitions are exported to a JSON file.

API Guide - Qlik Enterprise Manager , November 2021 235


4   Enterprise Manager Python API

Required User Role: See Required Enterprise Manager permissions (page 251).

Syntax
def export_all(
self,
server
)

Parameters
Parameters
Parameter Type  Description

server  string  The name of the server containing the repository to be exported.

Return values
Export JSON file as a string.

Errors
Error responses
Error Message Description

AEM_METHOD_ AemExportAll is only supported on Replicate  The method requires Replicate 


NOT_ 5.5 or above. 5.5 or above.
SUPPORTED_
VERSION

AEM_EXPORT_ Failed to export all tasks from Replicate server  Export all cannot be carried out 


NO_ {server} as the logged in user does not have  because the user does not have 
PERMISSION_ permission to export one or more of the defined  permissions on one or more 
ON_TASK tasks. tasks.

AEM_EXPORT_ Failed to export all tasks from server {server}  Export all cannot be carried out 


NO_ as the logged in user does not have permission  because the user does not have 
PERMISSION_ to export one or more of the defined endpoints. permissions on one or more 
ON_ENDPOINT endpoints.

4.28   import_all
Import the JSON definitions provided in the request body into the requested server repository on the 
selected server. The ApiImportAll method uses "merge" semantics. In particular, all valid JSON definitions 
provided in the request body will be imported.

This includes server settings, task settings, endpoints, and other definitions.

Items that existed in the target server before the import and have no new JSON definition in the request 
body will not be modified and will not be removed. This means that ApiImportAll provides no way of 
removing old definitions that are no longer needed.

API Guide - Qlik Enterprise Manager , November 2021 236


4   Enterprise Manager Python API

Required User Role: See Required Enterprise Manager permissions (page 251).

Syntax
def import_all(
self,
payload,
server
)

Parameters
Parameters
Parameter Type  Description

payload  string A JSON document to import.

server string The name of the server to import to.

Return values
N/A

Errors
Error responses
Error Message Description

AEM_METHOD_ AemImportAll is only supported on Replicate  The method requires Replicate 5.2 


NOT_ 5.2 or above. or above.
SUPPORTED_
VERSION

AEM_IMPORT_ Failed to import all tasks to replication server  Stream cannot be imported 


NO_ {server} as the logged in user does not have  because the user does not have 
PERMISSION_ permission to add tasks. the permissions to add tasks.
ON_TASK

AEM_IMPORT_ Failed to import all tasks to replication server  Stream cannot be imported 


NO_ {server} as the logged in user does not have  because the user does not have 
PERMISSION_ permission to add endpoints. the permissions to add endpoints.
ON_ENDPOINT

AEM_IMPORT_ Failed to import all tasks to replication server  Stream cannot be imported 


CONTENT_ {server} as the JSON file is empty. because it contains no content.
EMPTY

AEM_IMPORT_ Failed to import all tasks to replication server  Stream cannot be imported 


INVALID_ {server} as the JSON file  contains invalid  because it contains invalid content.
CONTENT content.

API Guide - Qlik Enterprise Manager , November 2021 237


4   Enterprise Manager Python API

4.29   reload_table
Reload a specific table.

Required User Role: See Required Enterprise Manager permissions (page 251).

Syntax
def reload_table(
self,
server,
task,
schema = None,
table = None
)

Parameters
Parameters
Parameter Type  Description

server string The name of the server.

task string The name of the task.

schema string The name of the table schema to reload.

table string The name of the table to reload.

Return values
N/A

Errors
Error responses
Error Message Description

AEM_INVALID_ Failed to reload table {table} as Full Load  The table could not be reloaded because 


TASK_NOT_FL is not enabled for task {task}. the task's Full Load replication option is 
not enabled.

AEM_INVALID_ Failed to reload table  as this operation is  The table could not be reloaded because 


TASK_NT_ not supported with the File Channel  the task's source endpoint is File 
NTSUPPEP source endpoint. Channel.

AEM_ Failed to reload table {schema}.{table}  An error was encountered while trying to 


RELOAD_ for replication task {task} on server  reload the specified table.
TABLE_ERR {server}: {message}

4.30   test_endpoint
Connect to an endpoint to test connectivity and configuration (permissions, CDC configuration. etc.).

API Guide - Qlik Enterprise Manager , November 2021 238


4   Enterprise Manager Python API

Required User Role: See Required Enterprise Manager permissions (page 251).   

Syntax
def test_endpoint(
self,
server,
endpoint,
timeout = 60
)

Parameters
Parameters
Parameter Type  Description

server string The name of the server on which the endpoint is defined.

endpoint string The name of the endpoint.

timeout int Time, in seconds, to wait until getting a response.

Return values
AemTestEndpointResp

Return values
Value Type  Description

status AemEndpointState  -

UNKNOWN = 0,

CONNECTED = 1,

ERROR = 2

message string Short description of the error.

detailed_message string Detailed description of the error.

Errors
All of the general errors as well as the errors listed in the table below.

API Guide - Qlik Enterprise Manager , November 2021 239


4   Enterprise Manager Python API

Error responses
Error Message Description

AEM_TEST_ A timeout occurred while testing the connection  Connection was not 


ENDPOINT_ for endpoint {endpoint} on Replicate server  established within 60 
CONNECTION_ {server}. seconds.
TIMEOUT

AEM_ENDPOINT_NOT_ Replicate endpoint {0} on server {1} could not be  The specified endpoint 


FOUND found. could not be found.

4.31   delete_old_change_data
The method can be called on an ad-hoc basis to delete processed Change Data Partitions created on the 
target database by a Replicate task. 

 l Partitions will only be deleted if the Change Data Partitioning and Partition Retention 
options are enabled in the Replicate console. 
For more information, refer to the Qlik Replicate Setup and User Guide.
 l Partitions will only be deleted if the task is running. If the task is not running, the 
partitions will be deleted the next time the task runs.
 l Only partitions that are not locked by a consuming application will be deleted.

Required User Role: See Required Enterprise Manager permissions (page 251).

Syntax
public void DeleteOldChangeData(
AemDeleteOldChangeDataReq payload,
string server,
string task
);

API Guide - Qlik Enterprise Manager , November 2021 240


4   Enterprise Manager Python API

Parameters
Parameters
Parameter Type Description

AemDeleteOldChangeDataReq payload The point in time after which partitions can be 


deleted, which can either be specified as a timestamp 
or as an offset. If a retention barrier is set, partitions 
will be deleted up to the retention barrier date, 
regardless of the specified timestamp/offset.

Timestamp Format: 

[Date]

(yyyy'-'MM'-'dd'T'HH':'mm':'ss'Z')

Example:

2020-06-30T16:15:00Z

Offset Format :

[Period]

Format ISO 8601 duration

Example:

P1M3DT1H2M

server string The name of the server on which the task is running.

task string  The name of the task.

Error response
Error responses
Message Text Description

AEM_TASK_ Replication task {task] on server {server} could not be  Returned when an 


NOT_FOUND found.  unknown task name is 
encountered.

AEM_INVALID_ The specified deletion age does not conform to the  Returned when the 


TIMESTAMP_ expected timestamp or offset format. Timestamp  specified deletion age 
OR_OFFSET_ format should be yyyy'-'MM'-'dd'T'HH':'mm':'ss'Z'.  does not conform to the 
FORMAT Offset format should conform to ISO 8601 duration. expected timestamp or 
offset format.

AEM_DELETE_ Failed to request deletion of old change data for task  Returned when an error is 


OLD_CHANGE_ {task} on server {server}.  encountered during 
DATA_INNER_ partition deletion.
Message: {error_message}
ERR

API Guide - Qlik Enterprise Manager , November 2021 241


4   Enterprise Manager Python API

4.32   set_change_data_retention_barrier
The method can be used to:   

 l Set a retention barrier for deleting consumed partitions. Setting a retention barrier will initiate 
periodic deletion of consumed Change Data Partitions from the target database defined for the 
specified task. Partitions will be deleted according to the Allow consuming applications to delete 
partitions every interval set on Replicate Server, and up to the specified "retention_point".
 l Remove the retention barrier, thereby stopping periodic deletion of consumed Change Data 
Partitions.

 l Partitions will only be deleted if the Change Data Partitioning and Partition Retention 
options are enabled in the Replicate console. 
 l Partitions will only be deleted if the task is running. If the task is not running, the 
partitions will be deleted the next time it runs.
 l Only partitions that are not locked by a consuming application will be deleted.

Required User Role:   See Required Enterprise Manager permissions (page 251).

Syntax
public void SetChangeDataRetentionBarrier(
AemSetChangeDataRetentionBarrierReq payload,
string server,
string task
);

API Guide - Qlik Enterprise Manager , November 2021 242


4   Enterprise Manager Python API

Parameters
Parameters
Parameter Type Description

payload AemSetChangeDataRetentionBarrierReq Payload for Setting a Retention 


Barrier:

retention_point=timestamp

application=application_name

Where:

 l timestamp is the date up to which 
partitions can be deleted. The 
timestamp must be in the 
following format: (yyyy'-'MM'-
'dd'T'HH':'mm':'ss'Z'). 
 l application_name is the name of 
the consuming application.

Example:

retention_point=2020-06-30T16:15:00Z

application=Compose

Payload for Removing the Retention 
Barrier:

retention_point=

application=application_name

Where application_name is the name of 
the consuming application.

server string The name of the server on which the 


task is running.

task string  The name of the task.

Error response
Error responses
Error Message Description

AEM_TASK_NOT_ Replication task {task] on server {server} could  Returned when an unknown 


FOUND not be found.  task name is encountered.

API Guide - Qlik Enterprise Manager , November 2021 243


4   Enterprise Manager Python API

Error Message Description

AEM_INVALID_ The specified partition retention barrier does  Returned when the specified 


TIMESTAMP_ not conform to the expected timestamp  format.  partition retention barrier does 
FORMAT Timestamp format should be yyyy'-'MM'- not conform to the expected 
'dd'T'HH':'mm':'ss'Z'. timestamp  format.

AEM_SET_ Failed to set change data retention barrier for  Returned when an error is 


CHANGE_DATA_ task {task} on server {server}.  encountered when trying to set 
RETENTION_ the retention barrier.
Message: {error_message}
BARRIER_INNER_
ERR

4.33   get_change_data_retention_barrier
Returns the date of the earliest partition retention barrier when multiple partition retention barriers have 
been set.

When different retention barriers have been set by multiple consuming applications, Replicate will delete 
old Change Data partitions up to the   earliest partition retention barrier.

For information on setting a partition retention barrier, see set_change_data_retention_barrier (page 242).

Required User Role: See Required Enterprise Manager permissions (page 251).

Syntax
public AemGetChangeDataRetentionBarrierResp GetChangeDataRetentionBarrier(
string server,
string task
);

Parameters
Parameters
Parameter Type Description

server string The name of the server on which the task is running.

task string  The name of the task.

Response
Response parameters
Name Type Description

application string The name of the consuming application that set the 


earliest partition retention barrier.

retention_ datetime The date of the earliest partition retention barrier.


point
Format: yyyy'-'MM'-
'dd'T'HH':'mm':'ss'Z'

API Guide - Qlik Enterprise Manager , November 2021 244


4   Enterprise Manager Python API

Error response
Error responses
Error Message Description

AEM_TASK_NOT_FOUND Replication task {task] on  Returned when an unknown task name 


server {server} could not be  is encountered.
found. 

AEM_GET_CHANGE_ Failed to get change data  Returned when an error is encountered 


DATA_RETENTION_ retention barrier for task {task}  while attempting to get the earliest 
BARRIER_INNER_ERR on server {server}.  partition retention barrier.

Message: {error_message}

4.34   Parameters
The following table lists all parameters used in the response body, along with their values.

Parameters
Parameter 
Value / Description
Name

Server State  l MONITORED: The server is being monitored, the Qlik Enterprise Manager is 
connected and synchronized successfully.
 l ERROR: Qlik Enterprise Manager fails to connect and monitor the server.
 l NOT_MONITORED: The server is not being monitored.

Server Platform  l WINDOWS
 l LINUX

License State  l LICENSE_VALID
 l LICENSE_INVALID_CHECKSUM
 l LICENSE_EXPIRED NO_LICENSE
 l MACHINE_NOT_LICENSED
 l INVALID_LICENSE

Endpoint Role Specifies whether an endpoint is being used as a source or a target in a Replicate 
task.

 l SOURCE
 l TARGET

API Guide - Qlik Enterprise Manager , November 2021 245


4   Enterprise Manager Python API

Parameter 
Value / Description
Name

Task State  l RUNNING: The task is running.
 l STOPPED: The task has not been run yet or has stopped running at some 
point during the replication.
 l ERROR: The task has stopped due to a fatal error.
 l RECOVERING: The task has detected an error and is trying to recover. After 
a limited number of attempts, the task either recovers and the state returns to 
RUNNING, or the task fails and the state turns to ERROR.

Task options  l full_load_enabled [bool]: Creates all files or tables at the target endpoint, 
automatically defines the metadata that is required at the target, and 
populates the tables with data from the source.
 l apply_changes_enabled [bool]: Updates all changes made to files and 
tables that were created during the full load. Applied changes include inserts, 
updates, and removal of items.
 l store_changes_enabled [bool]: Stores changes in Change tables. This value 
and the audit_changes_enabled value are mutually exclusive.
 l audit_changes_enabled [bool]: Stores changes in a single audit table. This 
value and the store_changes_enabled_value are mutually exclusive.

Task Stop   l NONE: Indicates that a task is running and no Stop reason is prevalent.
reason  l NORMAL: Indicates that the task was stopped by the user.
 l RECOVERABLE_ERROR: Indicates that the task is still active, but that there 
is a temporary problem, such as a missing connection. As soon as the error 
state is resolved, Replicate restarts the task.
 l FATAL ERROR: Indicates that the task stopped and the error must be 
resolved manually. The task cannot be started again until the error has been 
resolved.
 l FULL_LOAD_ONLY_FINISHED: Indicates that the task only finished full 
load.
 l STOPPED_AFTER_FULL_LOAD: Indicates that the task stopped after full 
load. Cached changes may or may not have been applied.
 l STOPPED_AFTER_CACHED_EVENTS: Indicates that the task stopped 
after cached changes were applied.
 l EXPRESS_LICENSE_LIMITS_REACHED: The task definition includes 
actions that are not included with Express license privileges.
 l STOPPED AFTER_DDL_APPLY: Indicates that the task stopped after 
DDL statements were applied.
 l STOPPED_LOW_MEMORY: Indicates that the task stopped due to low 
memory.
 l STOPPED_LOW_DISK: Indicates that the task stopped due to low disk 
space.

API Guide - Qlik Enterprise Manager , November 2021 246


4   Enterprise Manager Python API

Parameter 
Value / Description
Name

Source/target   l RUNNING: The endpoint is running.
status  l ERROR: File channel only. Cannot send files to another endpoint. Indicated 
by an asterisk (*) in the user interface.
 l DISCONNECTED: Information that is provided by all targets and Oracle 
sources that cannot establish a successful connection. Other sources stop the 
task. Indicated by an asterisk (*) in the user interface.
 l WARNING: The target is applying changes one by one instead of bulk to find 
the problem. Indicatedby an asterisk (*) in the user interface.

Profile  l Unidirectional: A Replicate task that replicates  from a source endpoint to a 
target endpoint.
 l Bidirectional: A Replicate task that replicates changes from the source  to the 
target, and vice versa.
 l Log Stream: A Replicate task that captures changes from a single source and 
stores them on Replicate Server for replication to one or more targets.
 l Qlik Cloud: A Qlik Cloud Landing task in Replicate. For more information, see 
Hybrid Data Delivery.
 l Data Storage: A data storage task in a Compose Data Lake project.
 l Data Warehouse: A data warehouse task in a Compose Data Warehouse 
project.
 l Data Mart: A data mart task in a Compose Data Warehouse project.
 l Compactor: A Compose system task that merges the changes (i.e. history) 
from the delta_hds folder with the hds folder and then deletes the delta_hds 
folder.
 l Workflow: A workflow task in Compose.
 l Provisioning: A provisioning task in Compose for Data Lakes 6.6.

Source type Source and target endpoint types should be specified in the same format that they 
appear in the Type drop-down list (when adding a new endpoint in Enterprise 
Manager). For information on how to add an endpoint in Enterprise Manager, refer to 
the Enterprise Manager Setup and User Guide.

Target type -

API Guide - Qlik Enterprise Manager , November 2021 247


4   Enterprise Manager Python API

Parameter 
Value / Description
Name

Run options  l RESUME_PROCESSING: Resumes task execution from the point that it was 
stopped. 
 l RELOAD_TARGET: Re-starts the full-load replication process if the task was 
previously run.
 l RESUME_PROCESSING_FROM_TIMESTAMP: Starts the CDC replication 
task from a specific point.
 l RECOVER_USING_LOCALLY_STORED_CHECKPOINT: Recovers a task 
using the recovery state stored locally in the task folder (located under the 
Data folder).
 l RECOVER_USING_CHECKPOINT_STORED_ON_TARGET: Recovers a 
task using the CHECKPOINT value from the attrep_txn_state table 
(created in the target database).   

This option is only available if the Store task recovery data in 
target database option is enabled in the Changes Processing 
Tuning tab of the Task Settings dialog box.

 l METADATA_ONLY_RECREATE_ALL_TABLES: Recreates the target 
tables defined for full load.
 l METADATA_ONLY_CREATE_MISSING_TABLES: Creates missing target 
tables, including Change Tables.

Request state  l SUCCESS: Connection to endpoint is valid
 l FAILURE: Connection to endpoint is not valid

state Represented as enum values:

 l TABLE_QUEUED = 0: A table awaiting loading. 
 l TABLE_LOADING = 1: A table being loaded to the target. 
 l TABLE_COMPLETED = 2: A table that has been loaded to the target.
 l TABLE_CHANGE_PROCESSING = 3: A table that has been loaded to the 
target and is being updated according to changes on the source. 
 l TABLE_ERROR = 4: An error occurred while processing the table.

API Guide - Qlik Enterprise Manager , November 2021 248


A   Reconfiguring endpoints

A    Reconfiguring endpoints
The Qlik Enterprise Manager SDK provides a method for overriding the source endpoint settings in a 
Replicate task with settings from another endpoint of the same type. Such functionality may be useful in the 
event of database failover or when migrating to a different environment, for example. 

Using this method requires you to set up relevant Qlik Replicate task(s) with three separate source 
endpoints - two inactive source endpoints defined with the primary and secondary database connection 
settings, and one active source endpoint (initially defined with the primary database connection settings). 

Full instructions are provided in Setting up the Replicate task (page 249) and Switching to the secondary 
Replicate endpoint (page 250) below.

In this appendix, the term "Primary" denotes the database in use before the switchover, whereas the term 
"Secondary" denotes the database in use  after the switchover.

Supported with the Oracle source endpoint only.

The  method name differs according to the SDK type:

 l REST SDK: AEMReconfigureEndpointNoWait
 l .NET SDK: ReconfigureEndpointNoWait
 l Python SDK: reconfigure_endpoint_no_wait

A.1   Setting up the Replicate task
To use this method, you need to define three separate endpoints: 

 l Endpoint 1: Points to the primary database.
 l Endpoint 2: Points to the secondary database.
 l Endpoint 3: This is a duplicate of Endpoint 1. Endpoint 3 serves as the source endpoint for the 
Replicate task(s) and will be updated with the settings of Endpoint 2 or Endpoint 1 (when reverting 
to the primary database) when the method is called. 

To set up the Replicate task:

Before starting the procedure, you need to allocate a name for the source endpoint (referred to 
as Endpoint 3 above). This is because the source endpoint name forms part of the primary and 
secondary endpoint names  (referred to above as Endpoint 1 and Endpoint 2 respectively), 
which are defined before the source endpoint.

 1.  Define a new endpoint pointing to the primary database and name it using the following format:
EndpointName__ConfigurationName, for example,  MyOracle__PrimaryOracle.

API Guide - Qlik Enterprise Manager , November 2021 249


A   Reconfiguring endpoints

where EndpointName is the name of the source endpoint and ConfigurationName is the name 
of this endpoint.
 2.  Set the internal parameter supportResetLog in the Advanced tab of the endpoint connection 
settings.
 3.  Define another endpoint pointing to the secondary database and name it using the following  format:
EndpointName__ConfigurationName, for example,  MyOracle__SecondaryOracle.
where EndpointName is the name of the source endpoint and ConfigurationName is the name 
of this endpoint.
 4.  Set the internal parameter supportResetLog in the Advanced tab of the endpoint connection 
settings.
 5.  Define the source endpoint by duplicating the endpoint pointing to the primary database (defined in 
Step 1). Give it the name that you allocated for it before starting this procedure, for example,  
MyOracle. 
 6.  Set up and run the Replicate task(s) using the source endpoint defined in Step 5 above.

A.2   Switching to the secondary Replicate endpoint
The procedures below explain how to switch to the secondary Replicate endpoint. The first procedure is 
suitable for most use cases, although you may want to perform the second procedure should you desire to 
manually stop and resume the Replicate tasks.

Procedure 1: Failover or planned switchover 

Make sure that the secondary database has fully taken over and then call the  method - using a script 
(recommended) or manually - with the appropriate parameters.

Procedure 2: Planned switchover with manual control

 1.  Stop the task(s) using the source endpoint.
 2.  Switch over to the secondary database.
 3.  Make sure that the secondary database has fully taken over and then call the method with the 
appropriate parameters. 
 4.  If the method completes successfully, resume the task(s) manually.

For a description of the parameters, see the section for the SDK you are working with.

A.3   Reverting to the primary Replicate endpoint
To revert to the primary endpoint, you simply need to perform one of the procedures described in   Switching 
to the secondary Replicate endpoint (page 250) described above. However, when calling the method, 
specify the name of the primary endpoint (instead of the secondary endpoint) as the configuration 
parameter.

API Guide - Qlik Enterprise Manager , November 2021 250


B   Required Enterprise Manager permissions

B    Required Enterprise Manager permissions
This appendix lists the permission(s) required to call each of the documented SDK methods. Note that the 
method names listed below are in Python format; the actual method name may differ slightly according to 
the specific SDK (REST, .NET, or Python) you are using. 

 l login: Viewer on Qlik Enterprise Manager level
 l logout: Viewer on Qlik Enterprise Manager level
 l put_server_license: Admin on the specified server
 l get_server_details: Viewer on server
 l put_server: 
 l For adding a new server - Admin on all servers. 
 l For updating an existing server - Admin on the specified server.
 l put_server_acl: Admin on the specified server
 l get_server: Operator on the specified server
 l get_server_acl: Operator on the specified server
 l get_server_list: Viewer on All Servers
 l delete_server: Admin on the specified server
 l delete_server_acl: Admin on the specified server
 l get_task_list: Viewer on All Tasks
 l get_task_details: Viewer on the specified task
 l get_table_list: Viewer on the specific task
 l get_table_status: Viewer on the specific task
 l delete_task: Designer on the specified task
 l export_task: Operator on the specified task and on All Endpoints.
 l import_task: Designer on All Tasks. If endpoints are also included, then Designer on All Endpoints 
as well.
 l stop_task: Operator on the specified  task
 l run_task: Operator on the specified  task
 l get_endpoint_list: Viewer on All Endpoints
 l delete_endpoint: Designer on the specified endpoint
 l reconfigure_endpoint_no_wait: Operator on All Endpoints
 l export_all: Admin on Enterprise Manager and on the specified server, Designer on All Tasks, and 
Operator on All Endpoints
 l import_all: Admin on Enterprise Manager and on the specified server, Designer on All Tasks, and 
Designer on All Endpoints
 l reload_table: Operator on the specified task
 l test_endpoint: Operator on the specified endpoint
 l delete_old_change_data: Operator on the specified task
 l set_change_data_retention_barrier: Operator on the specified task

API Guide - Qlik Enterprise Manager , November 2021 251


B   Required Enterprise Manager permissions

 l get_change_data_retention_barrier: Operator on the specified task
 l export_audit_trail: Admin on Enterprise Manager

API Guide - Qlik Enterprise Manager , November 2021 252

You might also like