Skip to main content Skip to complementary content

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.

Request parameters

Request parameters
Location Name Required Example

URL

Host [string]

Yes

computer.network.net

URL

ServerName [string]

Yes

myrepsrv1

Header

EnterpriseManager.APISessionID [string]

Yes

wCo0_KvjEUFROvfHF5KGrw

Request body

{

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

}

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 .

description

The description of the server.

For details of what constitutes a valid description, see AEM_INVALID_DESC

host

The host name or IP address of the server.

For details of what constitutes a valid host name, see AEM_INVALID_HOST

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.

password

The password to connect to the server.

Information note

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.

verify_server_certificate

Set to true to ensure the Server certificate is trusted. As a rule, to reduce the chance of "man-in-the-middle" attacks, this option should always be set to true.

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

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

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

cURL example

Request

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

Request body

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

{

"$type":"AemReplicateServer",

"name":"myrepsrv1",

"description":"replicate for business",

"host":"rep2018r2gs7.qa.int",

"port":"443",

"username":"administrator",

"password":"pass123",

"verify_server_certificate":true,

"monitored":true

}

Response

Headers:

HTTP/1.1 200 OK

Cache-Control: no-cache, no-store

Content-Length: 38

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

Server: Microsoft-HTTPAPI/2.0

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

Error Response

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

Error responses
HTTP Code Enterprise Manager Code Text Description

500

DESERIALIZE_TO_TYPE

"Failed to deserialize json to type Server: {message}"

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

500

AEM_PUT_SERVER_INNER_ERR

Failed to put server "{server}".

Error: "{message}".

Returned if Qlik Enterprise Manager encounters an error/exception when trying to PUT the server.

500

AEM_INVALID_SERVER_TYPE

Server type {ServerType} for server "{ServerName}" is not valid.

Returned when an invalid server type is specified.

500

AEM_NAME_URL_MISMATCH

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

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

500

AEM_EMPTY_HOST

The host is missing from the request.

Returned when the host is missing from the request.

500

AEM_EMPTY_PORT

The port is missing from the request.

Returned when the port is missing from the request.

500

AEM_EMPTY_USERNAME

The username is missing from the request. Returned when the user name is missing from the request.
500

AEM_EMPTY_PASSWORD

The password is missing from the request. Returned when the password is missing from the request.
500 AEM_INVALID_PORT The port is invalid.

Returned when the specified port is not valid.

500

AEM_INVALID_USERNAME

The user name is invalid.

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

Returned when the specified user name is not valid.

500 AEM_INVALID_DESC

The description is invalid.

Descriptions cannot exceed 250 characters.

Returned when the description exceeds 250 characters.

500 AEM_INVALID_HOST

The host is invalid.

Hosts cannot exceed 64 characters and can only contain letters (a-z or A-Z), digits, spaces, dots (.), dashes (-), and underscores (_).

Returned when the server host name exceeds 64 characters or contains invalid characters.

500 AEM_INVALID_NAME

The name of the server is invalid.

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

Returned when the server name exceeds 64 characters or contains invalid characters.

500 AEM_HOST_PORT_ALREADY_EXIST

Host {name/IP} and port {number} are already in use by another server.

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

500

-

-

-

Did this page help you?

If you find any issues with this page or its content – a typo, a missing step, or a technical error – let us know how we can improve!