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
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
{
}
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.
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.