# 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](https://help.qlik.com/en-US/enterprise-manager/May2026/Content/EnterpriseManager/EnterpriseManager_APIGuide/Introduction/AEMPermissions.htm).

## Request parameters

Request parameters Request parameters

| Location | Name | Required | Example |
| --- | --- | --- | --- |
| URL | Host [string] | Yes | computer.network.net |
| URL | ServerName [string] | Yes | myrepsrv1 |
| Header | EnterpriseManager.APISessionID [string] | Yes | wCo0\_KvjEUFROvfHF5KGrw |

## Response body

`{
`

`"$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.<br><br>Information note<br><br>The password identifier (GUID) that is returned by `GetServer` is valid only for the session in which it was generated.<br><br>Using it in another session (for example as input for `PutServer`) will result in exception. |
| verify\_server\_certificate | When "true", Qlik Enterprise Manager verifies that the Server certificate is trusted, thereby reducing the chance of "man-in-the-middle" attacks.<br><br>For details on setting this option, see [PutServer](https://help.qlik.com/en-US/enterprise-manager/May2026/Content/EnterpriseManager/EnterpriseManager_APIGuide/CurlAPI/api_aem_putserver.htm). |
| monitored | Whether to retrieve tasks and messages from this server or not. |

## cURL example

### Request

`curl -i -k --header "EnterpriseManager.APISessionID: wCo0_KvjEUFROvfHF5KGr" https://computer.network.net/attunityenterprisemanager/api/v1/servers/myrepsrv1/def

`

### Response

` Headers:
                 `

`HTTP/1.1 200 OK`

`Cache-Control: no-cache, no-store`

`Content-Length: 224`

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

`Server: Microsoft-HTTPAPI/2.0`

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

### Payload

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

`}`

## Error response

All of the [general errors](https://help.qlik.com/en-US/enterprise-manager/May2026/Content/EnterpriseManager/EnterpriseManager_APIGuide/CurlAPI/error_handling.htm) as well as the following error:

Error responses

| HTTP Code | Enterprise Manager Code | Text | Description |
| --- | --- | --- | --- |
| 500 | AEM\_GET\_SERVER\_INNER\_ERR | Failed to get server "{server}".<br><br>Error: "{message}". | Returned if Qlik Enterprise Manager encounters an error/exception when trying to get the server details. |