# DeleteServer

## General

### URL

https://[host]/attunityenterprisemanager/api/v1/servers/[server]/def

### Description

When this method is called, Qlik Enterprise Manager will:

* Delete the specified server from Qlik Enterprise Manager
* Stop monitoring any tasks that were defined on the server
* Delete all messages related to the server from the Message Center
* Delete all user roles defined for the server, the server tasks, and the server endpoints

Information note

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

## 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 |

## 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](https://help.qlik.com/en-US/enterprise-manager/May2025/Content/EnterpriseManager/EnterpriseManager_APIGuide/CurlAPI/error_handling.htm) as well as the errors listed in the table below.

Error responses

| HTTP Code | Enterprise Manager Code | Text | Description |
| --- | --- | --- | --- |
| 500 | AEM\_SERVER\_NOT\_FOUND | Requested server "{server}" could not be found. | The server name is unknown to Qlik Enterprise Manager. |
| 500 | AEM\_DELETE\_SERVER\_INNER\_ERR | Failed to delete requested server "{server}". | Qlik Enterprise Manager encountered an error/exception when trying to delete the server. |