Enterprise Manager API Guide
Enterprise Manager API Guide
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
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
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)
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:
{
"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
l Replication
Management
l Replication
Analytics
l Replication
Management
l Replication
Analytics
l Replication
Management
l Replication
Analytics
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
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
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
Error response
Error responses
HTTP Code Enterprise Manager Code Text Description
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).
Request parameters
Request parameters
Location URL Param Name Required Example
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
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).
Request parameters
Request parameters
Location Name Required Example
myrepsrv1
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=
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
Error: "
{message}"
2.8 GetServerDetails
General
URL
https://{host}/attunityenterprisemanager/api/v1/servers/[server]
Description
Retrieves details about the specified server.
HTTP method
GET
Required user role
See Required Enterprise Manager permissions (page 251).
Request parameters
Request parameters
Location Name Required Example
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}"
},
}
}
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.
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:
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",
Error response
Error responses
HTTP Enterprise Manager
Text Description
Code Code
403 See Error handling - -
(page 17).
440 See Error handling - -
(page 17).
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
Request body
{
"$type": "{string}",
"name": "{string}",
"description": "{string}",
"host": "{string}",
"port": "{string}",
"username": "{string}",
"password": "{string}",
"verify_server_certificate": {bool},
"monitored": {bool}
}
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.
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
Content-Length: 38
Server: Microsoft-HTTPAPI/2.0
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
HTTP Enterprise
Text Description
Code Manager Code
HTTP Enterprise
Text Description
Code Manager Code
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.
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, 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
Request body
{
"admin_role": {
},
"designer_role": {
},
"operator_role": {
},
"viewer_role": {
},
"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.
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"
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
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
Example:
domain_name\user_name.
Example:
domain_name\group_name.
HTTP Enterprise
Text Description
Code Manager Code
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
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.
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
Content-Length: 224
Server: Microsoft-HTTPAPI/2.0
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
Error: "
{message}".
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
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}"}, … ]
},
"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.
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
Content-Length: 502
Server: Microsoft-HTTPAPI/2.0
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.
Error responses
HTTP Enterprise
Text Description
Code Manager Code
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
Response body
{
"serverList": [{
"$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
Content-Length: 1658
Server: Microsoft-HTTPAPI/2.0
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:
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
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.
Error responses
HTTP Enterprise
Text Description
Code Manager Code
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
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
Error: "{message}".
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
Required user role
See Required Enterprise Manager permissions (page 251).
Request parameters
Request parameters
Location Name Required Example
Response body
{
"taskList": [{
"name": "{string}",
"message": "{string}",
"assigned_tags": ["string", "string", "string", …]
}, {
"name": "{string}",
"message": "{string}",
"name": "{string}",
"message": "{string}",
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
Content-Length: 205
Server: Microsoft-HTTPAPI/2.0
Payload
{
"taskList": [{
"name": "Task1",
"state": "RUNNING",
"stop_reason": "NONE",
"message": "NONE",
}, {
"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}
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
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
Response body for a Replicate task
{
"type":"{string}",
"name":"{string}",
"description":"{string}",
"state":"{enum task_state}",
"message": "{string}",
"source_endpoint":{
"name":"{string}",
"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":{
"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.
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).
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.
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.
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}"
},
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".
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.
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
Content-Length: 1658
Server: Microsoft-HTTPAPI/2.0
Payload
{
"name":"SalesDBBackup",
"state":"RUNNING",
"message":"NONE",
"source_endpoint":{
"name":"Customer Management",
"type":"Oracle",
},
"target_endpoint":{
"name":"Business Management",
},
"cdc_event_counters":
{"applied_insert_count":0,
"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": {
"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",
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
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
Example: computer.network.net
Example: myrepsrv1
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
Content-Length: 205
Server: Microsoft-HTTPAPI/2.0
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
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
Example: computer.network.net
Example: myrepsrv1
Response body
{
"table_details":[
{
"schema_on_source":"{string}",
"table_on_source":"{string}",
"schema_on_target":"{string}",
"table_on_target":"{string}",
"state":"{enum}",
"data_errors_count":"{int64}",
"table_full_load_info":{
"start_time":"{string}",
"end_time":"{string}",
"estimated_row_count":"{int64}",
"estimated_end_time":"{string}",
"transferred_row_count":"{int64}",
"transferred_volume_mb":"{int64}"
},
"table_cdc_info":{
"insert_count":"{int64}",
"update_count":"{int64}",
"delete_count":"{int64}",
"ddl_count":"{int64}",
"last_update_time":"{string}",
"cached_insert_count":"{int64}",
"cached_update_count":"{int64}",
"cached_delete_count":"{int64}"
}
}
]
}
Response parameters
Response parameters
Name Description
schema_on_ Source 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).
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
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
Content-Length: 205
Server: Microsoft-HTTPAPI/2.0
Payload
{
"table_details":[
{
"schema_on_source":"myschema1",
"table_on_source":"mytable1",
"schema_on_target":"",
"table_on_target":"",
"state":"TABLE_CHANGE_PROCESSING",
"data_errors_count":0,
"table_full_load_info":{
"start_time":"2019-08-05T01:35:06",
"end_time":"2019-08-05T01:35:06",
"estimated_row_count":0,
"estimated_end_time":null,
"transferred_row_count":4,
"transferred_volume_mb":1856
},
"table_cdc_info":{
"insert_count":2,
"update_count":0,
"delete_count":0,
"ddl_count":0,
"last_update_time":null,
"cached_insert_count":0,
"cached_update_count":0,
"cached_delete_count":0
}
},
{
"schema_on_source":"myschema2",
"table_on_source":"mytable2",
"schema_on_target":"",
"table_on_target":"",
"state":"TABLE_CHANGE_PROCESSING",
"data_errors_count":0,
"table_full_load_info":{
"start_time":"2019-08-05T01:35:06",
"end_time":"2019-08-05T01:35:31",
"estimated_row_count":0,
"estimated_end_time":null,
"transferred_row_count":1000000,
"transferred_volume_mb":464000000
},
"table_cdc_info":{
"insert_count":0,
"update_count":4,
"delete_count":0,
"ddl_count":0,
"last_update_time":null,
"cached_insert_count":0,
"cached_update_count":0,
"cached_delete_count":0
}
}
]
}
Errors
All of the general errors as well as the errors listed in the table below.
Error responses
Qlik Enterprise
HTTP Code Text Description
Manager Code
Qlik Enterprise
HTTP Code Text Description
Manager Code
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
Note: The specified 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/tasks/ SalesDBBackup?action=delete&deletetasklogs=true
Response
Header:
HTTP/1.1 200 OK
Content-Length: 38
Server: Microsoft-HTTPAPI/2.0
Error response
Error responses
Enterprise
HTTP
Manager Text Description
Code
Code
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
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)
Error response
Error responses
HTTP Enterprise
Text Description
Code Manager Code
500 - ExportTask is only supported on -
Replicate 5.2 or above.
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
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).
Response
JSON File
cURL example
cURL Example
Response
HTTP/1.1 200 OK
Content-Length: 0
Server: Microsoft-HTTPAPI/2.0
Error response
Error responses
HTTP Enterprise
Text Description
Code Manager Code
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
[UTC format or Ticks] 637410358250082194 (Ticks)
[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)
Error response
Error responses
HTTP Error Message Description
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
Example:
mytask__myproject
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/
?action=stop
Response
Header:
HTTP/1.1 200 OK
Content-Length: 38
Server: Microsoft-HTTPAPI/2.0
Payload
{
"state":"STOPPED",
"error_message":""
Error response
Error responses
HTTP Enterprise
Text Description
Code Manager Code
2.25 RunTask
General
Replicate URL
https://{host}/attunityenterprisemanager/api/v1/servers/{ServerName}/tasks/
{TaskName}?action=run&option={option}&timeout={timeout}
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
Example:
mytask__
myproject
For more information,
see Body below.
Request body format
If the task option is RESUME_PROCESSING_FROM_TIMESTAMP, then the format should be:
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":""
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
Content-Length: 38
Server: Microsoft-HTTPAPI/2.0
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"
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
HTTP Enterprise
Text Description
Code Manager Code
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).
Request parameters
Request parameters
Location Name Required Example
Response body
{
"endpointList": [{
"name": "{string}",
"description": "{string}",
"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:
HTTP/1.1 200 OK
Content-Length: 205
Server: Microsoft-HTTPAPI/2.0
Payload
{
"endpointList": [{
"name": "Shopping",
"role": "SOURCE"
"type": "ORACLE"
"is_licensed": true
}, {
"name": "Management",
"role": "SOURCE"
"type": "ORACLE"
"is_licensed": true
}, {
"role": "TARGET"
"type": "HADOOP"
"is_licensed": true
Error response
Error responses
HTTP Enterprise
Text Description
Code Manager Code
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
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
403 See Error - -
handling (page
17).
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).
Request parameters
Request parameters
Location Name Required Description Example
Set to "false"
for planned
switchovers
(such as
migrating to a
production
database or
switching back
to the primary
database).
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
Content-Length: 0
Server: Microsoft-HTTPAPI/2.0
Application-Status: 200
Application-Message: OK
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
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.
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
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
HTTP Enterprise
Text Description
Code Manager Code
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
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).
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
Content-Length: 0
Server: Microsoft-HTTPAPI/2.0
Error response
Error responses
HTTP Enterprise
Text Description
Code Manager Code
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).
Request parameters
Request parameters
Location Name Required Example
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
Content-Length: 0
Server: Microsoft-HTTPAPI/2.0
Error response
Error responses
Enterprise
HTTP
Manager Text Description
Code
Code
Enterprise
HTTP
Manager Text Description
Code
Code
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
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
Content-Length: 61
Server: Microsoft-HTTPAPI/2.0
Payload
{
"state":"CONNECTED",
"error_message":""
Error response
Error responses
HTTP Enterprise Manager
Text Description
Code Code
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).
Request parameters
Request parameters
Location Name Required Description/Example
Example:
computer.network.net
Example:
myrepsrv1
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
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
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.
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
Example:
computer.network.net
Example:
myrepsrv1
Example:
TargetAWSEMR
Request body
Body 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
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
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
Example:
computer.network.net
Example:
myrepsrv1
Example:
TargetAWSEMR
Response body
Response parameters
Name Type Description
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
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
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.
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.
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 -
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.
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)
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.
Example 1: Connecting to Enterprise Manager using Active Directory
Example 2: Connecting to Enterprise Manager using SAML
This must be specified without a username.
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
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
l Replication
Management
l Replication
Analytics
l Replication
Management
l Replication
Analytics
l Replication
Management
l Replication
Analytics
3.5 PutServerLicense
Registers a license on a specific server via Qlik Enterprise Manager.
Required User Role: See Required Enterprise Manager permissions (page 251).
Syntax
public void PutServerLicense(
string payload,
string server
);
Parameters
Parameters
Parameter Type Description
This is the license that was provided by your Qlik Sales Representative.
Expected format: Text or JSON.
Currently refers to the Replicate license only.
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
Error: "{message}"
3.6 GetServerDetails
Retrieves details about the specified server.
Required User Role: See Required Enterprise Manager permissions (page 251).
Syntax
public AemGetServerDetailsResp GetServerDetails(
string server
);
Parameters
Parameters
Parameter Type Description
Return values
AemGetServerDetailsResp
Return values
Parameter Type Description
Configuration - -
WINDOWS = 1,
LINUX = 2
License ApiLicense -
VALID_LICENSE = 0,
INVALID_LICENSE_
CHECKSUM = 1,
EXPIRED_LICENSE =
2,
NO_LICENSE = 3,
MACHINE_NOT_
LICENSED = 4,
INVALID_LICENSE = 5
ResourceUtilization AemServerUtilization -
NOT_MONITORED =
0,
MONITORED = 1,
ERROR = 2
AemTasksSummary TaskSummary -
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
See Error handling (page 123).
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
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.
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.
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
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.
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
);
Parameters
Parameters
Parameter Type Description
payload AemAuthorizationAcl -
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
Example:
domain_name\user_name.
Example:
domain_name\group_name.
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
Return values
AemServer (AemReplicateServer or AemComposeServer that inherited from AemServer)
Return values
Parameter Type Description
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.
For details on setting this option, see PutServer (page 130).
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
Return values
AemAuthorizationAcl
Return values
Parameter Type Description
Errors
All of the general errors as well as the errors listed in the table below.
Error responses
Error Message Description
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
{
UNKNOWN = 0, WINDOWS
= 1, LINUX = 2
}
{
NOT_MONITORED = 0,
MONITORED = 1,
ERROR = 2
Errors
All of the general errors as well as the errors listed in the table below.
Error responses
Error Message Description
3.12 DeleteServer
Description
When this method is called, Qlik Enterprise Manager will:
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
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
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).
Syntax
public void DeleteServerAcl(
string server
);
Parameters
Parameters
Parameter Type Description
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
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
Return values
AemGetTaskListResp
Return values
Value Type Description
Example:
mytask__myproject
State AemTaskState -
STOPPED = 0,
RUNNING = 1,
ERROR = 2,
RECOVERY = 3
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
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).
Syntax
public AemGetTaskDetailsResp GetTaskDetails(
string server,
string task
);
Parameters
Parameters
Parameter Type Description
Example:
mytask__myproject
Return values for Replicate tasks
AemGetTaskDetailsResp
Return values
Value Type Description
Task AemTaskInfoDetailed -
Current long -
FullLoadCompleted bool -
Format: YYY MM DD
Timezone: UTC
FullLoadThroughput AemFullLoadThroughput -
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.
Options AemCommonSettings -
SourceEndpoint TaskEndpoint -
TargetEndpoint TaskEndpoint -
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
}
Return values for Compose tasks
General parameters
Name Type Description
l AemComposeDWTaskInfoDetailed (for
Data Warehouse tasks)
l AemComposeDMTaskInfoDetailed (for
Data Mart tasks)
l AemComposeDLTaskInfoDetailed (for
Data Lake tasks)
Example:
mytask__myproject
options AemCommonSettings -
Source endpoint parameters
Name Type Description
source_endpoint TaskEndpoint -
target_endpoint parameters
Name Type Description
target_endpoint TaskEndpoint -
Format: YYY MM DD
Timezone: UTC
Format: YYY MM DD
Timezone: UTC
Loading counters parameters
Name Type Description
LoadingCounters AemTaskFullLoadCounters -
Errors
All of the general errors as well as the errors listed in the table below.
Error responses
Error Message Description
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
Example: myrepsrv1
Return values
AemGetTableListResp
Return values
Value Type Description
Errors
All of the general errors as well as the errors listed in the table below.
Error responses
Error Message Explanation Description
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
Example: myrepsrv1
Return values
AemGetTableStatusesResp
General return values
Name Type Description
See state (page 185).
table_full_load_info return values
Name Type Description
TableCdcInfo return values
Name Type Description
Errors
All of the general errors as well as the errors listed in the table below.
Error responses
Error Message Description
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
Errors
Error responses
Error Message Description
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
Return values
Exported task JSON file as a string
Errors
Error responses
Error Message Description
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
Return values
N/A
Errors
Error responses
Error Message Description
3.21 StopTask
Stop the selected task.
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
Example:
mytask__myproject
Return values
AemStopTaskResp
Return values
Parameter Type Description
{
STOPPED = 0,
RUNNING = 1,
ERROR = 2,
RECOVERY = 3
Errors
Error responses
Error Message Description
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 -
Mandatory for all AemRunTask options.
Example:
mytask__myproject
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\"}"
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
STOPPED = 0, R
UNNING = 1,
ERROR = 2,
RECOVERY = 3
Errors
Error responses
Error Message Description
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).
Syntax
public AemGetEndpointListResp GetEndpointList(
string server
);
Parameters
Parameters
Parameter Type Description
Return values
AemGetEndpointListResp
Return values
Parameter Type Description
ALL = 0,
SOURCE = 1,
TARGET = 2,
BOTH = 3
Errors
Error responses
Error Message Description
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
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).
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
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
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
Return values
Export JSON file as a string.
Errors
Error responses
Error Message Description
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
Return values
N/A
Errors
Error responses
Error Message Description
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
Example: 2020-06-30T16:15:00Z (UTC format)
Example: 637410358250082194 (Ticks)
Example: 2020-06-30T16:15:00Z (UTC format)
Example: 637410358250082194 (Ticks)
null : latest audit trail record
Return values
JSON File (stream)
Errors
Error responses
Error Message Description
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
Return values
N/A
Errors
Error responses
Error Message Description
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
Return values
AemTestEndpointResp
Return values
Parameter Type Description
Status AemEndpointState -
UNKNOWN = 0,
CONNECTED = 1,
ERROR = 2
Errors
Error responses
Error Message Description
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,
string task
);
Parameters
Parameters
Parameter Type Description
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
Error response
Error responses
Message Text Description
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
);
Parameters
Parameters
Parameter Type Description
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.
Error response
Error responses
Error Message Description
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
Response
Response parameters
Name Type Description
Error response
Error responses
Error Message Description
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
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.
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 -
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.
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)
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 *
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:
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
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
l Replication
Management
l Replication
Analytics
l Replication
Management
l Replication
Analytics
l Replication
Management
l Replication
Analytics
4.5 put_server_license
Registers a license on a specific server via Qlik Enterprise Manager.
Required User Role: See Required Enterprise Manager permissions (page 251).
Syntax
def put_server_license(
self,
payload,
server
)
Parameters
Parameters
Parameter Type Description
This is the license that was provided by your Qlik Sales Representative.
Expected format: Text or JSON.
Currently refers to the Replicate license only.
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
Error: "{message}"
4.6 get_server_details
Retrieves details about the specified server.
Required User Role: See Required Enterprise Manager permissions (page 251).
Syntax
def get_server_details(
self,
server
)
Parameters
Parameters
Parameter Type Description
Return values
AemGetServerDetailsResp
Return values
Value Type Description
configuration - -
license ApiLicense -
VALID_LICENSE = 0,
INVALID_LICENSE_
CHECKSUM = 1,
EXPIRED_LICENSE =
2,
NO_LICENSE = 3,
MACHINE_NOT_
LICENSED = 4,
INVALID_LICENSE = 5
resource_ AemServerUtilization -
utilization
{
NOT_MONITORED = 0,
MONITORED = 1,
ERROR = 2
}
aem_tasks_ TaskSummary -
summary
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
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
)
Parameters
Parameters
Parameter Type Description
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.
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
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.
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
)
Parameters
Parameters
Parameter Type Description
payload AemAuthorizationAcl -
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
Example:
domain_name\user_name.
Example:
domain_name\group_name.
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
Return values
AemServer (AemReplicateServer or AemComposeServer that are inherited from AemServer)
Return values
Value Type Description
Errors
See general errors.
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
Return values
AemAuthorizationAcl
Return values
Value Type Description
Errors
All of the general errors as well as the errors listed in the table below.
Error responses
Error Message Description
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
{
UNKNOWN = 0, W INDOWS =
1, LINUX = 2
}
{
NOT_MONITORED = 0,
MONITORED = 1,
ERROR = 2
Errors
All of the general errors as well as the errors listed in the table below.
Error responses
Error Message Description
4.12 delete_server
Description
When this method is called, Qlik Enterprise Manager will:
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
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
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
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
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
)
Parameters
Parameters
Parameter Type Description
Return values
AemGetTaskListResp
Return values
Value Type Description
Example:
mytask__myproject
state AemTaskState -
STOPPED = 0,
RUNNING = 1,
ERROR = 2,
RECOVERY = 3
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
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).
Syntax
def get_task_details(
self,
server,
task
)
Parameters
Parameters
Parameter Type Description
Example:
mytask__myproject
Return values for Replicate tasks
AemGetTaskDetailsResp
Return values
Value Type Description
task AemTaskInfoDetailed -
current long -
full_load_ bool -
completed
Format: YYY MM DD
Timezone: UTC
full_load_ AemFullLoadThroughput -
throughput
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.
options AemCommonSettings -
source_endpoint TaskEndpoint -
target_endpoint TaskEndpoint -
{
STOPPED = 0,
RUNNING = 1,
ERROR = 2,
RECOVERY = 3
}
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
}
Return Values for Compose Tasks
AemGetTaskDetailsResp
l AemComposeDWTaskInfoDetailed (for Data
Warehouse tasks)
l AemComposeDMTaskInfoDetailed (for Data
Mart tasks)
l AemComposeDLTaskInfoDetailed (for Data
Lake tasks)
Example:
mytask__myproject
options AemCommonSettings -
source_ TaskEndpoint -
endpoint
target_ TaskEndpoint -
endpoint
Format: YYY MM DD
Timezone: UTC
Format: YYY MM DD
Timezone: UTC
loading_ AemTaskFullLoadCounters -
counters
Errors
All of the general errors as well as the errors listed in the table below.
Error responses
Error Message Description
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
Example: myrepsrv1
Return values
AemGetTableListResp
Return values
Value Type Description
Errors
All of the general errors as well as the errors listed in the table below.
Error responses
Error Message Description
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
Example: myrepsrv1
Return values
AemGetTableStatusesResp
General return values
Name Type Description
See state (page 248).
table_full_load_info return values
Name Type Description
table_cdc_info return values
Name Type Description
Errors
All of the general errors as well as the errors listed in the table below.
Error responses
Error Message Description
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
Return values
N/A
Errors
Error responses
Error Message Description
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
Return values
Exported task JSON file as a string.
Errors
All of the general errors as well as the errors listed in the table below.
Error responses
Error Message Description
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
Return values
N/A
Errors
Error responses
Error Message Description
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
Example: 637410358250082194 (Ticks)
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
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
Example:
mytask__myproject
Return values
AemStopTaskResp
Return values
Value Type Description
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
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
)
Parameters
Parameters
Parameter Type Description
payload AemRunTaskReq -
Mandatory for all AemRunTask options.
Example:
mytask__myproject
Request Body Format for Replicate tasks
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\"}"
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
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
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
Return values
AemGetEndpointListResp
Return values
Value Type Description
{
ALL = 0,
SOURCE = 1,
TARGET = 2,
BOTH = 3
}
Errors
All of the general errors as well as the errors listed in the table below.
Error responses
Error Message Description
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
)
Parameters
Parameters
Parameter Type Description
Return values
N/A
Errors
Error responses
Error Message Description
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,
endpoint,
configuration = None,
recycle = True
)
Parameters
Parameters
Parameter Type Description
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
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.
Required User Role: See Required Enterprise Manager permissions (page 251).
Syntax
def export_all(
self,
server
)
Parameters
Parameters
Parameter Type Description
Return values
Export JSON file as a string.
Errors
Error responses
Error Message Description
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.
Required User Role: See Required Enterprise Manager permissions (page 251).
Syntax
def import_all(
self,
payload,
server
)
Parameters
Parameters
Parameter Type Description
Return values
N/A
Errors
Error responses
Error Message Description
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
Return values
N/A
Errors
Error responses
Error Message Description
4.30 test_endpoint
Connect to an endpoint to test connectivity and configuration (permissions, CDC configuration. etc.).
Required User Role: See Required Enterprise Manager permissions (page 251).
Syntax
def test_endpoint(
self,
server,
endpoint,
timeout = 60
)
Parameters
Parameters
Parameter Type Description
Return values
AemTestEndpointResp
Return values
Value Type Description
status AemEndpointState -
UNKNOWN = 0,
CONNECTED = 1,
ERROR = 2
Errors
All of the general errors as well as the errors listed in the table below.
Error responses
Error Message Description
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
);
Parameters
Parameters
Parameter Type Description
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
Error response
Error responses
Message Text Description
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
);
Parameters
Parameters
Parameter Type Description
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.
Error response
Error responses
Error Message Description
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
Response
Response parameters
Name Type Description
Error response
Error responses
Error Message Description
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
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.
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 -
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.
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.
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.
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
l get_change_data_retention_barrier: Operator on the specified task
l export_audit_trail: Admin on Enterprise Manager