# GetServerDetails

Retrieves details about the specified server.

Required User Role: See [Required Enterprise Manager permissions](https://help.qlik.com/en-US/enterprise-manager/November2024/Content/EnterpriseManager/EnterpriseManager_APIGuide/Introduction/AEMPermissions.htm).

## Syntax

`public AemGetServerDetailsResp GetServerDetails(` `string server` `);`

## Parameters

Parameters

| Parameter | Type | Description |
| --- | --- | --- |
| server | string | The specified server name in Qlik Enterprise Manager. |

## Return values

AemGetServerDetailsResp

Return values

| Parameter | Type | Description |
| --- | --- | --- |
| ServerDetails | AemServerDetails | ReplicateServerDetails or ComposeServerDetails that are inherited from AemServerDetails. |
| Configuration | - | - |
| Host | string | The host name or IP address of the Replicate/Compose Server machine. |
| Platform | AemPlatform `{<br>`<br><br>UNKNOWN = 0,<br><br><br>WINDOWS = 1,<br><br>LINUX = 2<br><br>` 	}  ` | The platform on which the Replicate/Compose Server machine is installed. |
| Port | string | The port through which the Replicate/Compose Server machine is accessed. |
| UserName | string | The user name for connecting to the Replicate/Compose Server machine. |
| Description | string | The server description. |
| LastConnection | string | The date and time of the last successful sync/retrieval of tasks and messages. |
| License | ApiLicense | - |
| DaysToExpiration | int | The number of days left before the license expires. |
| Expiration | string | The expiration date of the server license. |
| IssueDate | string | When the license was issued. |
| State | AemLicenseState<br><br>{<br><br>VALID\_LICENSE = 0,<br><br>INVALID\_LICENSE\_CHECKSUM = 1,<br><br>EXPIRED\_LICENSE = 2,<br><br>NO\_LICENSE = 3,<br><br>MACHINE\_NOT\_LICENSED = 4,<br><br>INVALID\_LICENSE = 5<br><br>} | The current license state (for example, valid, expired, and so on). |
| Message | string | The error message if Qlik Enterprise Manager fails to connect to the Replicate/Compose Server machine. |
| Name | string | The name of the server in Qlik Enterprise Manager. |
| ResourceUtilization | AemServerUtilization | - |
| AttunityCpuPercentage | int | The sum of CPU percentage of Replicate server and all running tasks processes. |
| DiskUsageMb | long | The amount of disk space that the server is currently consuming, in MB. This is the sum of disk usage for all tasks on this server. |
| MachineCpuPercentage | int | The CPU percentage of the machine where Replicate is installed. |
| MemoryMb | long | The amount of memory that the server is currently consuming, in MB. This is the sum of memory usage for all active tasks on this server, excluding stopped tasks. |
| State | AemServerState<br><br>{<br><br>NOT\_MONITORED = 0,<br><br>MONITORED = 1,<br><br>ERROR = 2<br><br>} | The state of the server. |
| AemTasksSummary | TaskSummary | - |
| Error | int | The number of tasks that encountered a fatal error. |
| Recovering | int | The number of recovering tasks. |
| Running | int | The number of running tasks. |
| Stopped | int | The number of stopped tasks. |
| Total | int | The total number of tasks, regardless of state. |
| Version | string | The Replicate/Compose Server version. |

Information note

* The return value -1 means N/A.
* 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.
* 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.
* For servers that are in an error state or not monitored, parameters related to Disk and Memory usage will be returned as -1.

## Errors

Error responses

| Error | Message | Description |
| --- | --- | --- |
| AEM\_SERVER\_NOT\_FOUND | Replicate server {server} could not be found. | Server name unknown to Qlik Enterprise Manager. |

See [Error handling](https://help.qlik.com/en-US/enterprise-manager/November2024/Content/EnterpriseManager/EnterpriseManager_APIGuide/NetAPI/error_handling.htm).